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

rHEALPix projection #1008

Closed
wants to merge 6 commits into from
Closed

rHEALPix projection #1008

wants to merge 6 commits into from

Conversation

pelson
Copy link
Member

@pelson pelson commented Jan 11, 2018

Relates to #882. (picture available there)

lib/cartopy/crs.py Outdated Show resolved Hide resolved
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))

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)

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.

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)

Copy link
Member

@QuLogic QuLogic left a 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/_crs.pyx Show resolved Hide resolved
lib/cartopy/_trace.cpp Show resolved Hide resolved
@@ -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'),
Copy link
Member

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.

@pelson pelson force-pushed the healpix branch 2 times, most recently from b9e497e to 9071bcd Compare January 12, 2018 13:40
@QuLogic
Copy link
Member

QuLogic commented Jan 13, 2018

Seems to be a bug in the south square in the docs.

@pelson
Copy link
Member Author

pelson commented Jan 17, 2018

Seems to be a bug in the south square in the docs.

https://25-5282596-gh.circle-artifacts.com/0/root/project/docs/build/html/crs/projections.html#rhealpix

The bug

Seem so. I'll try digging a little - strange as it works for me.

@pelson
Copy link
Member Author

pelson commented Jan 17, 2018

The docs don't even build for python2 ....

reading sources... [ 17%] crs/projections
/root/project/lib/cartopy/mpl/feature_artist.py:136: UserWarning: Unable to determine extent. Defaulting to global.
  warnings.warn('Unable to determine extent. Defaulting to global.')
No handlers could be found for logger "shapely.geos"
Makefile:47: recipe for target 'html' failed
make: *** [html] Segmentation fault
Exited with code 2

@QuLogic
Copy link
Member

QuLogic commented Feb 22, 2018

Python 2 docs seem to be okay again.

@pelson
Copy link
Member Author

pelson commented Feb 23, 2018

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)

lib/cartopy/crs.py Outdated Show resolved Hide resolved
lib/cartopy/crs.py Outdated Show resolved Hide resolved
lib/cartopy/tests/crs/test_healpix.py Outdated Show resolved Hide resolved
lib/cartopy/tests/crs/test_healpix.py Outdated Show resolved Hide resolved
lib/cartopy/tests/crs/test_healpix.py Outdated Show resolved Hide resolved
lib/cartopy/tests/crs/test_rectangularhealpix.py Outdated Show resolved Hide resolved
lib/cartopy/tests/crs/test_rectangularhealpix.py Outdated Show resolved Hide resolved
lib/cartopy/tests/crs/test_rectangularhealpix.py Outdated Show resolved Hide resolved
@pelson
Copy link
Member Author

pelson commented Dec 26, 2018

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.

@greglucas
Copy link
Contributor

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.

@greglucas greglucas closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants