flatten method

FeatureCollection flatten()

Flattens the MultiPoint into a FeatureCollection of Points. Properties of the MultiPoint are copied to the Points.

Example:

MultiPoint([Coordinate(1, 2), Coordinate(3, 4)]).flatten(); // FeatureCollection([Point(Coordinate(1, 2)), Point(Coordinate(3, 4))])

Implementation

FeatureCollection flatten() {
  return FeatureCollection(
    coordinates.map((c) => Point(c, properties: properties)).toList(),
  );
}