-
Notifications
You must be signed in to change notification settings - Fork 359
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
Gridliner inline label projection hard-coded for WGS84 #1902
Comments
That makes it seem like all inline grid labels would have to be in lat/lon coordinates currently. I'm not entirely clear why the crs transform the user inputs with the gridliner isn't used for that. A PR to address this would be welcome! |
We obviously don't test any inconsistent globes very much. Changing to the CRS doesn't break any test at all, but seems the right thing to do. |
Thanks for getting this fixed! Sorry for the radio silence; I noticed I had made a mistake in my description of the problem and wanted to get to the bottom of it. It turns out that it's not so much that proj objects to transformations with different geodetic systems or ellipsoids (the same reproducer appears to work fine specifying an Earth ellipsoid known to proj) but actually due to a heuristic it uses to classify ellipsoids. The error is thrown after checking equality of The following traceback snippet shows how our newly-created ellipsoid gets its celestialBody:
The relevant line of I realise this information probably isn't very useful for the (now-solved) problem at hand, but it seemed like a good idea to document it here for future reference. |
Description
Calling
cartopy.crs.Projection.gridlines()
with a CRS using a non-WGS84Globe
and withx_inline=True
raises an exception during drawing, apparently due togridliner.py:800
: when either axis is specified as inline, the transform used comes from a newly-instantiatedPlateCarree
projection with a defaultGlobe
(i.e., a WGS84 globe).The raised exception message is
ProjError: Error creating Transformer from CRS.: (Internal Proj Error: proj_create_operations: Source and target ellipsoid do not belong to the same celestial body)
.Code to reproduce
Traceback
Full environment definition
Operating system
Fedora 35
Cartopy version
v0.20.0, but appears to be an issue on master.
The text was updated successfully, but these errors were encountered: