flatten method

FeatureCollection flatten()

Flattens the MultiLineString into a FeatureCollection of LineStrings. Properties are inherited from the MultiLineString.

Example:

MultiLineString([[Coordinate(1, 2), Coordinate(3, 4)]]).flatten(); // FeatureCollection([LineString([Coordinate(1, 2), Coordinate(3, 4)])])

Implementation

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