MultiPolygon

@Serializable(with = MultiPolygonSerializer::class)
data class MultiPolygon @JvmOverloads constructor(val coordinates: List<List<List<Position>>>, val bbox: BoundingBox? = null) : MultiGeometry, PolygonGeometry, Collection<Polygon> (source)

A MultiPolygon geometry represents multiple surfaces in coordinate space.

See RFC 7946 Section 3.1.7 for the full specification.

See also

Throws

if any of the lists does not represent a valid Polygon

Constructors

Link copied to clipboard
constructor(coordinates: List<List<List<Position>>>, bbox: BoundingBox? = null)
constructor(vararg coordinates: List<List<Position>>, bbox: BoundingBox? = null)

Create a MultiPolygon by a number of lists (= polygon rings) of lists (= Position objects).

constructor(vararg polygons: Polygon, bbox: BoundingBox? = null)

Create a MultiPolygon by a number of Polygon objects.

constructor(coordinates: Array<Array<Array<DoubleArray>>>, bbox: BoundingBox? = null)

Create a MultiPolygon by an array (= Polygon objects) of arrays (= polygon rings) of arrays (= Position objects) where each Position is represented by a DoubleArray.

Types

Link copied to clipboard
object Companion

Factory methods for creating and serializing MultiPolygon objects.

Properties

Link copied to clipboard
open override val bbox: BoundingBox?

The bounding box of this geometry.

Link copied to clipboard

The coordinates of this geometry.

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open operator override fun contains(element: Polygon): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Polygon>): Boolean
Link copied to clipboard
operator fun get(index: Int): Polygon

Get the polygon at the specified index.

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Polygon>