w8r / geojson2svg

Render geojson into SVG using inline or external stylesheet
https://w8r.github.io/geojson2svg/demo/
MIT License
66 stars 10 forks source link

Add path simplification option #3

Open w8r opened 7 years ago

w8r commented 7 years ago

through @mourner's Douglas-Peucker simplification algorithm read it from styles as a parameter also maybe add method for that

blanchg commented 3 years ago

All you need to do is import @turfjs/simplify then do it on the input to the render

features = simplify(features, { tolerance: 0.02});
let svg = renderer.type('type').render(features);