Skip to content

rHEALPix projection#1008

Closed
pelson wants to merge 6 commits into
SciTools:mainfrom
pelson:healpix
Closed

rHEALPix projection#1008
pelson wants to merge 6 commits into
SciTools:mainfrom
pelson:healpix

Conversation

@pelson

@pelson pelson commented Jan 11, 2018

Copy link
Copy Markdown
Member

Relates to #882. (picture available there)

Comment thread lib/cartopy/crs.py Outdated
Comment thread 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))

Copy link
Copy Markdown

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)

Comment thread 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.

Copy link
Copy Markdown

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)

@QuLogic QuLogic left a comment

Copy link
Copy Markdown
Member

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.

Comment thread lib/cartopy/_crs.pyx
Comment thread lib/cartopy/_trace.cpp
Comment thread lib/cartopy/tests/test_crs.py Outdated

def test_rHEALPix_defaults():
crs = ccrs.rHEALPix()
assert sorted(crs.proj4_params.items()) == [('ellps', 'WGS84'),

Copy link
Copy Markdown
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

QuLogic commented Jan 13, 2018

Copy link
Copy Markdown
Member

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

@pelson

pelson commented Jan 17, 2018

Copy link
Copy Markdown
Member Author

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

pelson commented Jan 17, 2018

Copy link
Copy Markdown
Member Author

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

QuLogic commented Feb 22, 2018

Copy link
Copy Markdown
Member

Python 2 docs seem to be okay again.

@pelson

pelson commented Feb 23, 2018

Copy link
Copy Markdown
Member Author

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)

Comment thread lib/cartopy/crs.py Outdated
Comment thread lib/cartopy/crs.py Outdated
Comment thread lib/cartopy/tests/crs/test_healpix.py Outdated
Comment thread lib/cartopy/tests/crs/test_healpix.py Outdated
Comment thread lib/cartopy/tests/crs/test_healpix.py Outdated
Comment thread lib/cartopy/tests/crs/test_rectangularhealpix.py Outdated
Comment thread lib/cartopy/tests/crs/test_rectangularhealpix.py Outdated
Comment thread lib/cartopy/tests/crs/test_rectangularhealpix.py Outdated
@pelson

pelson commented Dec 26, 2018

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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