-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to disable Douglas-Peucker simplification algorithm in GeoJSONSource #1101
Comments
@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 Setup detailsLineString control points:
GeoJSONSource settingsvar source = GeoJSONSource()
source.tolerance = 0 LineLayer settingsvar lineLayer = LineLayer(id: "line")
lineLayer.lineColor = .constant(StyleColor(.red))
lineLayer.lineWidth = .constant(5) Expected resultIt's made using |
Hi @ZiZasaurus, is there any updates regarding this topic or maybe a workaround? |
@ZiZasaurus, is there any new developments? |
Hi @ZiZasaurus |
@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 to
0
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.
The text was updated successfully, but these errors were encountered: