geos.GEOSDistance ⇒ number
⏏
Computes the distance between the closest points of two geometries.
Kind: Exported member
Returns: number
- 1 on success, 0 on exception.
Param | Type | Description |
---|---|---|
g1 | number | The first geometry to measure from. |
g2 | number | The second geometry to measure to. |
dist | number | A pointer to a double variable where the distance will be stored. |
geos.GEOSDistanceIndexed ⇒ number
⏏
Computes the distance between two geometries using an indexed algorithm. Useful when one or both geometries is very large.
Kind: Exported member
Returns: number
- 1 on success, 0 on exception.
See: geos::operation::distance::IndexedFacetDistance
Since: 3.7
Param | Type | Description |
---|---|---|
g1 | number | Input geometry pointer. |
g2 | number | Input geometry pointer. |
dist | number | Pointer to be filled in with distance result. |
geos.GEOSDistanceIndexed_r ⇒ number
⏏
Computes the distance between two geometries using an indexed algorithm. Useful when one or both geometries is very large. This is a thread-safe version of GEOSDistanceIndexed.
Kind: Exported member
Returns: number
- 1 on success, 0 on exception.
See: geos::operation::distance::IndexedFacetDistance
Since: 3.7
Param | Type | Description |
---|---|---|
handle | number | The context handle.pointer |
g1 | number | Input geometry pointer. |
g2 | number | Input geometry pointer. |
dist | number | Pointer to be filled in with distance result. |
geos.GEOSDistanceWithin ⇒ number
⏏
Tests whether two geometries are within a specified distance of each other.
Kind: Exported member
Returns: number
- 1 if the geometries are within the distance of each other, 0 if not, or -1 on error.
See: GEOS C header file
Param | Type | Description |
---|---|---|
g1 | number | A pointer to a GEOS geometry object. |
g2 | number | A pointer to another GEOS geometry object. |
distance | number | The distance threshold to test. |
geos.GEOSDistanceWithin_r ⇒ number
⏏
Checks if two geometries are within a given distance of each other.
Kind: Exported member
Returns: number
- A char value that is 1 if the geometries are within distance, 0 if not, or -1 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a7a9b0f6a3d3f9f8a5d4e9e7b6f4a5c0d
Param | Type | Description |
---|---|---|
handle | number | A pointer to a GEOS context handle. |
g1 | number | A pointer to the first GEOS geometry object. |
g2 | number | A pointer to the second GEOS geometry object. |
distance | number | The distance threshold in units of the coordinate reference system. |
geos.GEOSDistance_r ⇒ number
⏏
Computes the distance between the closest points of two geometries.
Kind: Exported member
Returns: number
- 1 on success, 0 on exception.
Param | Type | Description |
---|---|---|
handle | number | A pointer to the GEOS context handle. |
g1 | number | The first geometry to measure from. |
g2 | number | The second geometry to measure to. |
dist | number | A pointer to a double variable where the distance will be stored. |