Skip to content
On this page

geos.GEOSGeomFromHEX_buf ⇒ number

Converts a hexadecimal representation of WKB to a geometry.

Kind: Exported member
Returns: number - A geometry, or NULL on exception. The caller is responsible for destroying it.

ParamTypeDescription
hexstringThe hexadecimal string to convert.
sizenumberThe size of the hexadecimal string.

geos.GEOSGeomFromHEX_buf_r ⇒ number

Converts a hexadecimal representation of WKB to a geometry with a GEOS context handle.

Kind: Exported member
Returns: number - A geometry, or NULL on exception. The caller is responsible for destroying it.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
hexstringThe hexadecimal string to convert.
sizenumberThe size of the hexadecimal string.

geos.GEOSGeomFromWKB_buf ⇒ number

Converts a WKB representation to a GEOSGeometry.

Kind: Exported member
Returns: number - A pointer to a newly allocated GEOSGeometry, or NULL on exception. The caller is responsible for destroying it with GEOSGeom_destroy().

ParamTypeDescription
wkbnumberA pointer to a buffer containing the WKB representation of the geometry.
sizenumberThe size of the buffer.

geos.GEOSGeomFromWKB_buf_r ⇒ number

Converts a WKB representation to a GEOSGeometry using a context handle.

Kind: Exported member
Returns: number - A pointer to a newly allocated GEOSGeometry, or NULL on exception. The caller is responsible for destroying it with GEOSGeom_destroy_r().

ParamTypeDescription
handlenumberThe context handle.pointer
wkbnumberA pointer to a buffer containing the WKB representation of the geometry.
sizenumberThe size of the buffer.

geos.GEOSGeomFromWKT ⇒ number

Returns a GEOSGeometry from a Well-Known Text (WKT) representation.

Kind: Exported member
Returns: number - A pointer to the GEOSGeometry object.

ParamTypeDescription
wktnumberThe WKT representation of the geometry.

geos.GEOSGeomFromWKT_r ⇒ number

Returns a GEOSGeometry from a Well-Known Text (WKT) representation.

Kind: Exported member
Returns: number - A pointer to the GEOSGeometry object.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
wktnumberThe WKT representation of the geometry.

geos.GEOSGeomGetEndPoint ⇒ number

Returns the endpoint of a LineString geometry.

Kind: Exported member
Returns: number - A pointer to a newly allocated GEOSGeometry object representing the endpoint, or NULL on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9c6f7f5d3b9a0f1a0d4c1a4e2a0b6e8b

ParamTypeDescription
geomnumberA pointer to a GEOSGeometry object.

geos.GEOSGeomGetEndPoint_r ⇒ number

Returns the endpoint of a LineString geometry.

Kind: Exported member
Returns: number - A pointer to a newly allocated GEOSGeometry object representing the endpoint, or NULL on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9c6f7f5d3b9a0f1a0d4c1a4e2a0b6e8b

ParamTypeDescription
handlenumberA GEOS context handle.
geomnumberA pointer to a GEOSGeometry object.

geos.GEOSGeomGetLength ⇒ number

Computes the length of a geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a4e9f6a5bbec6edea7adba6ffac72fe48

ParamTypeDescription
geomnumberA pointer to a GEOSGeometry object.
lengthnumberA pointer to a double value that will store the result.

geos.GEOSGeomGetLength_r ⇒ number

Computes the length of a geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry pointer.
lengthnumberThe output parameter for the length value.

geos.GEOSGeomGetNumPoints ⇒ number

Returns the number of points in a geometry.

Kind: Exported member
Returns: number - The number of points, or -1 on exception.

ParamTypeDescription
gnumberThe GEOS geometry pointer.

geos.GEOSGeomGetNumPoints_r ⇒ number

Returns the number of points in a geometry.

Kind: Exported member
Returns: number - The number of points, or -1 on exception.

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

geos.GEOSGeomGetPointN ⇒ number

Return the Nth point of a LineString.

Kind: Exported member
Returns: number - A Point geometry. Caller must free with GEOSGeom_destroy(). NULL on exception or if n is out of range.

ParamTypeDescription
gnumberThe input geometry, must be a LineString.
nnumberThe index of the point to return, starting from 0.

geos.GEOSGeomGetPointN_r ⇒ number

Return the Nth point of a LineString (thread-safe version).

Kind: Exported member
Returns: number - A Point geometry. Caller must free with GEOSGeom_destroy(). NULL on exception or if n is out of range.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe input geometry, must be a LineString.
nnumberThe index of the point to return, starting from 0.

