PolygonBuilder

constructor(polygon: Polygon?, block: PolygonBuilder.() -> Unit = {})

Creates a new polygon builder by copying the parts from the specified Polygon.

The SpatialReference of the new polygon builder will match that of the given Polygon. Use this constructor in workflows that create a modified version of an existing geometry. Polygons with curves are supported.

Since

200.1.0

Parameters

polygon

a Polygon from which to start this builder

block

a trailing lambda parameter from within which to configure the builder.

See also


constructor(spatialReference: SpatialReference? = null, block: PolygonBuilder.() -> Unit = {})

Creates a new empty polygon builder with the specified SpatialReference.

The SpatialReference cannot be changed after instantiation.

Since

200.1.0

Parameters

spatialReference

a SpatialReference from which to start this builder

block

a trailing lambda parameter from within which to configure the builder.


constructor(mutableParts: Iterable<MutablePart>, block: PolygonBuilder.() -> Unit = {})

Creates a polygon builder with a list of MutablePart.

The spatial reference of the builder will be either the spatial reference of the first part or null if there are no parts.

Since

200.1.0

Parameters

mutableParts

the parts with which to create the builder. All parts must have the same spatial reference.

block

a trailing lambda parameter from within which to configure the builder.


constructor(points: Iterable<Point>, spatialReference: SpatialReference? = null, block: PolygonBuilder.() -> Unit = {})

Creates a polygon builder with a list of points.

The spatial reference of the builder will be either the given spatial reference, or the first Point's spatial reference or null if it is not defined by both.

Since

200.1.0

Parameters

points

the points with which to create the builder. All points must have the same spatial reference.

block

a trailing lambda parameter from within which to configure the builder.