Skip to content
On this page

geos.GEOSClipByRect ⇒ number

Clips a geometry by a rectangular extent.

Kind: Exported member
Returns: number - The clipped geometry or NULL on exception Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
gnumberA pointer to a GEOSGeometry object.
xminnumberThe minimum x-coordinate of the clipping rectangle.
yminnumberThe minimum y-coordinate of the clipping rectangle.
xmaxnumberThe maximum x-coordinate of the clipping rectangle.
ymaxnumberThe maximum y-coordinate of the clipping rectangle.

geos.GEOSClipByRect_r ⇒ number

Clips a geometry by a rectangular extent, using a thread-safe context handle.

Kind: Exported member
Returns: number - The clipped geometry or NULL on exception Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handlenumberA pointer to a GEOSContextHandle_t object.
gnumberA pointer to a GEOSGeometry object.
xminnumberThe minimum x-coordinate of the clipping rectangle.
yminnumberThe minimum y-coordinate of the clipping rectangle.
xmaxnumberThe maximum x-coordinate of the clipping rectangle.
ymaxnumberThe maximum y-coordinate of the clipping rectangle.