-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
[BUG] Polygon simplification may produce invalid polygons #1965
Comments
one thing to add is that previously polygon simplification did not create "bad" polygons. Sometimes it makes sense to render long thin polygons as a single line (or even a single point for roughly round shaped polygons!). rendering less polygons can help with performance, but ive found that not rendering polygons of less than 2 leads to a feeling of pop-in, especially with higher simplification values. |
after some basic testing it seems like the error causes one polygon to have a chunk extend to the next. here is a sample geojson that i have seen the issue with. A few things to note. It is very possible (almost certain) this is not spec compliant. secondly, the error does not occur when simplification is off. I plan to make a reproducible example soon, and also a PR to fix it. I just haven't had the time to do it all right now. One thing that i saw during my limited testing is that it appears to happen when polygons get simplified to less than 3 points. Another thing to note is that it happens with normal polygons and multi-polyons |
might be due to flutter sdk? i was on beta version (3.27), but moved to stable (3.24.5), and now the issue is gone |
to the best of my knowledge, this appears to be a flutter sdk issue. There are lots of new issues being tracked related to 3.27, specifically due to crashes and rendering bugs. I am going to close the issue in flutter map, as i believe it is the flutter SDK causing these artifacts. They appear entirely gone immediately after switching to 3.24.5 stable with zero code changes example here: flutter/flutter#160522 |
What is the bug?
Some
Polygon
s are not simplified correctly, and result in a polygon formed from less than 3 points. This results in long straight lines appearing on the map.How can we reproduce it?
Any polygons which are small enough to be reduced down to less than 3 points should cause the issue.
Do you have a potential solution?
Either avoid displaying polygons with less than 3 points, or prevent the simplification from returning invalid polygons.
Platforms
All
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
The text was updated successfully, but these errors were encountered: