Skip to content

Commit b77801f

Browse files
committed
add suburb node
1 parent 611f260 commit b77801f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn get_zones_and_stats(
5858
let mut zones = Vec::with_capacity(1000);
5959

6060
for obj in pbf.values() {
61-
if !is_admin(obj) {
61+
if !is_admin(obj) && !obj.tags().get("place").map_or(false, |v| v == "suburb") {
6262
continue;
6363
}
6464
if let OsmObj::Relation(ref relation) = *obj {
@@ -70,6 +70,13 @@ pub fn get_zones_and_stats(
7070
}
7171
};
7272
}
73+
if let OsmObj::Node(ref node) = *obj {
74+
let next_index = ZoneIndex { index: zones.len() };
75+
if let Some(zone) = Zone::from_osm_node(node, next_index) {
76+
// Ignore zone without boundary polygon for the moment
77+
zones.push(zone);
78+
};
79+
}
7380
}
7481

7582
Ok((zones, stats))

0 commit comments

Comments
 (0)