-
Notifications
You must be signed in to change notification settings - Fork 363
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
Add support for CompoundCRS #1227
Conversation
I couldn't find a |
e0209b0
to
92a2291
Compare
92a2291
to
8ab2616
Compare
8ab2616
to
c2b183d
Compare
Do I need to do something to fix the appveyor problem? Or is #1224 tackling this? |
lib/cartopy/_epsg.py
Outdated
@@ -41,7 +41,9 @@ class _EPSGProjection(ccrs.Projection): | |||
def __init__(self, code): | |||
import pyepsg | |||
projection = pyepsg.get(code) | |||
if not isinstance(projection, pyepsg.ProjectedCRS): | |||
if not (isinstance(projection, pyepsg.ProjectedCRS) or | |||
(hasattr(pyepsg, 'CompoundCRS') and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be extremely tempted to update pyepsg dependency to >=0.4
. Relevant locations : https://github.com/SciTools/cartopy/blob/master/requirements/epsg.txt and https://github.com/SciTools/cartopy/blob/master/INSTALL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump the dependency and simplify this logic? Happy to do so if that's what you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go for it (bump and simplify).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to worry about appveyor yet (it is a shame it is failing - needs reconfiguring).
This is essentially good to go. If you have an inclination to bump the minimum version dep, do it. Otherwise, I'd merge anyway. 👍
Should be good to go now. 👍 |
Great, thanks @rhattersley. And welcome back to cartopy contributions 👍 😉 |
Nice to be back 😉 |
Rationale
Allow Cartopy to make use of EPSG codes that define a compound CRS.
See rhattersley/pyepsg#10.
Implications
A projection can now be created using an EPSG code for a compound CRS, whereas previously it would have raised an error.