geos.GEOSGeomGetStartPoint ⇒ number

Return the first point of a LineString.

Kind: Exported member
Returns: number - A Point geometry. Caller must free with GEOSGeom_destroy(). NULL on exception.

ParamTypeDescription
gnumberThe input geometry, must be a LineString.

geos.GEOSGeomGetStartPoint_r ⇒ number

Returns the first point of a geometry.

Kind: Exported member
Returns: number - The GEOS geometry pointer of the start point, or null if the input is not a lineal geometry.
See: GEOSGeomGetStartPoint_r

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

geos.GEOSGeomGetX ⇒ number

Returns the X coordinate of a point geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
gnumberThe GEOS geometry pointer. Must be a point geometry.
xnumberThe output parameter for the X coordinate value.

geos.GEOSGeomGetX_r ⇒ number

Returns the X coordinate of a point geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry pointer. Must be a point geometry.
xnumberThe output parameter for the X coordinate value.

geos.GEOSGeomGetY ⇒ number

Returns the Y coordinate of a point geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
gnumberA pointer to a GEOSGeometry object of type Point.
valuenumberA pointer to a double where the result will be stored.

geos.GEOSGeomGetY_r ⇒ number

Returns the Y coordinate of a point geometry in a thread-safe manner.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA GEOS context handle created by GEOS_init_r().
gnumberA pointer to a GEOSGeometry object of type Point.
valuenumberA pointer to a double where the result will be stored.

geos.GEOSGeomGetZ ⇒ number

Returns the Z coordinate of a point geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
gnumberA pointer to a GEOSGeometry object of type Point.
valuenumberA pointer to a double where the result will be stored.

geos.GEOSGeomGetZ_r ⇒ number

Returns the Z coordinate of a point geometry in a thread-safe manner.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA GEOS context handle created by GEOS_init_r().
gnumberA pointer to a GEOSGeometry object of type Point.
valuenumberA pointer to a double where the result will be stored.

geos.GEOSGeomToHEX_buf ⇒ string

Converts a GEOSGeometry to a HEX-encoded WKB representation.

Kind: Exported member
Returns: string - A null-terminated string containing the HEX-encoded WKB representation of the geometry, or NULL on exception. The caller is responsible for freeing the string with GEOSFree().

ParamTypeDescription
gnumberThe geometry pointer to convert.
sizenumberA pointer to a size_t where the length of the returned string will be stored.

geos.GEOSGeomToHEX_buf_r ⇒ string

Converts a geometry to a hexadecimal representation of its WKB.

Kind: Exported member
Returns: string - A null-terminated hexadecimal string, or NULL on exception. The caller is responsible for freeing it.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe geometry to convert.
sizenumberA pointer to a size_t where the size of the returned buffer will be stored.

geos.GEOSGeomToWKB_buf ⇒ number

Converts a GEOSGeometry to a WKB representation.

Kind: Exported member
Returns: number - A pointer to a buffer containing the WKB representation of the geometry, or NULL on exception. The caller is responsible for freeing the buffer with GEOSFree().

ParamTypeDescription
gnumberThe geometry pointer to convert.
sizenumberA pointer to a size_t where the size of the returned buffer will be stored.

geos.GEOSGeomToWKB_buf_r ⇒ number

Converts a GEOSGeometry to a WKB representation using a context handle.

Kind: Exported member
Returns: number - A pointer to a buffer containing the WKB representation of the geometry, or NULL on exception. The caller is responsible for freeing the buffer with GEOSFree_r().

ParamTypeDescription
handlenumberThe context handle.pointer
gnumberThe geometry pointer to convert.
sizenumberA pointer to a size_t where the size of the returned buffer will be stored.

geos.GEOSGeomToWKT ⇒ number

Returns a Well-Known Text (WKT) representation of a GEOSGeometry.

Kind: Exported member
Returns: number - A WKT representation of the geometry.

ParamTypeDescription
geomnumberA pointer to the GEOSGeometry object.

geos.GEOSGeomToWKT_r ⇒ number

Returns a Well-Known Text (WKT) representation of a GEOSGeometry.

Kind: Exported member
Returns: number - A WKT representation of the geometry.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
geomnumberA pointer to the GEOSGeometry object.

geos.GEOSGeomType ⇒ string

