Skip to content

Commit

Permalink
remove suburb node
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrll committed Jan 30, 2024
1 parent ecaa549 commit fbe4bda
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmogony_builder"
version = "0.14.5"
version = "0.14.6"
authors = ["Adrien Matissart <a.matissart@qwantresearch.com>", "Antoine Desbordes <antoine.desbordes@gmail.com>"]
license = "Apache-2.0"
repository = "https://github.com/osm-without-borders/cosmogony"
Expand Down
2 changes: 1 addition & 1 deletion cosmogony/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmogony"
version = "0.14.5"
version = "0.14.6"
authors = ["Adrien Matissart <a.matissart@qwantresearch.com>", "Antoine Desbordes <antoine.desbordes@gmail.com>"]
license = "Apache-2.0"
repository = "https://github.com/osm-without-borders/cosmogony"
Expand Down
3 changes: 1 addition & 2 deletions src/additional_zones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ pub fn compute_additional_places(
let candidate_parent_zones = place_zones
.par_iter()
.filter(|place| {
(place.admin_level.is_none() && place.zone_type == Option::from(ZoneType::Suburb))
| place.tags.get("capital").map_or(false, |v| v == "yes")
place.admin_level.is_none() | place.tags.get("capital").map_or(false, |v| v == "yes")
})
.filter_map(|place| {
place.zone_type?;
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn is_place(obj: &OsmObj) -> bool {
match *obj {
OsmObj::Node(ref node) => matches!(
node.tags.get("place").and_then(|s| ZoneType::parse(s)),
Some(ZoneType::City | ZoneType::Suburb)
Some(ZoneType::City)
),
_ => false,
}
Expand All @@ -56,7 +56,7 @@ pub fn is_additional_place(obj: &OsmObj) -> bool {
OsmObj::Node(ref node) => {
matches!(
node.tags.get("place").and_then(|s| ZoneType::parse(s)),
Some(ZoneType::City | ZoneType::Suburb)
Some(ZoneType::City)
) | node.tags.get("capital").map_or(false, |v| v == "yes")
}
_ => false,
Expand Down

0 comments on commit fbe4bda

Please sign in to comment.