Skip to content
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

Check custom proj projection strings have the correct +axis=... parameter before mapping #398

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

ortk95
Copy link
Owner

@ortk95 ortk95 commented Sep 13, 2024

If a custom proj projection string is used when mapping, check the string's +axis parameter is consistent with the positive longitude direction of the body. I.e. positive west bodies should have +axis=wnu and positive east bodies should have +axis=enu. If the wrong +axis parameter is used, then the output map is likely to be flipped and therefore incorrect, so PlanetMapper now raises a ProjStringError exception if the positive longitude direction and +axis parameters are inconsistent.

Also updated relevant documentation to suggest using create_proj_string, which automatically generates the correct +axis parameter for the body.

Closes #397

Pull request checklist

  • Add a clear description of the change
  • Add any new tests needed
  • Run spell check on new text visible to user (documentation, GUI etc.)
  • Check any changes to requirements.txt are reflected in setup.py and conda-forge feedstock
  • Check code passes CI checks (run run_ci.sh or check GitHub Actions)

See CONTRIBUTING.md for more details.

@ortk95 ortk95 merged commit 5c60142 into dev Sep 13, 2024
35 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10847283847

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 99.618%

Totals Coverage Status
Change from base Build 10470286746: 0.001%
Covered Lines: 3163
Relevant Lines: 3175

💛 - Coveralls

@ortk95 ortk95 deleted the 397-warn-inconsistent-proj-axis branch September 13, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants