Skip to content

Commit d8dd161

Browse files
authored
Merge pull request #159 from osm-without-borders/add_suburb_node
Test no voronoi on suburb place node
2 parents 613d9f2 + 742651e commit d8dd161

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cosmogony_builder"
3-
version = "0.14.0"
3+
version = "0.14.2"
44
authors = ["Adrien Matissart <[email protected]>", "Antoine Desbordes <[email protected]>"]
55
license = "Apache-2.0"
66
repository = "https://github.com/osm-without-borders/cosmogony"

cosmogony/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cosmogony"
3-
version = "0.14.0"
3+
version = "0.14.2"
44
authors = ["Adrien Matissart <[email protected]>", "Antoine Desbordes <[email protected]>"]
55
license = "Apache-2.0"
66
repository = "https://github.com/osm-without-borders/cosmogony"

src/additional_zones.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ pub fn compute_additional_places(
4545

4646
let candidate_parent_zones = place_zones
4747
.par_iter()
48+
.filter(|place| {
49+
place.admin_level.is_none() && place.zone_type == Option::from(ZoneType::Suburb)
50+
})
4851
.filter_map(|place| {
4952
place.zone_type?;
5053
get_parent(place, zones, &zones_rtree).map(|parent| (parent, place))
@@ -59,7 +62,7 @@ pub fn compute_additional_places(
5962
);
6063
}
6164

62-
// Ensuring zones are stricly increasing also ensures there will be no
65+
// Ensuring zones are strictly increasing also ensures there will be no
6366
// duplicates, for example by adding an admin label which is inside its
6467
// boundary.
6568
parent_zone > place.zone_type.unwrap_or(parent_zone)
@@ -360,7 +363,7 @@ fn compute_voronoi(
360363
voronoi_polygons
361364
.into_par_iter()
362365
.filter_map(|voronoi| {
363-
// WARNING: This clone should not be necessary, but segfaults occured. Thread-safety issue in geos ?
366+
// WARNING: This clone should not be necessary, but segfaults occurred. Thread-safety issue in geos ?
364367
let geos_points = geos_points.clone();
365368

366369
// Since GEOS doesn't return voronoi geometries in the same order as the given points...

0 commit comments

Comments
 (0)