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

Add voronoi #2

Merged
merged 11 commits into from
Nov 10, 2023
Merged
2 changes: 2 additions & 0 deletions geo/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* <https://github.com/georust/geo/pull/1091>
* Add `wkt!` macro to define geometries at compile time.
<https://github.com/georust/geo/pull/1063>
* Add `TriangulateDelaunay` and `VoronoiDiagram` traits.
* <https://github.com/franklin-ai/geo/pull/2>

## 0.26.0

Expand Down
4 changes: 3 additions & 1 deletion geo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ rust-version = "1.65"
categories = ["science::geo"]

[features]
default = ["earcutr"]
default = ["earcutr", "delaunay", "voronoi"]
use-proj = ["proj"]
proj-network = ["use-proj", "proj/network"]
use-serde = ["serde", "geo-types/serde"]
delaunay = []
doc-E-brown marked this conversation as resolved.
Show resolved Hide resolved
voronoi = ["delaunay"]

[dependencies]
earcutr = { version = "0.4.2", optional = true }
Expand Down
8 changes: 8 additions & 0 deletions geo/src/algorithm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,14 @@ pub mod triangulate_earcut;
#[cfg(feature = "earcutr")]
pub use triangulate_earcut::TriangulateEarcut;

#[cfg(feature = "delaunay")]
pub mod triangulate_delaunay;
#[cfg(feature = "delaunay")]
pub use triangulate_delaunay::TriangulateDelaunay;

#[cfg(feature = "voronoi")]
pub mod voronoi_diagram;

/// Vector Operations for 2D coordinates
mod vector_ops;
pub use vector_ops::Vector2DOps;
Expand Down
Loading