geos.GEOSGetGeometryN ⇒ number
⏏
Returns a geometry from a collection by index.
Kind: Exported member
Returns: number
- A pointer to a newly allocated GEOSGeometry object corresponding to the geometry at index n. The caller is responsible for destroying it. Returns NULL on exception.
Param | Type | Description |
---|---|---|
g | number | A pointer to a GEOSGeometry object of type GeometryCollection or its subclasses (MultiPoint, MultiLineString, MultiPolygon). |
n | number | The index of the geometry to return, starting from 0. |
geos.GEOSGetGeometryN_r ⇒ number
⏏
Return the Nth geometry of a collection.
Kind: Exported member
Returns: number
- A geometry object. Caller must free with GEOSGeom_destroy(). NULL on exception or if n is out of range.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
g | number | The input geometry, must be a collection. |
n | number | The index of the geometry to return, starting from 0. |