-
Notifications
You must be signed in to change notification settings - Fork 370
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
rHEALPix projection #1008
rHEALPix projection #1008
Conversation
lib/cartopy/crs.py
Outdated
if north_square not in valid_square: | ||
raise ValueError('north_square must be one of {}'.format(valid_square)) | ||
if south_square not in valid_square: | ||
raise ValueError('south_square must be one of {}'.format(valid_square)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (83 > 79 characters)
lib/cartopy/crs.py
Outdated
super(rHEALPix, self).__init__(proj4_params) | ||
|
||
# Boundary is based on units of m, with a standard spherical ellipse. | ||
# The hard-coded scale is the reason for not accepting the globe keyword. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (81 > 79 characters)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to update the list of projections in the documentation.
lib/cartopy/tests/test_crs.py
Outdated
@@ -225,6 +225,24 @@ def test_utm(self): | |||
decimal=1) | |||
|
|||
|
|||
def test_rHEALPix_defaults(): | |||
crs = ccrs.rHEALPix() | |||
assert sorted(crs.proj4_params.items()) == [('ellps', 'WGS84'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just assert a dictionary equality.
b9e497e
to
9071bcd
Compare
Seems to be a bug in the south square in the docs. |
Seem so. I'll try digging a little - strange as it works for me. |
The docs don't even build for python2 ....
|
Python 2 docs seem to be okay again. |
I'm definitely seeing the issue with the south pole box reproducibly on my machine now. Any point I hover over in the south pole box tells me it is 90N, so clearly a coordinate transformation issue. My problem has been diagnosing - I'm now struggling to actually install a working version so that I can start bisecting the issue to find the root cause. For that reason, let's put this PR on hold until I can realistically pick it back up again. (I may close the PR if that gets too long) |
….4 (master / v6.0). Xref: OSGeo/PROJ#1207.
I've just updated this PR on the back of fixing the bug introduced to Proj.4. Images, and the fix I applied to Proj.4 can be found at OSGeo/PROJ#1207 (comment). The update therefore includes both the Healpix and the RectangularHealpix projections. As far as I could tell, cartopy won't actually compile against v4.9.0 of Proj (it has to be 4.9.1, I think) - I've also added the flag that we should continue to use the deprecated proj API for its next release (v6). #1140 is the issue tracking the update to the new API. |
I'm going to close this, as there were other changes needed to make this work in newer versions of Cartopy. I've opened up a new PR #2458 with these two projections added. |
Relates to #882. (picture available there)