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

BUG: Mercator A defined only for lat_0 = 0 #1095

Merged
merged 1 commit into from Jul 7, 2022

Conversation

kdpenner
Copy link
Contributor

@kdpenner kdpenner commented Jul 4, 2022

Raises CRSError if latitude_natural_origin != 0.

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #1095 (563b2fe) into main (ab942b2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 563b2fe differs from pull request most recent head 783b1ad. Consider uploading reports for the commit 783b1ad to get more accurate results

@@           Coverage Diff           @@
##             main    #1095   +/-   ##
=======================================
  Coverage   96.14%   96.15%           
=======================================
  Files          20       20           
  Lines        1792     1794    +2     
=======================================
+ Hits         1723     1725    +2     
  Misses         69       69           
Impacted Files Coverage Δ
pyproj/crs/coordinate_operation.py 99.14% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab942b2...783b1ad. Read the comment docs.

@snowman2
Copy link
Member

snowman2 commented Jul 5, 2022

Thanks @kdpenner 👍

  • Thoughts on adding a reference link in the docstrings?
  • Mind adding a test checking the CRSError is raised to ensure this behavior remains consistent in the future?
def test_mercator_a_non_zero_lat_0():
    with pytest.raises(CRSError):
         ProjectedCRS(conversion=MercatorAConversion(1, 2, 3, 4))
  • Also, once you are complete, would you like to squash your commits? Or would you mind if I squash on merge?

@snowman2 snowman2 added this to In progress in 3.4.0 Release via automation Jul 5, 2022
@kdpenner
Copy link
Contributor Author

kdpenner commented Jul 5, 2022

You're welcome!

Thoughts on adding a reference link in the docstrings?

I'm on board, I'll add one in the incoming (squashed) commit.

Mind adding a test checking the CRSError is raised to ensure this behavior remains consistent in the future?

A test is here:

def test_mercator_a_operation__invalid_lat0():

I like the explicit keyword argument (vs. (1, 2, 3, 4)) because latitude_natural_origin != 0 is the unsupported call.

Also, once you are complete, would you like to squash your commits? Or would you mind if I squash on merge?

Will squash.

@snowman2 snowman2 changed the title Mercator A defined only for lat_0 = 0 BUG: Mercator A defined only for lat_0 = 0 Jul 7, 2022
@snowman2 snowman2 merged commit c0ad848 into pyproj4:main Jul 7, 2022
3.4.0 Release automation moved this from In progress to Done Jul 7, 2022
@snowman2
Copy link
Member

snowman2 commented Jul 7, 2022

Thanks @kdpenner 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Transformer with MercatorAConversion with lat/lon of natural origin returns ProjError
2 participants