This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Compare absolute value of polygon ring area #7621
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
springmeyer
added
the
⚠️ DO NOT MERGE
Work in progress, proof of concept, or on hold
label
Jan 7, 2017
@springmeyer, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @ansis and @tmpsantos to be potential reviewers. |
springmeyer
changed the title
[TESTING] Compare absolute value of polygon ring area
Compare absolute value of polygon ring area
Jan 7, 2017
springmeyer
added
✓ ready for review
and removed
⚠️ DO NOT MERGE
Work in progress, proof of concept, or on hold
labels
Jan 7, 2017
jfirebaugh
suggested changes
Jan 7, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test?
Yes, will plan to work on a testcase. Juggling a few other things right now, so anyone feel free to jump in here to help as well with help on testing. |
springmeyer
force-pushed
the
abs-area-compare
branch
from
February 9, 2017 01:13
0a16ac9
to
7784866
Compare
- This ensures we actually keep the largest polygons - Adds testcase that fails without this patch
springmeyer
force-pushed
the
abs-area-compare
branch
from
February 9, 2017 02:56
349a18f
to
95397c6
Compare
Testcase now in place. I think this is ready to merge /cc @jfirebaugh. |
jfirebaugh
approved these changes
Feb 9, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @springmeyer!
Adding this change to the iOS and macOS changelogs in #8011. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves native to match JS which compares unsigned areas when limiting polygon rings (https://github.com/mapbox/mapbox-gl-js/blob/fddba1b48e7e65b821ef7c7c3813f03baa8abf9d/js/util/classify_rings.js#L19)
This is important. Currently we compare signed area which means we incorrectly sort polygons before limiting.
Fixes various rendering issues like the coast of sweden:
Before:
After: