clean_linestring

Function clean_linestring 

Source
pub fn clean_linestring<P: GetXY + SetXY + Clone + PartialEq>(
    line: &[P],
    is_poly: bool,
    eps: Option<f64>,
    clean_wgs84: bool,
) -> Option<Vec<P>>
Expand description

Removes superfluous/collinear points from a linestring

§Parameters

  • line: the linestring to clean
  • eps: the toleranc to check if the segments are superfluous/collinear. Defaults to 1e-12
  • clean_wgs84: if true, clean WGS84 points to be valid WGS84 points

§Returns

The cleaned linestring