Skip to content

geos.GEOSDistance ⇒ number

Calculate the distance between two geometries.

Kind: global property of geos
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
g1GEOSGeometryInput geometry
g2GEOSGeometryInput geometry
distNumberPointerPointer to be filled in with distance result

geos.GEOSDistanceIndexed ⇒ number

Calculate the distance between two geometries, using the indexed facet distance, which first indexes the geometries internally, then calculates the distance. Useful when one or both geometries is very large.

Kind: global property of geos
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
g1GEOSGeometryInput geometry
g2GEOSGeometryInput geometry
distNumberPointerPointer to be filled in with distance result

geos.GEOSDistanceIndexed_r ⇒ number

Calculate the distance between two geometries, using the indexed facet distance, which first indexes the geometries internally, then calculates the distance. Useful when one or both geometries is very large.

Kind: global property of geos
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handleGEOSContextHandle_t-
g1GEOSGeometryInput geometry
g2GEOSGeometryInput geometry
distNumberPointerPointer to be filled in with distance result

geos.GEOSDistanceWithin ⇒ number

Test whether the distance between two geometries is within the given dist.

Kind: global property of geos
Returns: number - 1 on true, 0 on false, 2 on exception

ParamTypeDescription
g1GEOSGeometryInput geometry
g2GEOSGeometryInput geometry
distnumberThe max distance

geos.GEOSDistanceWithin_r ⇒ number

Test whether the distance between two geometries is within the given dist.

Kind: global property of geos
Returns: number - 1 on true, 0 on false, 2 on exception

ParamTypeDescription
handleGEOSContextHandle_t-
g1GEOSGeometryInput geometry
g2GEOSGeometryInput geometry
distnumberThe max distance

geos.GEOSDistance_r ⇒ number

Calculate the distance between two geometries.

Kind: global property of geos
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handleGEOSContextHandle_t-
g1GEOSGeometryInput geometry
g2GEOSGeometryInput geometry
distNumberPointerPointer to be filled in with distance result