Skip to content

geos.GEOSisValid ⇒ number ⏏ ​

Check the validity of the provided geometry.

Kind: global property of geos
Returns: number - 1 on true, 0 on false, 2 on exception

ParamTypeDescription
gGEOSGeometryThe geometry to test

geos.GEOSisValidDetail ⇒ number ⏏ ​

In one step, calculate and return the validity, the human readable validity reason and a point at which validity rules are broken. Caller has the responsibility to destroy 'reason' with GEOSFree() and 'location' with GEOSGeom_destroy()

Kind: global property of geos
Returns: number - 1 when valid, 0 when invalid, 2 on exception

ParamTypeDescription
gGEOSGeometryThe geometry to test
flagsnumberA value from the GEOSValidFlags enum
reasonPointerA pointer in which the reason string will be places
locationGEOSGeometryA pointer in which the location GEOSGeometry will be placed

geos.GEOSisValidDetail_r ⇒ number ⏏ ​

In one step, calculate and return the validity, the human readable validity reason and a point at which validity rules are broken. Caller has the responsibility to destroy 'reason' with GEOSFree() and 'location' with GEOSGeom_destroy()

Kind: global property of geos
Returns: number - 1 when valid, 0 when invalid, 2 on exception

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe geometry to test
flagsnumberA value from the GEOSValidFlags enum
reasonPointerA pointer in which the reason string will be places
locationGEOSGeometryA pointer in which the location GEOSGeometry will be placed

geos.GEOSisValidReason ⇒ StringPointer ⏏ ​

Return the human readable reason a geometry is invalid, "Valid Geometry" string otherwise, or NULL on exception.

Kind: global property of geos
Returns: StringPointer - A string with the reason, NULL on exception. Caller must GEOSFree() their result.

ParamTypeDescription
gGEOSGeometryThe geometry to test

geos.GEOSisValidReason_r ⇒ StringPointer ⏏ ​

Return the human readable reason a geometry is invalid, "Valid Geometry" string otherwise, or NULL on exception.

Kind: global property of geos
Returns: StringPointer - A string with the reason, NULL on exception. Caller must GEOSFree() their result.

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe geometry to test

geos.GEOSisValid_r ⇒ number ⏏ ​

Check the validity of the provided geometry.

Kind: global property of geos
Returns: number - 1 on true, 0 on false, 2 on exception

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe geometry to test