Перейти до основного вмісту

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.

ParameterTypeDescription
pointsSequence[Point]Sequence of (x, y) points.
tolerancefloatSimplification tolerance.
ReturnsPolygon