Open AJueling opened 5 years ago
CartoPy relies on PROJ extensively, so all of this is going to largely depend on what's in PROJ.
Thank you, that's what I thought after looking through the code. If I opened a issue with PROJ, would cartopy need the rotated projection (with the square standing on its side, as shown above) in addition to the original Adams World in a Square II projection (where the square rests on a corner)? Spilhaus is the same projection with different parameters (e.g. the poles are in Asia and South America) and that is subsequently rotated.
(from page 95 of Snyder, J. P. and Voxland, P. M. (1989). An Album of Map Projections. https://doi.org/10.3133/pp1453)
Yes, the rotation would need to be handled by PROJ.
There is an open issue over at PROJ: OSGeo/PROJ#1851
Based on this comment there seems to be a Python implementation here. Would this be a suitable starting point to get this projection added to cartopy? (Pale)oceanographers would rejoice :)
@mdaeron Currently, all of Cartopy's projections are based on the PROJ library. You are welcome to take on trying to refactor to avoid this, or to make a new pure Python class outside that class hierarchy, but I have no idea how much work is involved.
My advice from above stands: add Spilhaus to the PROJ C library, then Cartopy can easily wrap it.
The Spilhaus projection displays the world ocean as a continuous water mass around Antarctica with the other (highly distorted) continents acting as the map's boundary. I think it would be a great addition to cartopy's functionality especially for oceanographers.
Here is a nice write up of the history of the projection with potential starting points for the implementation: ArcGIS storymap on Spilhaus projection
(image from aforementioned ArcGIS link)
If I see it correctly, we would need the Adams World Projection in a Square II implemented in PROJ (ref. Adams, O. S. (1929). Conformal Projection of the Sphere Within a Square. Washington: [U.S. Coast and Geodetic Survey Special Publication 153: ftp://ftp.library.noaa.gov/docs.lib/htdocs/rescue/cgs_specpubs/QB275U35no1531929.pdf). Is that correct? Further, can cartopy rotate the resulting projection 45 degrees or does that need to be implemented on the PROJ side?