Returns the type name of a geometry as a string. The possible values are: "Point", "LineString", "LinearRing", "Polygon", "MultiPoint", "MultiLineString", "MultiPolygon", "GeometryCollection".

Kind: Exported member
Returns: string - the type name of the geometry, or NULL on error

ParamTypeDescription
gnumbera pointer to a GEOSGeometry object

geos.GEOSGeomTypeId ⇒ number

Returns the type ID of a geometry.

Kind: Exported member
Returns: number - The type ID of the geometry, or -1 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a6e4b5f2c7d0b6a9a3e7b2d5f8d7f9e4c

ParamTypeDescription
gnumberThe geometry pointer to get the type ID of.

geos.GEOSGeomTypeId_r ⇒ number

Returns the type ID of a geometry.

Kind: Exported member
Returns: number - The type ID of the geometry, or -1 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a3b9d5a4f2e9b4a0c2e8a6f3b1c1d2e0b

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe geometry pointer to get the type ID of.

geos.GEOSGeomType_r ⇒ string

Returns the name of a geometry's type.

Kind: Exported member
Returns: string - The name of the geometry's type, or NULL on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9f3a3f0d6a8c7e9a0b4f2b7c6d0e5f1a

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe geometry pointer to get the type name of.

geos.GEOSGeomTypes ⏏

Geometry type number, used by functions returning or consuming geometry types.

NameValue
GEOS_POINT0
GEOS_LINESTRING1
GEOS_LINEARRING2
GEOS_POLYGON3
GEOS_MULTIPOINT4
GEOS_MULTILINESTRING5
GEOS_MULTIPOLYGON6
GEOS_GEOMETRYCOLLECTION7

Kind: Exported member
See

  • GEOSGeomType
  • GEOSGeomTypeId

geos.GEOSGeom_clone ⇒ number

Clone a geometry object with a different context handle.

Kind: Exported member
Returns: number - The pointer to the cloned geometry object, or null on exception.

ParamTypeDescription
gnumberThe pointer to the geometry object to clone.

geos.GEOSGeom_clone_r ⇒ number

Clone a geometry object.

Kind: Exported member
Returns: number - The pointer to the cloned geometry object, or null on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe pointer to the geometry object to clone.

geos.GEOSGeom_createCollection ⇒ number

Creates a geometry collection of a specified type from an array of geometries.

Kind: Exported member
Returns: number - A pointer to a GEOS geometry object representing the collection, or NULL on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a871ccb7efc6dd63162b3547fcd76c638

ParamTypeDescription
typenumberAn integer representing the geometry type, such as 1 for POINT, 4 for MULTIPOINT, etc.
geomsnumberA pointer to a list of GEOS geometry pointers.
ngeomsnumberThe number of geometries in the array.

geos.GEOSGeom_createCollection_r ⇒ number

Creates a geometry collection of a specified type from an array of geometries using a thread-safe context handle.

Kind: Exported member
Returns: number - A pointer to a GEOS geometry object representing the collection, or NULL on error.
See: https://geos.osgeo.org/doxygen/classgeos_1_1geom_1_1GeometryFactory.html#a0c8f6a2a9f5b7a3d7e5c7b0f8b6f9c0e

ParamTypeDescription
handlenumberA pointer to a GEOS context handle.
typenumberAn integer representing the geometry type, such as 1 for POINT, 4 for MULTIPOINT, etc.
geomsnumberA pointer to an array of pointers to GEOS geometry objects.
ngeomsnumberThe number of geometries in the array.

geos.GEOSGeom_createEmptyCollection ⇒ number

Creates an empty geometry collection of a given type.

Kind: Exported member
Returns: number - An empty geometry collection, or null on exception.

ParamTypeDescription
typenumberThe geometry type, one of GEOS_GEOMETRYCOLLECTION, GEOS_MULTIPOINT, GEOS_MULTILINESTRING, GEOS_MULTIPOLYGON.

geos.GEOSGeom_createEmptyCollection_r ⇒ number

Creates an empty geometry collection of a given type with a context handle.

Kind: Exported member
Returns: number - An empty geometry collection, or null on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
typenumberThe geometry type, one of GEOS_GEOMETRYCOLLECTION, GEOS_MULTIPOINT, GEOS_MULTILINESTRING, GEOS_MULTIPOLYGON.

geos.GEOSGeom_createEmptyLineString ⇒ number

Creates an empty line string geometry.

Kind: Exported member
Returns: number - A pointer to a newly allocated empty line string geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().
See: https://libgeos.org/usage/c_api/#geosgeom_createemptylinestring


