Skip to main content

Module simplify

Module simplify 

Source
Expand description

Line simplification — Douglas–Peucker.

Mirrors boost::geometry::strategy::simplify::douglas_peucker<P, DistStr> from boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp. Recursive split: for the current point range, find the vertex furthest from the chord between the endpoints; if that distance is below max_distance, drop all interior vertices; otherwise split at the furthest vertex and recurse on the two halves.

The strategy is agnostic in Boost — it accepts any point-to-segment distance kernel, so the same recursion works in Cartesian, spherical, and geographic coordinate systems. This port ships the Cartesian flavour first, keyed on crate::PointToSegment<crate::Pythagoras>.

Structs§

DouglasPeucker
Douglas–Peucker line simplification.
VisvalingamWhyatt
Visvalingam–Whyatt area-ranked line simplification.
VisvalingamWhyattPreserve
Topology-preserving Visvalingam–Whyatt line simplification.

Traits§

SimplifyStrategy
A strategy for simplifying a geometry.