pub fn simplify<G, P>(g: &G, max_distance: f64) -> Linestring<P>where
G: Linestring<Point = P>,
P: Point<Scalar = f64> + PointMut + Default + Copy,
<<P as Point>::Cs as CoordinateSystem>::Family: SameAs<CartesianFamily>,Expand description
Return a Douglas–Peucker-simplified copy of the linestring g.
Vertices whose perpendicular distance to the chord between their
retained neighbours is below max_distance are dropped; the first
and last vertices are always kept.
Mirrors boost::geometry::simplify(linestring, max_distance) from
boost/geometry/algorithms/simplify.hpp.