geos.GEOSGeom_createEmptyLineString_r ⇒ number

Creates an empty line string geometry using a reentrant context handle.

Kind: Exported member
Returns: number - A pointer to a newly allocated empty line string geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy_r().
See: https://libgeos.org/usage/c_api/#geosgeom_createemptylinestring_r

ParamTypeDescription
handlenumberA GEOSContextHandle_t created by GEOS_init_r().

geos.GEOSGeom_createEmptyPoint ⇒ number

Creates an empty point geometry.

Kind: Exported member
Returns: number - An empty point geometry, or null on exception.


geos.GEOSGeom_createEmptyPoint_r ⇒ number

Creates an empty point geometry with a context handle.

Kind: Exported member
Returns: number - An empty point geometry, or null on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.

geos.GEOSGeom_createEmptyPolygon ⇒ number

Creates an empty polygon geometry.

Kind: Exported member
Returns: number - A pointer to a newly allocated empty polygon geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().
See: https://libgeos.org/usage/c_api/#geosgeom_createemptypolygon


geos.GEOSGeom_createEmptyPolygon_r ⇒ number

Creates an empty polygon geometry using a reentrant context handle.

Kind: Exported member
Returns: number - A pointer to a newly allocated empty polygon geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy_r().
See: https://libgeos.org/usage/c_api/#geosgeom_createemptypolygon_r

ParamTypeDescription
handlenumberA GEOSContextHandle_t created by GEOS_init_r().

geos.GEOSGeom_createLineString ⇒ number

Creates a line string geometry from a coordinate sequence.

Kind: Exported member
Returns: number - The pointer to the created geometry or NULL on exception.

ParamTypeDescription
coordSeqnumberThe pointer to the coordinate sequence.

geos.GEOSGeom_createLineString_r ⇒ number

Creates a line string geometry from a coordinate sequence.

Kind: Exported member
Returns: number - The pointer to the created geometry or NULL on exception.

ParamTypeDescription
handlenumberThe handle to the GEOS context.
coordSeqnumberThe pointer to the coordinate sequence.

geos.GEOSGeom_createLinearRing ⇒ number

Creates a linear ring geometry from a coordinate sequence. A linear ring is a line string that is both closed and simple.

Kind: Exported member
Returns: number - A pointer to a newly allocated linear ring geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
snumberA pointer to the coordinate sequence to use. Must have at least four elements and be closed.

geos.GEOSGeom_createLinearRing_r ⇒ number

Creates a linear ring geometry from a coordinate sequence.

Kind: Exported member
Returns: number - The pointer to the created geometry or NULL on exception.

ParamTypeDescription
handlenumberThe handle to the GEOS context.
coordSeqnumberThe pointer to the coordinate sequence.

geos.GEOSGeom_createPoint ⇒ number

Creates a point geometry from a coordinate sequence.

Kind: Exported member
Returns: number - A pointer to a newly allocated point geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
snumberThe pointer to a coordinate sequence to use. Must have exactly one element.

geos.GEOSGeom_createPointFromXY ⇒ number

Creates a point geometry from a pair of coordinates.

Kind: Exported member
Returns: number - A pointer to a newly allocated point geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().
Since: 3.8

ParamTypeDescription
xnumberThe X coordinate
ynumberThe Y coordinate

geos.GEOSGeom_createPointFromXY_r ⇒ number

Creates a point geometry from a pair of coordinates (reentrant).

Kind: Exported member
Returns: number - A pointer to a newly allocated point geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy_r().
Since: 3.8

ParamTypeDescription
handlenumberThe context handle topointer use.
xnumberThe X coordinate
ynumberThe Y coordinate

geos.GEOSGeom_createPoint_r ⇒ number

Creates a point geometry from a coordinate sequence (reentrant).

Kind: Exported member
Returns: number - A pointer to a newly allocated point geometry. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy_r().

ParamTypeDescription
handlenumberThe context handle topointer use.
snumberThe pointer to a coordinate sequence to use. Must have exactly one element.

geos.GEOSGeom_createPolygon ⇒ number

Creates a polygon geometry from an outer ring and an optional array of inner rings.

Kind: Exported member
Returns: number - The pointer to the created geometry or NULL on exception.

ParamTypeDescription
outerRingnumberThe pointer to the outer ring geometry.
innerRingsnumberThe pointer to an array of inner ring geometries.
numInnerRingsnumberThe number of inner rings in the array.

