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

ENH: Add support for transforming bounds at the poles #962

Merged
merged 1 commit into from Sep 24, 2021

Conversation

snowman2
Copy link
Member

@snowman2 snowman2 commented Sep 24, 2021

Script:

from pyproj import CRS, Transformer
crs = CRS("EPSG:32661")
tr = Transformer.from_crs(crs, 4326, always_xy=True)
bounds = tr.transform_bounds(*crs.area_of_use.bounds, direction="INVERSE")
print(crs)
print(crs.area_of_use.bounds)
print(bounds)
print(tr.transform_bounds(*bounds))
crs = CRS("EPSG:32761")
tr = Transformer.from_crs(crs, 4326, always_xy=True)
bounds = tr.transform_bounds(*crs.area_of_use.bounds, direction="INVERSE")
print(crs)
print(crs.area_of_use.bounds)
print(bounds)
print(tr.transform_bounds(*bounds))

Current version (3.2.1)

EPSG:32661
(-180.0, 60.0, 180.0, 90.0)
(-1371213.7625429356, -1405880.71737131, 5371213.762542935, 5405880.71737131)
(-180.0, 48.65640565307887, 174.85815802748752, 60.292277663390834)
EPSG:32761
(-180.0, -90.0, 180.0, -60.0)
(-1371213.7625429356, -1405880.71737131, 5371213.762542935, 5405880.71737131)
(-174.8581580274875, -60.292277663390834, 180.0, -48.65640565307887)

With this PR:

EPSG:32661
(-180.0, 60.0, 180.0, 90.0)
(-1371213.7625429356, -1405880.71737131, 5371213.762542935, 5405880.71737131)
(-180.0, 48.65640565307887, 180.0, 90.0)
EPSG:32761
(-180.0, -90.0, 180.0, -60.0)
(-1371213.7625429356, -1405880.71737131, 5371213.762542935, 5405880.71737131)
(-180.0, -90.0, 180.0, -48.65640565307887)

@snowman2 snowman2 added this to In progress in 3.3.0 Release via automation Sep 24, 2021
@codecov
Copy link

codecov bot commented Sep 24, 2021

Codecov Report

Merging #962 (1be2e27) into master (c714f59) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #962   +/-   ##
=======================================
  Coverage   96.23%   96.23%           
=======================================
  Files          20       20           
  Lines        1753     1753           
=======================================
  Hits         1687     1687           
  Misses         66       66           
Impacted Files Coverage Δ
pyproj/transformer.py 94.68% <ø> (ø)

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 c714f59...1be2e27. Read the comment docs.

@snowman2 snowman2 force-pushed the transform_bounds branch 2 times, most recently from ecf21e5 to dfc2151 Compare September 24, 2021 02:21
@snowman2 snowman2 merged commit 0daf375 into pyproj4:master Sep 24, 2021
3.3.0 Release automation moved this from In progress to Done Sep 24, 2021
@snowman2 snowman2 deleted the transform_bounds branch September 24, 2021 21:18
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.

None yet

1 participant