Skip to content
On this page

geos.GEOSGetCentroid ⇒ number

Computes the centroid point of a geometry.

Kind: Exported member
Returns: number - - The centroid point geometry, or null if an error occurred or the input is empty.
See: https://libgeos.org/doxygen/classgeos_1_1algorithm_1_1Centroid.html

ParamTypeDescription
gnumberThe geometry to use.

geos.GEOSGetCentroid_r ⇒ number

Computes the centroid point of a geometry.

Kind: Exported member
Returns: number - - The centroid point geometry, or null if an error occurred or the input is empty.
See: https://libgeos.org/doxygen/classgeos_1_1algorithm_1_1Centroid.html

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe geometry to use.