diff --git a/convert_osm/src/extract.rs b/convert_osm/src/extract.rs index 2c74c99601..d9eddb53a2 100644 --- a/convert_osm/src/extract.rs +++ b/convert_osm/src/extract.rs @@ -105,10 +105,7 @@ pub fn extract_osm(map: &mut RawMap, opts: &Options, timer: &mut Timer) -> OsmEx points: map.gps_bounds.convert_back(&way.pts), attributes: way.tags.inner().clone(), }); - } else if way - .tags - .is_any(osm::HIGHWAY, vec!["cycleway", "footway", "path"]) - { + } else if way.tags.is_any(osm::HIGHWAY, vec!["footway", "path"]) { extra_footways.shapes.push(ExtraShape { points: map.gps_bounds.convert_back(&way.pts), attributes: way.tags.inner().clone(), @@ -401,6 +398,8 @@ fn is_road(tags: &mut Tags, opts: &Options) -> bool { }; if !vec![ + "cycleway", + "footway", "living_street", "motorway", "motorway_link", @@ -427,6 +426,11 @@ fn is_road(tags: &mut Tags, opts: &Options) -> bool { return false; } + // Only footways that connect cycleways. + if highway == "footway" && !tags.is("bicycle", "yes") { + return false; + } + // Not sure what this means, found in Seoul. if tags.is("lanes", "0") { return false; @@ -454,7 +458,7 @@ fn is_road(tags: &mut Tags, opts: &Options) -> bool { if tags.is_any(osm::HIGHWAY, vec!["motorway", "motorway_link"]) || tags.is("junction", "roundabout") || tags.is("foot", "no") - || tags.is(osm::HIGHWAY, "service") + || tags.is_any(osm::HIGHWAY, vec!["cycleway", "service"]) { tags.insert(osm::SIDEWALK, "none"); } else if tags.is("oneway", "yes") { diff --git a/game/src/colors.rs b/game/src/colors.rs index 863fa971ca..81279c38cb 100644 --- a/game/src/colors.rs +++ b/game/src/colors.rs @@ -67,6 +67,7 @@ pub struct ColorScheme { pub unzoomed_highway: Color, pub unzoomed_arterial: Color, pub unzoomed_residential: Color, + pub unzoomed_trail: Color, // Intersections pub normal_intersection: Color, @@ -168,6 +169,7 @@ impl ColorScheme { unzoomed_highway: Color::rgb(232, 146, 162), unzoomed_arterial: Color::rgb(255, 199, 62), unzoomed_residential: Color::WHITE, + unzoomed_trail: Color::rgb(15, 125, 75), // Intersections normal_intersection: Color::grey(0.2), diff --git a/game/src/render/map.rs b/game/src/render/map.rs index b2bb36e7f9..6ba2b645b7 100644 --- a/game/src/render/map.rs +++ b/game/src/render/map.rs @@ -209,6 +209,8 @@ impl DrawMap { cs.light_rail_track } else if r.is_private() { cs.private_road + } else if r.is_cyclepath() { + cs.unzoomed_trail } else { rank_to_color(cs, r.get_rank()) }, diff --git a/map_model/src/make/initial/lane_specs.rs b/map_model/src/make/initial/lane_specs.rs index 662739d2bf..1aa0afe458 100644 --- a/map_model/src/make/initial/lane_specs.rs +++ b/map_model/src/make/initial/lane_specs.rs @@ -42,6 +42,23 @@ pub fn get_lane_specs_ltr(tags: &Tags, driving_side: DrivingSide) -> Vec bool { + let lanes = self.lanes_ltr(); + lanes.len() == 2 && lanes[0].2 == LaneType::Biking && lanes[1].2 == LaneType::Biking + } + pub fn common_endpt(&self, other: &Road) -> IntersectionID { if self.src_i == other.src_i || self.src_i == other.dst_i { self.src_i