Simplify a line string using the Douglas-Peucker algorithm.
coords
Float64Array
[lng0,lat0, lng1,lat1, ...]
tolerance
0.0001
Returns simplified Float64Array [lng0,lat0, ...] preserving the first and last points.
[lng0,lat0, ...]
Simplify a line string using the Douglas-Peucker algorithm.
Arguments
coords: FlatFloat64Array[lng0,lat0, lng1,lat1, ...].tolerance: Simplification tolerance in radians. For typical geographic data,0.0001≈ ~11 m at the equator.Returns simplified
Float64Array[lng0,lat0, ...]preserving the first and last points.