Skip to content

Commit

Permalink
Improve error message when importing happens to hit an odd boundary. …
Browse files Browse the repository at this point in the history
…[rebuild] [release]
  • Loading branch information
dabreegster committed Jul 21, 2023
1 parent 9cf5d51 commit e4ef6e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion map_model/src/make/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,15 @@ impl Map {

for i in map.intersections.iter_mut() {
if i.is_border() && i.roads.len() != 1 {
// i.orig_id may be synthetic and useless, so also print OSM links of the roads
let border_roads = i
.roads
.iter()
.map(|r| map.roads[r.0].orig_id.osm_way_id.to_string())
.collect::<Vec<_>>();
panic!(
"{} ({}) is a border, but is connected to >1 road: {:?}",
i.id, i.orig_id, i.roads
i.id, i.orig_id, border_roads
);
}
if i.control == IntersectionControl::Signalled {
Expand Down

0 comments on commit e4ef6e4

Please sign in to comment.