Skip to content

Commit

Permalink
Fix bugs when matching turn restrictions to roads, introduced by #98.…
Browse files Browse the repository at this point in the history
… Detected when trying to import larger areas in A/B Street, where turn restrictions happened to cross a boundary
  • Loading branch information
dabreegster committed Oct 3, 2022
1 parent 973baa1 commit 706880f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions streets_reader/src/split_ways.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ pub fn split_up_roads(
// Resolve simple turn restrictions (via a node)
let mut restrictions = Vec::new();
for (restriction, from_osm, via_osm, to_osm) in input.simple_turn_restrictions {
if !streets.intersections.contains_key(&via_osm) {
continue;
}
let roads = streets.roads_per_intersection(via_osm);
// If some of the roads are missing, they were likely filtered out -- usually service
// roads.
Expand Down

0 comments on commit 706880f

Please sign in to comment.