-
Notifications
You must be signed in to change notification settings - Fork 599
Add minimum_width function for GEOS minimum diameter support #2313
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
base: main
Are you sure you want to change the base?
Add minimum_width function for GEOS minimum diameter support #2313
Conversation
d274e12
to
0e05716
Compare
@sgillies Can you please approve the workflows for my most recent changes? |
Pull Request Test Coverage Report for Build 17449330353Details
💛 - Coveralls |
@sgillies Thoughts on merging this? |
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.
@adriancaruana apologies for the slow follow-up, and thanks a lot for the PR!
This is a nice addition, just a few minor comments on the tests
shapely/constructive.py
Outdated
by two parallel lines. This is also known as the minimum diameter. | ||
|
||
For most geometry types, this function returns a LineString representing | ||
the minimum width line segment. For degenerate cases (points), it may |
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.
Straight lines are also such an example of a degenerate case?
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.
So quickly testing with your PR, it seems that even in the case of points, a 0-length Linestring gets returned?
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.
Good catch. I've reconsidered this, and IMHO, the behaviour of this function should match GEOS,
which always returns a LineString. I'm happy to discuss if you disagree thouguh.
314b6eb
to
5f694b2
Compare
Add support for GEOS Minimum Diameter/Width functionality
See #2312.