georust / geo

Rust geospatial primitives & algorithms
https://crates.io/crates/geo
Other
1.58k stars 199 forks source link

Enhance SpadeTriangulation API #1194

Open urschrei opened 5 months ago

urschrei commented 5 months ago

The current TriangulateSpade API is OK, but we're leaving a lot of rich triangulation-related methods on the floor, so to speak:

Currently, our TriangulationResult is effectively just a Vec of triangles. But if we have a look at Spade's API, we have a lot of other methods available for Delaunay and even more for constrained Delaunay. In particular, the ability to refine a constrained Delaunay triangulation is a fundamental operation that makes the CDT useful in the first place (IMO), and computing the Voronoi diagram is similarly fundamental for a Delaunay triangulation.

These are both vastly useful for any number of geometry ops, and we should incorporate them (using the most geo-like API we can).