Repository navigation
Fix simplification of short antimeridian crossings - #68
Merged
Merged
Conversation
Owner
|
Hi! Thank you for this bug fix. I noticed there was a misplaced line in the README, which I have removed. Other than that: LGTM! |
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.
Bug
simplify()projects longitude by subtracting the start longitude directly. For a short straight track with longitudes179.9, 180, -179.9at latitude 0, that treats the endpoint displacement as -359.8 degrees instead of +0.2 degrees. The intermediate collinear point is consequently retained even with a 5 metre tolerance. The same problem occurs for westbound crossings and either spelling of the dateline (180or-180).Fix
Normalize each local longitude displacement to [-pi, pi) before applying the existing equirectangular projection. This keeps the current small-track projection and public API, while handling the longitude seam correctly. This does not claim to support globally winding tracks or change the existing projection's large-extent limitations.
Regression coverage and validation
prek run --all-fileshooks passed on Python 3.13, including Ruff, the five type checkers and generated CLI documentation.Prepared with AI assistance; the regression failure and full validation were run against a local checkout using synthetic coordinates only.