-
Notifications
You must be signed in to change notification settings - Fork 565
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
Raise ValueError for non-finite distance to buffer/offset_curve #1522
Conversation
Pull Request Test Coverage Report for Build 3204158908
💛 - Coveralls |
On the other hand, now it is inconsistent with the top-level vectorized functions .. (I think it can certainly be fine to deviate in some cases in the Geometry subclasses, since it can be specialized for the scalar use case, but it should be a conscious decision) |
Oh right, here it is. A few observations: the second parameter is either Also one of the examples has Lastly, forgot to mention upstream libgeos/geos#663 which would change messaging/behavior. |
Ah, good catch, that's another inconsistency I didn't note in #1276. Using
My preference is that we keep returning None. In general when adding those to pygeos, we have been following the idea that But at the same time, I think we could also certainly consider 1) being more strict for scalar geometry class methods, and 2) making the above behaviour configurable with some keyword. |
3faf926
to
9b01f4e
Compare
9b01f4e
to
3c648f3
Compare
I think this is ready to go, as it addresses single geometry operations which should behave differently than the vectorized functions with respect to NaN values (used for missing). Further work with the vectorized functions should follow, as discussed above. |
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.
Thanks!
Similar to #1516 for
maint-1.8
, raise ValueError for non-finite distance values passed to buffer or offset_curve (aka parallel_offset) functions.Previous behavior for shapely-2.0 did not crash (as it did for 1.8), but would be inconsistent: