Skip to content

geos.GEOSMakeValid ⇒ GEOSGeometry

Repair an invalid geometry, returning a valid output.

Kind: global property of geos
Returns: GEOSGeometry - The repaired geometry. Caller must free with GEOSGeom_destroy().

ParamTypeDescription
gGEOSGeometryThe geometry to repair

geos.GEOSMakeValidParams_create_r ⇒ GEOSMakeValidParams

Create a GEOSMakeValidParams to hold the desired parameters to control the algorithm and behavior of the validation process.

Kind: global property of geos
Returns: GEOSMakeValidParams - a parameter object

ParamTypeDescription
extHandleGEOSContextHandle_t-

geos.GEOSMakeValidParams_destroy ⇒ null

Destroy a GEOSMakeValidParams.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
parmsGEOSMakeValidParamsthe object to destroy

geos.GEOSMakeValidParams_destroy_r ⇒ null

Destroy a GEOSMakeValidParams.

Kind: global property of geos
Returns: null - void

ParamTypeDescription
handleGEOSContextHandle_t-
parmsGEOSMakeValidParamsthe object to destroy

geos.GEOSMakeValidParams_setKeepCollapsed ⇒ number

When this parameter is nn-zero, the GEOS_MAKE_VALID_STRUCTURE method will keep components that have collapsed into a lower dimensionality. For example, a ring collapsing to a line, or a line collapsing to a point.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSMakeValidParams-
keepCollapsednumber-

geos.GEOSMakeValidParams_setKeepCollapsed_r ⇒ number

When this parameter is nn-zero, the GEOS_MAKE_VALID_STRUCTURE method will keep components that have collapsed into a lower dimensionality. For example, a ring collapsing to a line, or a line collapsing to a point.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSMakeValidParams-
stylenumber-

geos.GEOSMakeValidParams_setMethod ⇒ number

Set the GEOSMakeValidMethods to use in making the geometry valid.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
pGEOSMakeValidParams-
methodGEOSMakeValidMethods-

geos.GEOSMakeValidParams_setMethod_r ⇒ number

Set the GEOSMakeValidMethods to use in making the geometry valid.

Kind: global property of geos
Returns: number - 0 on exception, 1 on success.

ParamTypeDescription
handleGEOSContextHandle_t-
pGEOSMakeValidParams-
methodGEOSMakeValidMethods-

geos.GEOSMakeValidWithParams ⇒ GEOSGeometry

Repair an invalid geometry, returning a valid output, using the indicated GEOSMakeValidMethods algorithm and options.

Kind: global property of geos
Returns: GEOSGeometry - A repaired geometry. Caller must free with GEOSGeom_destroy().

ParamTypeDescription
gGEOSGeometryis the geometry to test.
makeValidParamsGEOSMakeValidParamsis a GEOSMakeValidParams with the desired parameters set on it.

geos.GEOSMakeValidWithParams_r ⇒ GEOSGeometry

Repair an invalid geometry, returning a valid output, using the indicated GEOSMakeValidMethods algorithm and options.

Kind: global property of geos
Returns: GEOSGeometry - A repaired geometry. Caller must free with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryis the geometry to test.
makeValidParamsGEOSMakeValidParamsis a GEOSMakeValidParams with the desired parameters set on it.

geos.GEOSMakeValid_r ⇒ GEOSGeometry

Repair an invalid geometry, returning a valid output.

Kind: global property of geos
Returns: GEOSGeometry - The repaired geometry. Caller must free with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe geometry to repair