mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-27 15:03:20 +03:00
Some fixes to get the Arboretum trails connected.
- Grab fresh Seattle OSM, picking up https://www.openstreetmap.org/changeset/108071529 - Treat highway=footway, bicycle=dismount as a cyclepath, for now - Treat service=driveway, bicycle=designated as a cyclepath Since this requires regenerating all maps anyway, also include some stuff to improve Aurora near Green Lake: - stop making highway lanes super wide by default; they just make divided highways overlap themselves - filter out service roads with access=customers But note the bridge from the Arboretum to Lynn is still disconnected, because of detailed footway mapping that isn't tagged as bike-accessible.
This commit is contained in:
parent
3db706e7db
commit
e6f72449f4
@ -436,7 +436,7 @@ fn is_road(tags: &mut Tags, opts: &Options) -> bool {
|
||||
if (highway == "footway" || highway == "path" || highway == "steps")
|
||||
&& opts.map_config.inferred_sidewalks
|
||||
{
|
||||
if !tags.is_any("bicycle", vec!["designated", "yes"]) {
|
||||
if !tags.is_any("bicycle", vec!["designated", "yes", "dismount"]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -450,11 +450,17 @@ fn is_road(tags: &mut Tags, opts: &Options) -> bool {
|
||||
// Import most service roads. Always ignore driveways, golf cart paths, and always reserve
|
||||
// parking_aisles for parking lots.
|
||||
if highway == "service" && tags.is_any("service", vec!["driveway", "parking_aisle"]) {
|
||||
return false;
|
||||
// An exception -- keep driveways signed for bikes
|
||||
if !(tags.is("service", "driveway") && tags.is("bicycle", "designated")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if highway == "service" && tags.is("golf", "cartpath") {
|
||||
return false;
|
||||
}
|
||||
if highway == "service" && tags.is("access", "customers") {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Not sure what this means, found in Seoul.
|
||||
if tags.is("lanes", "0") {
|
||||
|
@ -13,10 +13,10 @@ const DEBUG_OUTPUT: bool = false;
|
||||
pub fn snap_cycleways(map: &mut RawMap) {
|
||||
#![allow(clippy::logic_bug)]
|
||||
// A gradual experiment...
|
||||
if false
|
||||
&& map.name != MapName::seattle("montlake")
|
||||
&& map.name != MapName::seattle("udistrict")
|
||||
{
|
||||
if !(map.name == MapName::seattle("montlake") || map.name == MapName::seattle("udistrict")) {
|
||||
return;
|
||||
}
|
||||
if true {
|
||||
return;
|
||||
}
|
||||
|
||||
|
2080
data/MANIFEST.json
2080
data/MANIFEST.json
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,7 @@ pub fn get_lane_specs_ltr(tags: &Tags, cfg: &MapConfig) -> Vec<LaneSpec> {
|
||||
// allowed.
|
||||
if tags.is("bicycle", "no")
|
||||
|| (tags.is(osm::HIGHWAY, "footway")
|
||||
&& !tags.is_any("bicycle", vec!["designated", "yes"]))
|
||||
&& !tags.is_any("bicycle", vec!["designated", "yes", "dismount"]))
|
||||
{
|
||||
return vec![fwd(LaneType::Sidewalk)];
|
||||
}
|
||||
|
@ -403,12 +403,6 @@ impl LaneSpec {
|
||||
/// For a given lane type, returns some likely widths. This may depend on the type of the road,
|
||||
/// so the OSM tags are also passed in. The first value returned will be used as a default.
|
||||
pub fn typical_lane_widths(lt: LaneType, tags: &Tags) -> Vec<(Distance, &'static str)> {
|
||||
let rank = if let Some(x) = tags.get(osm::HIGHWAY) {
|
||||
osm::RoadRank::from_highway(x)
|
||||
} else {
|
||||
osm::RoadRank::Local
|
||||
};
|
||||
|
||||
// These're cobbled together from various sources
|
||||
match lt {
|
||||
// https://en.wikipedia.org/wiki/Lane#Lane_width
|
||||
@ -419,14 +413,7 @@ impl LaneSpec {
|
||||
(Distance::feet(10.0), "typical"),
|
||||
(Distance::feet(12.0), "highway"),
|
||||
];
|
||||
if rank == osm::RoadRank::Highway
|
||||
&& tags
|
||||
.get(osm::HIGHWAY)
|
||||
.map(|x| !x.ends_with("_link"))
|
||||
.unwrap_or(true)
|
||||
{
|
||||
choices.rotate_right(1);
|
||||
} else if tags.is(osm::HIGHWAY, "service") || tags.is("narrow", "yes") {
|
||||
if tags.is(osm::HIGHWAY, "service") || tags.is("narrow", "yes") {
|
||||
choices.swap(1, 0);
|
||||
}
|
||||
choices
|
||||
|
Loading…
Reference in New Issue
Block a user