Skip to content
On this page

geos.GEOSPrepare ⇒ number

Creates a prepared geometry from a regular geometry.

Kind: Exported member
Returns: number - A GEOSPreparedGeometry pointer, or NULL on exception.

ParamTypeDescription
gnumberA GEOSGeometry pointer.

geos.GEOSPrepare_r ⇒ number

Creates a prepared geometry from a regular geometry, with a context handle.

Kind: Exported member
Returns: number - A GEOSPreparedGeometry pointer, or NULL on exception.

ParamTypeDescription
handlenumberA GEOSContextHandle pointer.
gnumberA GEOSGeometry pointer.

geos.GEOSPreparedContains ⇒ number

Tests whether a prepared geometry contains another geometry.

Kind: Exported member
Returns: number - 1 if prepGeom1 contains geom2, 0 if not, or -1 on error.

ParamTypeDescription
prepGeom1numberThe pointer to the prepared geometry object that is the potential container.
geom2numberThe pointer to the geometry object that is the potential containee.

geos.GEOSPreparedContainsProperly ⇒ number

Tests whether a prepared geometry properly contains another geometry. Proper containment means that the test geometry is contained in the interior of the target geometry, and does not intersect its boundary.

Kind: Exported member
Returns: number - 1 if prepGeom1 properly contains geom2, 0 if not, or -1 on error.

ParamTypeDescription
prepGeom1numberThe pointer to the prepared geometry object that is the potential container.
geom2numberThe pointer to the geometry object that is the potential containee.

geos.GEOSPreparedContainsProperly_r ⇒ number

Tests whether a prepared geometry properly contains another geometry. Proper containment means that the test geometry is contained in the interior of the target geometry, and does not intersect its boundary.

Kind: Exported member
Returns: number - 1 if prepGeom1 properly contains geom2, 0 if not, or -1 on error.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
prepGeom1numberThe pointer to the prepared geometry object that is the potential container.
geom2numberThe pointer to the geometry object that is the potential containee.

geos.GEOSPreparedContains_r ⇒ number

Tests whether a prepared geometry contains another geometry.

Kind: Exported member
Returns: number - 1 if prepGeom1 contains geom2, 0 if not, or -1 on error.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
prepGeom1numberThe pointer to the prepared geometry object that is the potential container.
geom2numberThe pointer to the geometry object that is the potential containee.

geos.GEOSPreparedCoveredBy ⇒ number

Tests whether a geometry is covered by another geometry.

Kind: Exported member
Returns: number - 1 if g2 is covered by pg1, 0 if not, -1 on exception.

ParamTypeDescription
pg1numberA pointer to a prepared geometry.
g2numberA pointer to a geometry.

geos.GEOSPreparedCoveredBy_r ⇒ number

Tests whether a geometry is covered by another geometry, using a GEOS context handle.

Kind: Exported member
Returns: number - 1 if g2 is covered by pg1, 0 if not, -1 on exception.

ParamTypeDescription
handlenumberA GEOS context handle.
pg1numberA pointer to a prepared geometry.
g2numberA pointer to a geometry.

geos.GEOSPreparedCovers ⇒ number

Tests whether a geometry covers another geometry.

Kind: Exported member
Returns: number - 1 if pg1 covers g2, 0 if not, -1 on exception.

ParamTypeDescription
pg1numberA pointer to a prepared geometry.
g2numberA pointer to a geometry.

geos.GEOSPreparedCovers_r ⇒ number

Tests whether a geometry covers another geometry, using a GEOS context handle.

Kind: Exported member
Returns: number - 1 if pg1 covers g2, 0 if not, -1 on exception.

ParamTypeDescription
handlenumberA GEOS context handle.
pg1numberA pointer to a prepared geometry.
g2numberA pointer to a geometry.

geos.GEOSPreparedCrosses ⇒ number

Tests whether a geometry crosses another geometry.

Kind: Exported member
Returns: number - 1 if pg1 crosses g2, 0 if not, -1 on exception.

ParamTypeDescription
pg1numberA pointer to a prepared geometry.
g2numberA pointer to a geometry.

geos.GEOSPreparedCrosses_r ⇒ number

Computes whether the given geometries cross.

Kind: Exported member
Returns: number - 1 if the geometries cross, 0 if they do not, or -1 on error.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
pg1numberThe first prepared geometry.
g2numberThe second geometry.

geos.GEOSPreparedDisjoint ⇒ number

Computes whether the given geometries are disjoint.

Kind: Exported member
Returns: number - 1 if the geometries are disjoint, 0 if they are not, or -1 on error.

ParamTypeDescription
pg1numberThe first prepared geometry.
g2numberThe second geometry.

geos.GEOSPreparedDisjoint_r ⇒ number

Computes whether the given geometries are disjoint.

Kind: Exported member
Returns: number - 1 if the geometries are disjoint, 0 if they are not, or -1 on error.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
pg1numberThe first prepared geometry.
g2numberThe second geometry.

geos.GEOSPreparedDistance ⇒ number

