Polygon

A GeoJSON polygon.

A polygon is a shape that may have holes.

A simple polygon has a single ring (e.g., a triangle, a square). More complex polygons can have multiple rings that represent holes (e.g., a doughnut shape).

To learn more about the different kinds of polygons, see the constructors.

External resources

Constructors

Link copied to clipboard
constructor(rings: List<Geo.LineString>)
constructor(vararg rings: Geo.LineString)

Constructs a Polygon instance from multiple LineString instances.

constructor(vararg points: Geo.Point)

Constructs a single-ring Geo.Polygon instance from multiple Point instances.

Types

Link copied to clipboard

Properties

Link copied to clipboard

The various rings of this polygon.

Functions

Link copied to clipboard
open override fun toString(): String

JSON representation of this object as a BSON document.

Link copied to clipboard
open override fun writeTo(writer: BsonFieldWriter)

Writes this object to the provided writer.