Closed doc-E-brown closed 3 months ago
Thanks so much for your thorough review @RobWalt! I'll work through them and have an update soon.
Hi @RobWalt sorry for the delay, I've updated the PR as per your comments. It definitely looks much cleaner! Thanks!
Hey, sorry for leaving this unattended for so long. I kind of forgot about it and lost track of it. Here's my new suggestion: The PR is kind of big. Could we split it up into two parts?
@doc-E-brown @RobWalt Apologies, I thought I had already asked this question: given that we already depend on spade
– which provides Voronoi tessellation (though we haven't exposed it via geo
) and Delaunay triangulation, and have an ear-cut triangulation module. As it stands, I can't imagine merging this PR:
This PR adds the
VoronoiDiagram
trait to create Voronoi diagrams fromPolygon
andMultiPoint
types. The Voronoi diagram is created using the property that voronoi diagrams are the dual of delaunay triangulation.The
VoronoiDiagram
trait uses an addedTriangulateDelaunay
trait that computes Delaunay triangles without any additional dependencies. As per the conversation here this work was started before the introduction of the spade methodology. As requested in the conversation I've added a bench performance test to compare the different methods and these are the results when running on my laptop.the
TriangulateDelaunay
trait is faster then theConstrained Outer Triangulation
method but not theUnconstrained Method
.The original intent behind implementing Delaunay triangulation in
geo
arose when we needed a method that was compliant with the Apache license usinggeo-types
and was not otherwise available.Thank you for considering this PR.
[X] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.