-
Notifications
You must be signed in to change notification settings - Fork 215
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
pyproj.CRS.from_cf
deviates from CF standard guidelines
#401
Comments
Thanks for the report, we will definitely take this into consideration on future iterations. Current design reasoning:
Potential solution:Use PROJ JSON to modify the CRS with the specified parameters PROJ JSON PR. This will likely need to be a |
I think it might be worthwhile to issue warnings in future versions. Even though it's the behavior specified by CF, it might be good to notify the user that the CF grid mapping parameters are overriding what's been provided in the CRS WKT. |
@benjwadams, I attempted to make the CRS better represented by using the WKT form of the projection. However, if the CF version of the coordinate system is not properly able to be supported within That being said, I think adding a documentation page about how to be fully CF compliant in respect to this issue would be a good addition and will resolve this issue as sensibly as possible (i.e. how to build the coordinate system yourself and compare the CRS generated from the CF parameters versus the CRS generated from the WKT). |
Just had a CF breakout session & we all agreed upon the wording change: cf-convention/cf-conventions#222 (comment) If accepted, that means that the current behavior of |
Closing with this comment: cf-convention/cf-conventions#222 (comment) |
Code Sample, a copy-pastable example if possible
Problem description
http://cfconventions.org/cf-conventions/cf-conventions.html#use-of-the-crs-well-known-text-format mentions
pyproj.CRS.from_cf
instead looks for thecrs_wkt
attribute and if it is found, only returns the CRS generated from that.pyproj/pyproj/crs.py
Lines 602 to 627 in ca68a21
This contradicts the CF standard, which states that the individual, more specific parameters should override the
crs_wkt
values if there are differences between the two.Expected Output
Environment Information
python -c "import pyproj; pyproj.show_versions()"
Installation method
pip
The text was updated successfully, but these errors were encountered: