Skip to content

geos.GEOSSimplify ⇒ GEOSGeometry

Apply the Douglas/Peucker algorithm to the coordinate sequences of the input geometry. Removes "unnecessary" vertices, vertices that are co-linear within the tolerance distance.

Kind: global property of geos
Returns: GEOSGeometry - The simplified geometry Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
gGEOSGeometryThe input geometry
tolerancenumberThe tolerance to apply. Larger tolerance leads to simpler output.

geos.GEOSSimplify_r ⇒ GEOSGeometry

Apply the Douglas/Peucker algorithm to the coordinate sequences of the input geometry. Removes "unnecessary" vertices, vertices that are co-linear within the tolerance distance.

Kind: global property of geos
Returns: GEOSGeometry - The simplified geometry Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
gGEOSGeometryThe input geometry
tolerancenumberThe tolerance to apply. Larger tolerance leads to simpler output.