fix missing sidewalks on non-residential one-ways downtown. luckily, there's an explicit OSM tag to help. WIP this breaks bus stops on one-ways! fix coming soon

This commit is contained in:
Dustin Carlino 2019-05-21 14:20:19 -07:00
parent d2dc7e52eb
commit aac9c41d8a
2 changed files with 5 additions and 2 deletions

View File

@ -105,7 +105,7 @@ pub fn load(
let mut shapes = ExtraShapes { shapes }; let mut shapes = ExtraShapes { shapes };
if fix_field_names(path, &mut shapes).is_none() { if fix_field_names(path, &mut shapes).is_none() {
timer.warn("Applying extra XML metadata failed".to_string()); timer.warn(format!("Applying extra XML metadata for {} failed", path));
} }
Ok(shapes) Ok(shapes)
} }

View File

@ -82,7 +82,10 @@ pub fn get_lane_types(
// Only residential streets have a sidewalk on the other side of a one-way. // Only residential streets have a sidewalk on the other side of a one-way.
// Ignore off-side parking, since cars don't know how to park on lanes without a driving // Ignore off-side parking, since cars don't know how to park on lanes without a driving
// lane in that direction too. // lane in that direction too.
let back_side = if has_sidewalk && tags.get("highway") == Some(&"residential".to_string()) { let back_side = if has_sidewalk
&& (tags.get("highway") == Some(&"residential".to_string())
|| tags.get("sidewalk") == Some(&"both".to_string()))
{
vec![LaneType::Sidewalk] vec![LaneType::Sidewalk]
} else { } else {
Vec::new() Vec::new()