geos.GEOSGeom_createPolygon_r ⇒ number

Creates a polygon geometry from an outer ring and an optional array of inner rings.

Kind: Exported member
Returns: number - The pointer to the created geometry or NULL on exception.

ParamTypeDescription
handlenumberThe handle to the GEOS context.
outerRingnumberThe pointer to the outer ring geometry.
innerRingsnumberThe pointer to an array of inner ring geometries.
numInnerRingsnumberThe number of inner rings in the array.

geos.GEOSGeom_destroy ⏏

Destroys a geometry object and frees its memory.

Kind: Exported member

ParamTypeDescription
gnumberA pointer to a GEOSGeometry object.

geos.GEOSGeom_destroy_r ⏏

Destroys a GEOS geometry object.

Kind: Exported member
See: https://libgeos.org/doxygen/geos__c_8h.html#a6a7f0c9b3f9a1d0f4e5c2a7b5b3e6a8d

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry object to destroy.

geos.GEOSGeom_extractUniquePoints ⇒ number

Returns a multipoint containing all distinct vertices of input geometry g, which can be any kind of geometry.

Kind: Exported member
Returns: number - A pointer to a new GEOSGeometry object representing a multipoint, or NULL on error.

ParamTypeDescription
gnumberA pointer to a GEOSGeometry object representing any kind of geometry.

geos.GEOSGeom_extractUniquePoints_r ⇒ number

Extracts every unique point from a geometry.

Kind: Exported member
Returns: number - A geometry containing the unique points, or null on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe geometry to extract points from.

geos.GEOSGeom_getCoordSeq ⇒ number

Returns the coordinate sequence of a geometry.

Kind: Exported member
Returns: number - A pointer to the coordinate sequence, or NULL on exception.

ParamTypeDescription
gnumberThe geometry to get the coordinate sequence from.

geos.GEOSGeom_getCoordSeq_r ⇒ number

Returns the coordinate sequence of a geometry with a context handle.

Kind: Exported member
Returns: number - A pointer to the coordinate sequence, or NULL on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe geometry to get the coordinate sequence from.

geos.GEOSGeom_getCoordinateDimension ⇒ number

Get the coordinate dimension of a geometry object.

Kind: Exported member
Returns: number - The coordinate dimension of the geometry, or 0 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a3f7a6b7f8b6a3e5d2e9e4a4f5d8a0b1c

ParamTypeDescription
gnumberThe GEOS geometry pointer.

geos.GEOSGeom_getCoordinateDimension_r ⇒ number

Get the coordinate dimension of a geometry object.

Kind: Exported member
Returns: number - The coordinate dimension of the geometry, or 0 on exception.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in#L2251

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

geos.GEOSGeom_getDimensions ⇒ number

Get the inherent dimension of a geometry object, which must be less than or equal to the coordinate dimension.

Kind: Exported member
Returns: number - The inherent dimension of the geometry, or -1 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a4a2a3f2b9c7d6f9f0c8e5b4a0d6c1e7d

ParamTypeDescription
gnumberThe GEOS geometry pointer.

geos.GEOSGeom_getDimensions_r ⇒ number

Get the inherent dimension of a geometry object, which must be less than or equal to the coordinate dimension.

Kind: Exported member
Returns: number - The inherent dimension of the geometry, or -1 on exception.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in#L2245

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

geos.GEOSGeom_getPrecision ⇒ number

Get the precision of a geometry object.

Kind: Exported member
Returns: number - The precision value of the geometry object, or NaN on exception.

ParamTypeDescription
gnumberThe pointer to the geometry object to query.

geos.GEOSGeom_getPrecision_r ⇒ number

Get the precision model of a geometry.

Kind: Exported member
Returns: number - The precision model value, or 0 on exception.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in#L2239

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

geos.GEOSGeom_getUserData ⇒ string

Returns the user data associated with a geometry as a string.

Kind: Exported member
Returns: string - The user data of the geometry, or null if not set or not a string.

ParamTypeDescription
gstringA pointer to a GEOSGeometry object.

geos.GEOSGeom_getUserData_r ⇒ string

Get the user data pointer associated with a geometry.

Kind: Exported member
Returns: string - The user data pointer, or null if none is set.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gstringThe GEOS geometry object.

geos.GEOSGeom_getXMax ⇒ number

Finds the maximum X value in the geometry.

Kind: Exported member
Returns: number - 0 on exception
Since: 3.7

ParamTypeDescription
gnumberThe pointer to the input geometry
valuenumberThe pointer to place the result

