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
6 changes: 6 additions & 0 deletions geo/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
* Add `wkt!` macro to define geometries at compile time.
<https://github.com/georust/geo/pull/1063>

TODO Complete this
* Add `triangulate_delaunay`:
* In order to build need to add:
doc-E-brown marked this conversation as resolved.
Show resolved Hide resolved
* libopenblas-dev
* gfortran

## 0.26.0

* Implement "Closest Point" from a `Point` on a `Geometry` using spherical geometry. <https://github.com/georust/geo/pull/958>
Expand Down
6 changes: 5 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 = ["ndarray", "ndarray-linalg/openblas"]
doc-E-brown marked this conversation as resolved.
Show resolved Hide resolved
voronoi = ["delaunay"]

[dependencies]
earcutr = { version = "0.4.2", optional = true }
Expand All @@ -29,6 +31,8 @@ proj = { version = "0.27.0", optional = true }
robust = "1.1.0"
rstar = "0.11.0"
serde = { version = "1.0", optional = true, features = ["derive"] }
ndarray = { version = "0.15.6", optional = true }
ndarray-linalg = { version = "0.16.0", optional = true }

[dev-dependencies]
approx = ">= 0.4.0, < 0.6.0"
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