toPolygon
fun LineStringGeometry.toPolygon(autoClose: Boolean = true, autoOrder: Boolean = true): Polygon(source)
Converts a LineStringGeometry to a Polygon. The largest (or first, if autoOrder is false) LineString becomes the outer shell of the polygon, and subsequent line strings (if the receiver is MultiLineString become holes in the polygon.
Return
A Polygon created from the line string geometry.
Parameters
autoClose
If true, automatically closes each ring by duplicating the first point at the end if it's not already closed.
autoOrder
If true, automatically orders rings so the largest ring (by area) becomes the outer ring and others become holes.