Skip to content

Conversation

@skygering
Copy link
Collaborator

Cleaning up and adding in the wrapper of DelaunyTriangulation's voronoi function such that it returns GeoInterface polygons.

@skygering skygering requested a review from asinghvi17 October 27, 2025 14:10
Comment on lines 61 to 78
# @testset "Voronoi with custom boundary" begin
# # Create points inside a square
# points = [(0.25, 0.25), (0.75, 0.25), (0.75, 0.75), (0.25, 0.75), (0.5, 0.5)]

# # Create a square boundary
# boundary = GI.Polygon([
# GI.LinearRing([(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0), (0.0, 0.0)])
# ])

# polygons = GO.voronoi(points, boundary)
# @test length(polygons) == 5

# # All polygons should be valid
# for poly in polygons
# @test GI.isgeometry(poly)
# @test GI.geomtrait(poly) isa GI.PolygonTrait
# end
# end
Copy link
Member

Choose a reason for hiding this comment

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

Did this test fail? What was the issue here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah! These were commented out on your branch and I didn't look at them. I will work on that later and update the PR

Copy link
Member

Choose a reason for hiding this comment

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

Oops! My implementation must not have been working then. I'll try to get it to work with DelaunayTriangulation's api then.

@skygering
Copy link
Collaborator Author

Okay I had to add some more advanced clean up for the clip_polygon inputs due to this bug/requirement: JuliaGeometry/DelaunayTriangulation.jl#229

Thoughts though? Look good to go @asinghvi17?

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