toLineString method
Uses the Polygon's coordinates to make a LineString. Ignores any holes in the polygon.
Example:
Polygon polygon = Polygon([
LinearRing([
Coordinate(0, 0),
Coordinate(0, 1),
Coordinate(1, 1),
Coordinate(1, 0),
Coordinate(0, 0),
]),
]);
print(polygon.lineString);
Implementation
LineString toLineString() {
return LineString(coordinates.first.coordinates);
}