mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
stop warning for roads without names if they use 'noname=yes'. related
to #147
This commit is contained in:
parent
c2bd5fcf6f
commit
85b45caf1a
@ -492,14 +492,15 @@ fn get_multipolygon_members(
|
||||
pts_per_way.push((*id, pts.to_vec()));
|
||||
} else {
|
||||
println!(
|
||||
"Relation {} has unhandled member role {}, ignoring it",
|
||||
rel.id, role
|
||||
"{} has unhandled member role {}, ignoring it",
|
||||
rel_url(rel.id),
|
||||
role
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
println!("Relation {} refers to {:?}", rel.id, member);
|
||||
println!("{} refers to {:?}", rel_url(rel.id), member);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
@ -195,10 +195,19 @@ impl Map {
|
||||
});
|
||||
}
|
||||
if road.get_name() == "???" {
|
||||
timer.warn(format!(
|
||||
"{} has no name. Tags: {:?}",
|
||||
road.id, road.osm_tags
|
||||
));
|
||||
// Suppress the warning in some cases.
|
||||
if !(road.osm_tags.get("noname") == Some(&"yes".to_string())
|
||||
|| road
|
||||
.osm_tags
|
||||
.get(osm::HIGHWAY)
|
||||
.map(|x| x.ends_with("_link"))
|
||||
.unwrap_or(false))
|
||||
{
|
||||
timer.warn(format!(
|
||||
"{} has no name. Tags: {:?}",
|
||||
road.orig_id, road.osm_tags
|
||||
));
|
||||
}
|
||||
}
|
||||
map.roads.push(road);
|
||||
}
|
||||
@ -331,7 +340,10 @@ impl Map {
|
||||
r.id = BusRouteID(map.bus_routes.len());
|
||||
map.bus_routes.push(r);
|
||||
} else {
|
||||
timer.warn(format!("Skipping route {}", r.name));
|
||||
timer.warn(format!(
|
||||
"Skipping route {} due to connectivity problems",
|
||||
r.name
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user