-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Polygon overlaps itself doesn't show normally #4962
Comments
@ddimaria it use two or more polyons, but here it is just one polygon.. |
This is a technical limitation — we currently have no way to properly triangulate invalid self-intersecting polygons. |
Hello @mourner , could you please describe the |
@huangyingjie there is no fast, stable algorithm for triangulating non-simple (self-intersecting) polygons. For triangulation, we use https://github.com/mapbox/earcut, which is very fast, but assumes that polygons do not self-intersect. We clean up all self-intersections in our vector tiles, but don't do so yet in JavaScript when rendering GeoJSON sources. Detecting and resolving self-intersections is a very hard problem, which I started exploring in https://github.com/mapbox/polysnap project, but haven't finished yet. |
Problem and code
When Change the zoom:
What's my expectation
Why not forbid overlapping?
I shall do this later, but there was too much data overlaps; and customers ask to show as my description before.
The text was updated successfully, but these errors were encountered: