MultiPolygon¶
@Serializable(with = Geo.MultiPolygon.Serializer::class)
data class MultiPolygon(val polygons: List<Geo.Polygon>) : Geo
A GeoJSON MultiPolygon.
A MultiPolygon is a list of multiple Polygon instances that are grouped together.
Example¶
Geo.MultiPolygon(
Geo.Polygon(
Geo.LineString(
Geo.Point(Geo.Longitude(-73.958), Geo.Latitude(40.8003)),
Geo.Point(Geo.Longitude(-73.9498), Geo.Latitude(40.7968)),
Geo.Point(Geo.Longitude(-73.9737), Geo.Latitude(40.7648)),
Geo.Point(Geo.Longitude(-73.9814), Geo.Latitude(40.7681)),
Geo.Point(Geo.Longitude(-73.958), Geo.Latitude(40.8003)),
),
),
)
External resources¶
Constructors¶
MultiPolygon¶
constructor(polygons: List<Geo.Polygon>)
constructor(vararg polygons: Geo.Polygon)
Constructs a MultiPolygon instance from multiple Polygon instances.
Types¶
Serializer¶
@LowLevelApi
object Serializer : KSerializer<Geo.MultiPolygon>
Properties¶
polygons¶
val polygons: List<Geo.Polygon>
The polygons that make up this MultiPolygon.