Skip to content
On this page

geos.GEOSMinimumClearance ⇒ number

Computes the minimum clearance distance of a geometry. The minimum clearance distance is the smallest distance between any pair of points in the geometry.

Kind: Exported member
Returns: number - 1 on success, 0 on exception or if no such distance exists (e.g. for an empty or point geometry).

ParamTypeDescription
gnumberThe input geometry pointer.
distnumberA pointer to store the result distance, or NULL if not needed.

geos.GEOSMinimumClearanceLine ⇒ number

Computes the minimum clearance line of a geometry. The minimum clearance line is a line connecting two points in the geometry that have the minimum clearance distance between them.

Kind: Exported member
Returns: number - A pointer to a LineString containing two points defining the minimum clearance line segment, or NULL on exception or if no such line exists (e.g. for an empty or point geometry).

ParamTypeDescription
gnumberThe input geometry pointer.

geos.GEOSMinimumClearanceLine_r ⇒ number

Computes the minimum clearance line of a geometry in a reentrant way. The minimum clearance line is a line connecting two points in the geometry that have the minimum clearance distance between them.

Kind: Exported member
Returns: number - A pointer to a LineString containing two points defining the minimum clearance line segment, or NULL on exception or if no such line exists (e.g. for an empty or point geometry).

ParamTypeDescription
handlenumberThe context handle pointer to use for error reporting.
gnumberThe input geometry pointer.

geos.GEOSMinimumClearance_r ⇒ number

Computes the minimum clearance of a geometry. The minimum clearance is the smallest amount by which a vertex of a geometry can be moved to produce an invalid 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

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry to compute the clearance for.
dnumberThe output parameter for the clearance value.