From c1c6680bc5540d1378e0f6d269665281bf612169 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Mon, 11 Jan 2021 15:41:16 -0600 Subject: [PATCH] Update geo-types to 0.7 --- Cargo.toml | 1 + lib/Cargo.toml | 2 +- lib/src/boolean/helper.rs | 6 +++--- tests/Cargo.toml | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 88b8caa..13a2ca6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,4 @@ members = [ "lib", "tests", ] + diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 8484669..7c7b698 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -10,7 +10,7 @@ readme = "../README.md" keywords = ["gis", "geo", "geography", "geospatial"] [dependencies] -geo-types = { version = "0.6.0", default-features = false } +geo-types = { version = "0.7", default-features = false } num-traits = "0.2" robust = "0.2" float_next_after = "0.1" diff --git a/lib/src/boolean/helper.rs b/lib/src/boolean/helper.rs index fff42ac..06681f3 100644 --- a/lib/src/boolean/helper.rs +++ b/lib/src/boolean/helper.rs @@ -1,5 +1,5 @@ use float_next_after::NextAfter as NextAfterFloat; -use geo_types::{Coordinate, CoordinateType}; +use geo_types::{Coordinate, CoordNum}; use num_traits::Float as NumTraitsFloat; use std::cmp::Ordering; use std::fmt::{Debug, Display}; @@ -58,13 +58,13 @@ pub fn less_if_inversed(condition: bool) -> Ordering { #[derive(PartialEq, Clone, Copy, Debug)] pub struct BoundingBox where - T: CoordinateType, + T: CoordNum, { pub min: Coordinate, pub max: Coordinate, } -impl BoundingBox { +impl BoundingBox { pub fn width(self) -> T { self.max.x - self.min.x } diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 2a112e7..7fa13df 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -6,11 +6,11 @@ edition = "2018" [dependencies] geo-booleanop = { path = "../lib", features = [] } # add "debug-booleanop" for debugging -geo = "0.14" +geo = "0.17" # Note: It is crucial to enable arbitrary_precision on serde_json, otherwise # JSON parsing isn't exact. -geojson = { version = "0.19", features = ["geo-types"] } +geojson = { version = "0.22", features = ["geo-types"] } serde_json = { version = "1.0.44", features = ["arbitrary_precision"] } clap = "2.3.3"