Computes the distance between two geometries using a prepared geometry for the first argument.

Kind: Exported member
Returns: number - 1 if the distance was computed successfully, 0 otherwise, or -1 on error.

ParamTypeDescription
pg1numberA pointer to the prepared geometry to compute the distance from.
g2numberA pointer to the geometry to compute the distance to.
distnumberA pointer to a double variable to store the distance result.

geos.GEOSPreparedDistanceWithin ⇒ number

Tests whether the distance between a prepared geometry and another geometry is within a specified distance.

Kind: Exported member
Returns: number - 1 if the geometries are within the distance, 0 if not, or -1 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a6f5a0b7f6f9e3a9c4b0b8a3c1a4d4e6d

ParamTypeDescription
prepnumberA pointer to a GEOS prepared geometry object.
g2numberA pointer to a GEOS geometry object.
distnumberA double value representing the distance threshold.

geos.GEOSPreparedDistanceWithin_r ⇒ number

Computes the distance between a prepared geometry and another geometry, and checks if it is within a given tolerance.

Kind: Exported member
Returns: number - 1 if the geometries are within the given distance of each other, 0 if not, or -1 on error.
See: https://libgeos.org/doxygen/geos__c_8h.html#a3a9f7c0b6f9b2c6a0e3f4f5a7d8b9e5d

ParamTypeDescription
ctxnumberA GEOS context handle.
prepnumberA pointer to a prepared GEOS geometry object.
gnumberA pointer to a GEOS geometry object.
tolerancenumberA non-negative distance value.

geos.GEOSPreparedDistance_r ⇒ number

Computes the distance between two geometries using a prepared geometry for the first argument and a GEOS context handle.

Kind: Exported member
Returns: number - 1 if the distance was computed successfully, 0 otherwise, or -1 on error.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
pg1numberA pointer to the prepared geometry to compute the distance from.
g2numberA pointer to the geometry to compute the distance to.
distnumberA pointer to a double variable to store the distance result.

geos.GEOSPreparedGeom_destroy ⏏

Destroys a prepared geometry.

Kind: Exported member

ParamTypeDescription
gnumberA GEOSPreparedGeometry pointer.

geos.GEOSPreparedGeom_destroy_r ⏏

Destroys a prepared geometry object.

Kind: Exported member

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
prepGeomnumberThe pointer to the prepared geometry object to be destroyed.

geos.GEOSPreparedIntersects ⇒ number

Computes whether the given geometries intersect.

Kind: Exported member
Returns: number - 1 if the geometries intersect, 0 if they do not, or -1 on error.

ParamTypeDescription
pg1numberThe first prepared geometry.
g2numberThe second geometry.

geos.GEOSPreparedIntersects_r ⇒ number

Computes whether the given geometries intersect.

Kind: Exported member
Returns: number - 1 if the geometries intersect, 0 if they do not, or -1 on error.

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
pg1numberThe first prepared geometry.
g2numberThe second geometry.

geos.GEOSPreparedNearestPoints ⇒ number

Computes the nearest points of two geometries.

Kind: Exported member
Returns: number - A pointer to a coordinate sequence containing the nearest points, or NULL on error.

ParamTypeDescription
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedNearestPoints_r ⇒ number

Computes the nearest points of two geometries using a GEOS context handle.

Kind: Exported member
Returns: number - A pointer to a coordinate sequence containing the nearest points, or NULL on error.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedOverlaps ⇒ number

Tests whether two geometries overlap.

Kind: Exported member
Returns: number - 1 if the geometries overlap, 0 if not, -1 on exception.

ParamTypeDescription
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedOverlaps_r ⇒ number

Tests whether two geometries overlap, using a context handle.

Kind: Exported member
Returns: number - 1 if the geometries overlap, 0 if not, -1 on exception.

ParamTypeDescription
handlenumberThe context handle.pointer
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedTouches ⇒ number

Tests whether two geometries touch at one or more points.

Kind: Exported member
Returns: number - 1 if the geometries touch, 0 if not, -1 on exception.

ParamTypeDescription
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedTouches_r ⇒ number

Tests whether two geometries touch at one or more points, using a context handle.

Kind: Exported member
Returns: number - 1 if the geometries touch, 0 if not, -1 on exception.

ParamTypeDescription
handlenumberThe context handle.pointer
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedWithin ⇒ number

Tests whether the first geometry is within the second geometry.

Kind: Exported member
Returns: number - 1 if the first geometry is within the second geometry, 0 if not, -1 on exception.

ParamTypeDescription
pg1numberA pointer to the first prepared geometry.
g2numberA pointer to the second geometry.

geos.GEOSPreparedWithin_r ⇒ number

Tests whether a geometry is within another geometry.

Kind: Exported member
Returns: number - 1 if pg1 is within g2, 0 otherwise, or -1 on error.

ParamTypeDescription
handlenumberThe GEOS context pointer handle.
pg1numberA pointer to the prepared geometry to test.
g2numberA pointer to the geometry to test against.