Skip to content

geos.GEOSTopologyPreserveSimplify ⇒ 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. Returns a valid output geometry, checking for collapses, ring-intersections, etc and attempting to avoid. More computationally expensive than GEOSSimplify()

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.GEOSTopologyPreserveSimplify_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. Returns a valid output geometry, checking for collapses, ring-intersections, etc and attempting to avoid. More computationally expensive than GEOSSimplify()

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.