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().
Param | Type | Description |
---|---|---|
g | GEOSGeometry | The input geometry |
tolerance | number | The 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().
Param | Type | Description |
---|---|---|
handle | GEOSContextHandle_t | - |
g | GEOSGeometry | The input geometry |
tolerance | number | The tolerance to apply. Larger tolerance leads to simpler output. |