Expand description
unique(&mut g) — collapse consecutive duplicate points.
Mirrors boost::geometry::unique from
boost/geometry/algorithms/unique.hpp. Boost uses std::unique
and walks the same kind hierarchy as reverse. Per-kind:
Linestring,Ring→Vec::dedupon the backing vecPolygon→ dedup outer + every inner ringMultiLinestring→ dedup each memberMultiPolygon→ dedup each member polygon
Two points are equal iff every coordinate matches. Boost uses ==
on the coordinate type, which for floats is exact equality; we
mirror that via Point::get per
dimension, driven by geometry_trait::fold_dims.
Functions§
- unique
- Collapse runs of coordinate-equal consecutive points in
g.