georust / geo

Geospatial primitives and algorithms for Rust
https://crates.io/crates/geo
Other
1.47k stars 190 forks source link

Enhance SpadeTriangulation API #1194

Open urschrei opened 1 week ago

urschrei commented 1 week 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).