raygeo.geo.algo.simplify
Polyline simplification using the Ramer-Douglas-Peucker algorithm.
Reduces the number of points in a polyline while preserving the overall shape within a given tolerance.
Functions
simplify_polyline()
simplify_polyline(points: Sequence[Point], tolerance: float) -> Polygon
Simplify a polyline using the Ramer-Douglas-Peucker algorithm.
Returns: Simplified point sequence.
| Parameter | Type | Description |
|---|---|---|
points | Sequence[Point] | Sequence of (x, y) points. |
tolerance | float | Simplification tolerance. |
| Returns | Polygon |