geometryCollection
Creates a GeometryCollection
geometry from an array of geometries.
The collection consumes the input geometries - after creating the collection, the input geometries become detached, are no longer valid and should not be used.
Type Parameters
-
P
Parameters
Name | Type | Description |
---|---|---|
geometries | Geometry[] | Array of geometry objects to be included in the collection |
options? | object | Optional geometry options |
options.id? | number | string | Optional identifier to be assigned to the geometry instance. |
options.properties? | P | Optional data to be assigned to the geometry instance. |
Returns
GeometryCollection<P>
A new GeometryCollection containing all input geometries