explode method
Returns all the Coordinates of the LinearRing as Points.
Example:
LinearRing ring = LinearRing([
Coordinate(0, 0),
Coordinate(0, 1),
Coordinate(1, 1),
Coordinate(1, 0),
Coordinate(0, 0),
]);
print(ring.explode()); // FeatureCollection([Point(Coordinate(0, 0)), Point(Coordinate(0, 1)), Point(Coordinate(1, 1)), Point(Coordinate(1, 0)), Point(Coordinate(0, 0))])
Implementation
FeatureCollection explode() {
List<Point> features = [];
for (var coordinate in coordinates) {
features.add(Point(coordinate));
}
return FeatureCollection(features);
}