Skip to content

Conversation

adriancaruana
Copy link

Add support for GEOS Minimum Diameter/Width functionality

See #2312.

@adriancaruana adriancaruana force-pushed the feature/minimum-diameter branch from d274e12 to 0e05716 Compare August 26, 2025 22:22
@adriancaruana adriancaruana marked this pull request as ready for review August 26, 2025 22:40
@adriancaruana
Copy link
Author

@sgillies Can you please approve the workflows for my most recent changes?

@coveralls
Copy link

coveralls commented Aug 27, 2025

Pull Request Test Coverage Report for Build 17449330353

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 86.135%

Totals Coverage Status
Change from base Build 17092746745: 0.3%
Covered Lines: 2659
Relevant Lines: 3087

💛 - Coveralls

@adriancaruana
Copy link
Author

@sgillies Thoughts on merging this?

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a 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

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
Copy link
Member

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?

Copy link
Member

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?

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants