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 IncrementalDelaunayTriangulator to ensure triangulation boundary is convex #1004

Merged
merged 16 commits into from
Aug 29, 2023

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Aug 24, 2023

This adds logic to IncrementalDelaunayTriangulator to ensure that the triangulation boundary is always convex (as per specification). This is required because the "frame" created to contain the triangulation construction is not infinitely distant from the input points. This has been causing robustness failures in cases where a site lies very close to the convex hull of the input.

The logic required is additional checks when determining whether to flip an edge to maintain the Delaunay condition :

  • If the edge is part of a frame triangle, do not flip it (a frame triangle is one of the 3 containing a frame edge)
  • If the edge contains a frame vertex AND it creates a concavity in the triangulation boundary, flip it
  • If an edge separates the newly inserted point from a frame vertex, do not flip it.

The reason this code was not included in the original development of IncrementalDelaunayTriangulator is that it is not mentioned in most descriptions of the algorithm. The logic is described in this blog post, and also appears in the triangle code (lines 8592-8614).

This is a more robust solution than the frame size increase in #931.

Fixes #1002.
Fixes #477.

Also fixes various issues reported for ConcaveHull ( libgeos/geos#719, libgeos/geos#946)

@dr-jts dr-jts changed the title Fix IncrementalDelaunayTriangulator logic for handling frame Fix IncrementalDelaunayTriangulator to ensure triangulation boundary is convex Aug 29, 2023
@dr-jts dr-jts merged commit 7a9602e into locationtech:master Aug 29, 2023
2 checks passed
@dr-jts dr-jts deleted the fix-delaunay-frame-logic branch August 29, 2023 23:32
@jodygarnett jodygarnett added this to the 1.20.0 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IncrementalDelaunayTriangulator needs logic to handle frame Delaunay Triangulation has missing edges
2 participants