geos.GEOSSTRtree_create ⇒ number
⏏
Creates a GEOS STRTree, a spatial index for quickly querying geometries by their bounding boxes.
Kind: Exported member
Returns: number
- A pointer to the GEOS STRTree object.
Param | Type | Description |
---|---|---|
nodeCapacity | number | The maximum number of child nodes that a node may have. The minimum recommended capacity value is 4. If unsure, use a default node capacity of 10. |
geos.GEOSSTRtree_create_r ⇒ number
⏏
Creates a GEOS STRTree with a context handle, a spatial index for quickly querying geometries by their bounding boxes.
Kind: Exported member
Returns: number
- A pointer to the GEOS STRTree object.
Param | Type | Description |
---|---|---|
handle | number | The context handle to use for error reporting and memory management. |
nodeCapacity | number | The maximum number of child nodes that a node may have. The minimum recommended capacity value is 4. If unsure, use a default node capacity of 10. |
geos.GEOSSTRtree_destroy ⏏
Destroys an STRtree and frees its memory.
Kind: Exported member
Param | Type | Description |
---|---|---|
tree | number | A pointer to a GEOSSTRtree object. |
geos.GEOSSTRtree_destroy_r ⏏
Destroys a GEOSSTRtree spatial index.
Kind: Exported member
See: https://libgeos.org/doxygen/geos__c_8h.html#a1323e
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
tree | number | The GEOSSTRtree pointer to destroy. |
geos.GEOSSTRtree_insert ⏏
Inserts a geometry into a GEOS STRTree, along with an associated item that can be retrieved later.
Kind: Exported member
Param | Type | Description |
---|---|---|
tree | number | A pointer to the GEOS STRTree object. |
g | number | A pointer to the GEOS geometry object to insert. |
item | number | A pointer to the item associated with the geometry. This can be any arbitrary data that can be cast to a void pointer. |
geos.GEOSSTRtree_insert_r ⏏
Inserts a geometry into a GEOS STRTree with a context handle, along with an associated item that can be retrieved later.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | The context handle to use for error reporting and memory management. |
tree | number | A pointer to the GEOS STRTree object. |
g | number | A pointer to the GEOS geometry object to insert. |
item | number | A pointer to the item associated with the geometry. This can be any arbitrary data that can be cast to a void pointer. |
geos.GEOSSTRtree_iterate ⏏
Iterates over every item in an STRtree.
Kind: Exported member
Param | Type | Description |
---|---|---|
tree | number | A pointer to a GEOSSTRtree object. |
callback | function | A function to be called for each item in the tree. |
userdata | any | An optional user data to be passed to the callback function. |
geos.GEOSSTRtree_iterate_r ⏏
Iterates over every item in an STRtree using a reentrant context handle.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | A pointer to a GEOSpointer context handle. |
tree | number | A pointer to a GEOSSTRtree object. |
callback | function | A function to be called for each item in the tree. |
userdata | any | An optional user data to be passed to the callback function. |
geos.GEOSSTRtree_nearest ⇒ number
⏏
Returns the item whose extent is nearest to the given geometry's envelope.
Kind: Exported member
Returns: number
- A pointer to the nearest item, or NULL if the tree is empty.
Param | Type | Description |
---|---|---|
tree | number | The GEOSSTRtree to query. |
geom | number | The GEOSGeometry whose envelope is used for querying. |
geos.GEOSSTRtree_nearest_generic ⇒ any
⏏
Returns the item whose extent is nearest to the given item's envelope, using a custom distance function.
Kind: Exported member
Returns: any
- A pointer to the nearest item, or NULL if the tree is empty or an error occurred.
Param | Type | Description |
---|---|---|
tree | number | The GEOSSTRtree to query. |
item | any | The item whose envelope is used for querying. |
itemEnvelope | number | The GEOSGeometry representing the envelope of the item. |
distancefn | function | The GEOSDistanceCallback function to compute the distance between two items. |
userdata | any | An optional pointer to user data that is passed to the distance function. |
geos.GEOSSTRtree_nearest_generic_r ⇒ any
⏏
Returns the item whose extent is nearest to the given item's envelope, using a custom distance function.
Kind: Exported member
Returns: any
- A pointer to the nearest item, or NULL if the tree is empty or an error occurred.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
tree | number | The GEOSSTRtree to query. |
item | any | The item whose envelope is used for querying. |
itemEnvelope | number | The GEOSGeometry representing the envelope of the item. |
distancefn | function | The GEOSDistanceCallback function to compute the distance between two items. |
userdata | any | An optional pointer to user data that is passed to the distance function and the callback function. |
geos.GEOSSTRtree_nearest_r ⇒ number
⏏
Returns the item whose extent is nearest to the given geometry's envelope, using a custom distance function.
Kind: Exported member
Returns: number
- A pointer to the nearest item, or NULL if the tree is empty or an error occurred.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
tree | number | The GEOSSTRtree to query. |
geom | number | The GEOSGeometry whose envelope is used for querying. |
geos.GEOSSTRtree_query ⏏
Queries a GEOS STRTree for all geometries whose bounding boxes intersect with the given geometry's bounding box, and calls a callback function for each matching pair.
Kind: Exported member
Param | Type | Description |
---|---|---|
tree | number | A pointer to the GEOS STRTree object. |
g | number | A pointer to the GEOS geometry object to query with. |
callback | function | A function that takes two void pointers as arguments: one for the item associated with the tree geometry, and one for the user data passed to this function. The callback function is called for each matching pair of geometries in the tree and the query geometry. The callback function should return 1 to continue the query or 0 to stop it. |
userdata | any | A pointer to any user data that needs to be passed to the callback function. This can be any arbitrary data that can be cast to a void pointer. |
geos.GEOSSTRtree_query_r ⏏
Queries the tree for all items whose extents intersect the given geometry's envelope and applies an item visitor function to them.
Kind: Exported member
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
tree | number | The GEOSSTRtree to query. |
g | number | The GEOSGeometry whose envelope is used for querying. |
callback | number | The GEOSQueryCallback function to apply to the items found. |
userdata | number | An optional pointer to user data that is passed to the callback function. |
geos.GEOSSTRtree_remove ⇒ number
⏏
Removes an item from an STRtree that has a matching geometry and user data.
Kind: Exported member
Returns: number
- 1 if the item was found and removed, 0 otherwise.
Param | Type | Description |
---|---|---|
tree | number | A pointer to a GEOSSTRtree object. |
g | number | A pointer to a GEOSGeometry object representing the envelope of the item to be removed. |
item | any | The user data of the item to be removed. |
geos.GEOSSTRtree_remove_r ⇒ number
⏏
Removes an item from an STRtree that has a matching geometry and user data using a reentrant context handle.
Kind: Exported member
Returns: number
- 1 if the item was found and removed, 0 otherwise.
Param | Type | Description |
---|---|---|
handle | number | A pointer to a GEOSpointer context handle. |
tree | number | A pointer to a GEOSSTRtree object. |
g | number | A pointer to a GEOSGeometry object representing the envelope of the item to be removed. |
item | any | The user data of the item to be removed. |