Open merindorium opened 2 years ago
@merindorium thank you for reporting this. To bette assist you, can you please provide a sample geojson, as well as a screenshot of how you expect the geometry to appear?
Hi @ZiZasaurus, thanks for the quick response!
GeoJSON - geometry.txt
It's created using LineString(coordinates).bezier()
function.
The result of this setup is:
It's made using Metal
and CustomLayerHost
from https://docs.mapbox.com/ios/maps/guides/migrate-to-v10/#custom-rendered-layers
Hi @ZiZasaurus, is there any updates regarding this topic or maybe a workaround?
@ZiZasaurus, is there any new developments?
Hi @ZiZasaurus So I've looked at the public sources and found this algorithm in the Turf Swift package. But it looks like it is not used. At least the breakpoint doesn't work and disabling the simplification doesn't work either. Why tho? Is there another implementation in the private part? Is there any way you could expose more arguments to the public API? Or am I missing something here and we already could modify the simplification behavior?
@ZiZasaurus, is there any update regarding this issue?
New Feature
Add ability to disable Douglas-Peucker simplification algorithm in
GeoJSONSource
.Why
We are trying to draw high precision (< 50cm) geospatial geometry (e.g. lines, arcs, splines) but Douglas-Peucker algorithm simplifies it to lines.
We've found out that the
tolerance
parameter ofGeoJSONSource
drives this algorithm. Setting this parameter to0
fixes the issue a little bit, but the final geometry looks noisy. The algorithm still applies some simplification.It's crucial for our app to draw precise geometry. That's why it would be very handy to have the ability to disable the simplification algorithm.