Repository navigation
FIX: use shoelace formula for input polygons - #2741
Merged
Merged
Conversation
Member
Author
|
I do not understand the MacOS failure, but I also do not think it is related to this change as it has to do with creating a |
greglucas
approved these changes
Sep 14, 2026
greglucas
left a comment
Contributor
There was a problem hiding this comment.
It looks like there is another one in patch.py, should we apply it there too?
Member
Author
|
I'm inclined to leave the one in |
Contributor
|
Ahh yes, I forgot that was deprecated. Sounds good! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rationale
Following #2665, also use the more robust shoelace formula when checking the direction of polygons before we transform them.
Fixes #2312. In that example, when projecting the data before calling
contourfwe getIf we call
contourfon the original data, withmainwe getand with this branch we get
I wrote this branch back in April and saw 179 test failures. Those are now gone, but I have not tracked down why. I checked what happened if I apply the change to the commit just before #2653, but that also passed. Edit: it's possible I was running with proj 9.8 so was mistaken that the branch caused the failures.
Implications