geos.GEOSGeom_getXMax_r ⇒ number

Returns the maximum X coordinate of the geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in#L1652

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
gnumberThe input geometry pointer.
valuenumberThe output value.

geos.GEOSGeom_getXMin ⇒ number

Finds the minimum X value in the geometry.

Kind: Exported member
Returns: number - 0 on exception
Since: 3.7

ParamTypeDescription
gnumberThe pointer to the input geometry
valuenumberThe pointer to place the result

geos.GEOSGeom_getXMin_r ⇒ number

Finds the minimum X value in the geometry (thread-safe version).

Kind: Exported member
Returns: number - 0 on exception
Since: 3.7

ParamTypeDescription
handlenumberThe pointer to the GEOS context
gnumberThe pointer to the input geometry
valuenumberThe pointer to place the result

geos.GEOSGeom_getYMax ⇒ number

Returns the maximum Y coordinate of the geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9c6f3a7b7d4a5f3a9e8f1c6b0b4e2d9f

ParamTypeDescription
gnumberThe input geometry pointer.
valuenumberThe output value.

geos.GEOSGeom_getYMax_r ⇒ number

Returns the maximum Y coordinate of the geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.
See: https://github.com/libgeos/geos/blob/main/capi/geos_c.h.in#L1655

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
gnumberThe input geometry pointer.
valuenumberThe output value.

geos.GEOSGeom_getYMin ⇒ number

Finds the minimum Y value in the geometry.

Kind: Exported member
Returns: number - 0 on exception
Since: 3.7

ParamTypeDescription
gnumberThe pointer to the input geometry
valuenumberThe pointer to place the result

geos.GEOSGeom_getYMin_r ⇒ number

Finds the minimum Y value in the geometry (thread-safe version).

Kind: Exported member
Returns: number - 0 on exception
Since: 3.7

ParamTypeDescription
handlenumberThe pointer to the GEOS context
gnumberThe pointer to the input geometry
valuenumberThe pointer to place the result

geos.GEOSGeom_releaseCollection ⇒ number

Release the sub-geometries of a collection for management. by the caller. The input collection remains as an empty collection, that the caller is responsible for destroying. The output geometries are also the responsibility of the caller, as is the containing array, which must be freed with GEOSFree().

Kind: Exported member
Returns: number - A newly allocated array of GEOSGeometry pointers.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9a7624d6406f501856cfb1e60a30f4fa

ParamTypeDescription
collectionnumberA pointer to a GEOS geometry collection object.
ngeomsnumberA pointer to a variable that will be filled with the size of the output array.

geos.GEOSGeom_releaseCollection_r ⇒ number

Release the sub-geometries of a collection for management. by the caller. The input collection remains as an empty collection, that the caller is responsible for destroying. The output geometries are also the responsibility of the caller, as is the containing array, which must be freed with GEOSFree().

Kind: Exported member
Returns: number - A newly allocated array of GEOSGeometry pointers.
See: https://libgeos.org/doxygen/geos__c_8h.html#a9a7624d6406f501856cfb1e60a30f4fa

ParamTypeDescription
handlenumberA pointer to a GEOS context handle.
collectionnumberA pointer to a GEOS geometry collection object.
ngeomsnumberA pointer to a variable that will be filled with the size of the output array.

geos.GEOSGeom_setPrecision ⇒ number

Set the precision of a geometry object with a different context handle.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
gnumberThe pointer to the geometry object to modify.
precisionnumberThe precision value to set, or 0.0 for full precision.
flagsnumberThe flags to control the behavior of the function. See https://libgeos.org/doxygen/geos__c_8h.html for details.

geos.GEOSGeom_setPrecision_r ⇒ number

Set the precision of a geometry object.

Kind: Exported member
Returns: number - 1 on success, 0 on exception.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe pointer to the geometry object to modify.
precisionnumberThe precision value to set, or 0.0 for full precision.
flagsnumberThe flags to control the behavior of the function. See https://libgeos.org/doxygen/geos__c_8h.html for details.

geos.GEOSGeom_setUserData ⏏

Set the user data pointer associated with a geometry. The user is responsible for freeing the memory of the user data pointer.

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry object.
userDatastringThe user data pointer to be set.

geos.GEOSGeom_setUserData_r ⏏

Set the user data pointer associated with a geometry. The user is responsible for freeing the memory of the user data pointer.

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry object.
userDatastringThe user data pointer to be set.