Skip to content
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

Fix buffer Inverted Ring Removal check #1056

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Mar 15, 2024

This fixes the BufferCurveSetBuilder.isRingCurveInverted check to avoid removing a class of raw offset curves which are in fact valid buffer curves.

The check was introduced in locationtech/jts#706 and improved in locationtech/jts#878 (ported as 85ead60). But the issues reported in #984 revealed that there were still valid cases being removed incorrectly.

Fixes #984

@dr-jts dr-jts added the Bug label Mar 15, 2024
@@ -250,13 +250,20 @@ class GEOS_DLL LineSegment {
//
/// @param ret will be set to the midpoint of the segment
///
void midPoint(Coordinate& ret) const
Coordinate midPoint() const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using CoordinateXY anywhere we are not accessing z.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

@dr-jts dr-jts merged commit 6c1a7ce into libgeos:main Mar 19, 2024
28 of 30 checks passed
@dr-jts dr-jts deleted the fix-buffer-inverted-ring-check branch March 19, 2024 00:03
dr-jts added a commit that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Negative buffer operation returns EMPTY geometry
2 participants