Skip to main content

multiPolygon

Creates a MultiPolygon geometry from an array of polygon coordinates.

Each polygon must consist of an array of linear rings coordinates. The first ring represents the exterior ring (shell), subsequent rings represent interior rings (holes). Each ring must be a closed line string with first and last positions identical and contain at least 3 positions. Empty polygons without any rings are allowed.

Type Parameters

  • P

Parameters

NameTypeDescription
ppptsPosition[][][]MultiPolygon coordinates
options?objectOptional geometry options
options.id?number | stringOptional identifier to be assigned to the geometry instance.
options.properties?POptional data to be assigned to the geometry instance.

Returns

MultiPolygon<P>

A new Geometry object

Throws

Examples