-
Notifications
You must be signed in to change notification settings - Fork 124
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
upgrade_shapely_2.0_fix #731
Conversation
with shapely 2.0 MultiPolygon is not iterable anymore
I think that there is a more fundamental issue here. The This was never correct, even before the 2.0 upgrade for shapely. The tests for
I suggest to rename the kwarg to Note that this issue also affects the climada_python/climada/entity/exposures/base.py Lines 463 to 480 in 4d8fa43
geometry argument in the Exposures.from_raster function, and propose to change this argument to geometries , as well.
|
@tovogt Excellent! 🥇 Many thanks for the profound analysis. Your suggestions make a lot of sense. I think I'm just going to implement them. |
I've reversed the check for While at it, I changed the default values for many arguments in these methods to I didn't change the argument names, reluctant to alter the signature without being forced to. 🤷 Bottom line: nothing has changed, the PR is reduced to cosmetics. |
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 would have a tiny suggestion how to clean up the code. But since it only affects the tests, it's not really important. The rest is fine with me.
Thanks, looks good! |
Changes proposed in this PR:
.geoms
attribute asmask
argument in case ofMultiPolygon
This PR fixes CLIMADA-project/climada_petals#79
PR Author Checklist
develop
)PR Reviewer Checklist