Skip to content

Commit

Permalink
Merge pull request #27 from michaelkirk/mkirk/geo-types-0.7
Browse files Browse the repository at this point in the history
Update geo-types to 0.7 and geojson to 0.22 (which requires geo-types 0.7)
  • Loading branch information
Ihor authored Feb 9, 2021
2 parents 428ee2f + c1c6680 commit 188f016
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ members = [
"lib",
"tests",
]

2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions lib/src/boolean/helper.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -58,13 +58,13 @@ pub fn less_if_inversed(condition: bool) -> Ordering {
#[derive(PartialEq, Clone, Copy, Debug)]
pub struct BoundingBox<T>
where
T: CoordinateType,
T: CoordNum,
{
pub min: Coordinate<T>,
pub max: Coordinate<T>,
}

impl<T: CoordinateType> BoundingBox<T> {
impl<T: CoordNum> BoundingBox<T> {
pub fn width(self) -> T {
self.max.x - self.min.x
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 188f016

Please sign in to comment.