Skip to main content

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: collections.abc.Sequence[types.Point], tolerance: float) -> types.Polygon

Simplify a polyline using the Ramer-Douglas-Peucker algorithm.

Returns: Simplified point sequence.

ParameterTypeDescription
pointscollections.abc.Sequence[types.Point]Sequence of (x, y) points.
tolerancefloatSimplification tolerance.
Returnstypes.Polygon