Skip to content

Conversation

greglucas
Copy link
Contributor

@greglucas greglucas commented Oct 23, 2024

Rationale

This adds the HEALPix and rHEALPix projections from PROJ to Cartopy.
https://proj.org/en/9.4/operations/projections/healpix.html
https://proj.org/en/9.4/operations/projections/rhealpix.html

This replaces #1008 and allows for flexible globes/radii as well.

closes #882
closes #1008
closes #2133

@greglucas
Copy link
Contributor Author

For class names, do we want Healpix() or HEALPix()? Similarly for the rectangular version, do we want Rectangular spelled out, or is RHEALPix as I've put it ok?

@rcomer
Copy link
Member

rcomer commented Oct 23, 2024

Also closes #2133 I think.

@lgolston
Copy link
Contributor

Always enjoy seeing new projections be added! For the name, I would vote for HEALPix() and rHEALPix().

instance_args = SPECIFIC_PROJECTION_KWARGS.get(prj, {})

prj_inst, instance_repr = create_instance(prj, instance_args)
try:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I added this here because I don't have PROJ 9.6 installed locally, so this didn't work when instantiated. Maybe there is a better way to approach this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I decided to upgrade my local PROJ and rebuild this file instead. I think it is valuable to keep the Spilhaus image in there. I'm not sure if there is still a better way to do this and allow building this file without all of the projections available...

@greglucas
Copy link
Contributor Author

Always enjoy seeing new projections be added! For the name, I would vote for HEALPix() and rHEALPix().

I think I prefer the capitalization of "R" to indicate it is a class in Python by common convention, even if PROJ does lowercase it. Any other votes/preferences on naming?

I think this is ready for review again, and I added in a review comment about the doc build process when someone doesn't have the latest PROJ installed.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Cubic map projection Projection extension - Gnomonic cubed-sphere
5 participants