Polygon

constructor(coordinates: List<List<Position>>, bbox: BoundingBox? = null)(source)


constructor(vararg coordinates: List<Position>, bbox: BoundingBox? = null)(source)

Create a Polygon by a number of linear rings.

Parameters

coordinates

The linear rings that make up this Polygon.

bbox

The BoundingBox of this Polygon.

Throws

if no coordinates have been specified or any of the Position lists is either not closed or contains fewer than 4 Position objects.


constructor(vararg lineStrings: LineString, bbox: BoundingBox? = null)(source)

Create a Polygon by a number of closed LineString objects.

Parameters

lineStrings

The LineString objects representing the polygon rings.

bbox

The BoundingBox of this Polygon.

Throws

if no coordinates have been specified or any of the LineString objects is either not closed or contains fewer than 4 Position objects.


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

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

Parameters

coordinates

The array of arrays of double arrays representing polygon rings.

bbox

The BoundingBox of this Polygon.

Throws

if the outer array is empty, or if any of the inner arrays does not represent a valid closed LineString, or if any of the arrays of doubles does not represent a valid Position.