-
Notifications
You must be signed in to change notification settings - Fork 101
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
Fixed mishandling of conversion to utm when forcing a zone letter #35
Open
zplett
wants to merge
2
commits into
Turbo87:master
Choose a base branch
from
ShotSpotter:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
==========================================
- Coverage 95% 93.12% -1.88%
==========================================
Files 3 3
Lines 160 160
==========================================
- Hits 152 149 -3
- Misses 8 11 +3
Continue to review full report at Codecov.
|
Closed
sdhiscocks
added a commit
to sdhiscocks/utm
that referenced
this pull request
Mar 28, 2020
Logic in from_latlon has been changed to be similar to to_latlon, including adding a force_northern option to mirror northern option in to_latlon. This resolves the issue with northing coordinate incorrectly being set when pasing in -ve or +ve latitude when forcing northern or southern zone respectively. Closes Turbo87#35 - alternative fix for issue.
sdhiscocks
added a commit
to sdhiscocks/utm
that referenced
this pull request
Aug 23, 2020
Logic in from_latlon has been changed to be similar to to_latlon, including adding a force_northern option to mirror northern option in to_latlon. This resolves the issue with northing coordinate incorrectly being set when pasing in -ve or +ve latitude when forcing northern or southern zone respectively. Closes Turbo87#35 - alternative fix for issue.
sdhiscocks
added a commit
to sdhiscocks/utm
that referenced
this pull request
Nov 10, 2020
Logic in from_latlon has been changed to be similar to to_latlon, including adding a force_northern option to mirror northern option in to_latlon. This resolves the issue with northing coordinate incorrectly being set when pasing in -ve or +ve latitude when forcing northern or southern zone respectively. Closes Turbo87#35 - alternative fix for issue.
sdhiscocks
added a commit
to sdhiscocks/utm
that referenced
this pull request
Feb 15, 2021
Logic in from_latlon has been changed to be similar to to_latlon, including adding a force_northern option to mirror northern option in to_latlon. This resolves the issue with northing coordinate incorrectly being set when pasing in -ve or +ve latitude when forcing northern or southern zone respectively. Closes Turbo87#35 - alternative fix for issue.
heathhenley
pushed a commit
to heathhenley/utm
that referenced
this pull request
Oct 21, 2024
Logic in from_latlon has been changed to be similar to to_latlon, including adding a force_northern option to mirror northern option in to_latlon. This resolves the issue with northing coordinate incorrectly being set when pasing in -ve or +ve latitude when forcing northern or southern zone respectively. Closes Turbo87#35 - alternative fix for issue.
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.
Prior to this change, when converting from latitude and longitude to utm, if the coordinate's native utm zone is on one hand of the equator and the user tried to force it into a utm zone across the equator, the library wasn't adding 10000000 to the northing value as it should since it was only doing that for negative latitude values. Similarly if a coordinate started in the southern hemisphere in latitude and longitude, and was coerced to the northern hemisphere, the northing would have 10000000 added to its value which isn't what should happen. Fixed this issue by changing:
elif negative(latitude): northing += 10000000
to:
elif zone_letter <= "M": northing += 10000000