File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11name : Test and Publish crate
22
3- on : [push, pull_request]
3+ on : [pull_request]
44
55jobs :
66 tests :
2323 components : rustfmt
2424
2525 - run : cargo fmt --all -- --check
26- - run : cargo test --all
2726 - run : cd cosmogony && cargo test --all
2827
2928 - name : Publish crate
Original file line number Diff line number Diff 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) )
You can’t perform that action at this time.
0 commit comments