Function simplify_polyline::simplify
source · [−]pub fn simplify<T: ExtendedNumOps>(
points: &[Point<T>],
tolerance: f64,
high_quality: bool
) -> Vec<Point<T>>Expand description
Simplifies a polyline within a given tolerance.
Arguments
tolerance: A distance measurement used for both radial distance and Douglas–Peucker – the higher the tolerance, the more points will be removed from the polyline.high_quality: Controls the algorithm(s) to be used in simplificationtrue: this will take the entire array of points and simplify using the Douglas–Peucker algorithm.false: the list of points are first filtered using a simple radial distance algorithm, and then passed to the the Douglas-Peucker algorithm for final simplification.