sdk-common / com.tomtom.online.sdk.common.geojson.geometry / Polygon

Polygon

open class Polygon : Geometry

A GeoJSON Geometry type comprising one or more LineStrings. The exterior ring represents the outer edges of a polygon and is a LineString of at least four com.tomtom.online.sdk.common.location.LatLng in counterclockwise order. The interior rings (0 or more) - LineStrings of at least four com.tomtom.online.sdk.common.location.LatLngs in clockwise order - define holes in the polygon. In all cases the first and the last Position in a LineString contain identical values.

Constructors

<init>

Polygon()

Default constructor for Polygon.

Properties

exteriorRing

var exteriorRing: LineString!

interiorRings

var interiorRings: MutableList<LineString!>!

Functions

accept

open fun accept(visitor: GeoJsonObjectVisitor!): Unit

addInteriorRing

open fun addInteriorRing(lineString: LineString!): Unit

getExteriorRing

open fun getExteriorRing(): LineString

Returns a LineString of at least four com.tomtom.online.sdk.common.location.LatLngs in counterclockwise order. The first and the last position contain identical values.

getInteriorRings

open fun getInteriorRings(): ImmutableList<LineString!>!

Returns a collection of 0 or more LineString of at least four com.tomtom.online.sdk.common.location.LatLngs in counterclockwise order each. These LineStrings define the holes in the polygon. For each of the LineStrings, the first and the last Position contain identical values.