-
Notifications
You must be signed in to change notification settings - Fork 216
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
CRS classmethods changed to staticmethods #847
Comments
This is how datacube does it: ref. |
Side note: if you use proj = pyproj.Proj("+proj=etmerc +ellps=GRS80 +lon_0=13 +lat_0=2 +x_0=0 +y_0=0 +k_0=1")
crs = myCRS(proj.crs) |
Other methods to consider:
Also, need to ensure these methods still work with:
|
Thanks for reviewing. OK i can see that in some cases There's also something semantically clear that's lost when always doing through the generic
So I've handled that situation elsewhere in the following way:
I'm happy to add changes from explicit
Those classes seem to all call That said, calling old behavior:
new behavior:
This makes sense: it basically calls What would be the correct behavior here? Should this be a separate issue? Rough guess at the answer: |
I think that it would be better to remove |
That would make sense. |
Probably fine to keep it connected here as changes made here will impact them. |
This will break |
Have a potential solution in #902 |
At some point pyproj used classmethods for constructor-type methods in pyproj.crs.CRS. In this commit this was changed to use staticmethods. The linked issue does not seem to mention this change (unless I missed it). In any case, this change effectively breaks subclassing, as in this example:
Expected Output
expect:
what you get:
Environment Information
Any ( we had been using pyproj v2.4.1, and just upgraded to 3.0.1)
Installation method
build from source
The text was updated successfully, but these errors were encountered: