handle off-side bike lanes on oneway roads. fixes #140

This commit is contained in:
Dustin Carlino 2020-07-06 14:03:22 -07:00
parent 1dcc7456db
commit cac35319b2
3 changed files with 24 additions and 11 deletions

View File

@ -36,7 +36,7 @@ data/input/screenshots/downtown/02x10.gif,8eb32ff700be3a4ded979bb464a47a44,https
data/input/screenshots/downtown/02x11.gif,8eb32ff700be3a4ded979bb464a47a44,https://www.dropbox.com/s/r96oo3xhw3snbe3/02x11.gif.zip?dl=0
data/input/screenshots/downtown/02x12.gif,8eb32ff700be3a4ded979bb464a47a44,https://www.dropbox.com/s/p4zuw67e5yx8qgg/02x12.gif.zip?dl=0
data/input/screenshots/downtown/03x01_i88.gif,7a953c6ac17ad16c39223ea7c7860b50,https://www.dropbox.com/s/321b99yi56prg7r/03x01_i88.gif.zip?dl=0
data/input/screenshots/downtown/03x02_i115.gif,d2c4c6fb1e3944e51f0279efb2548c60,https://www.dropbox.com/s/7dcan24ekmv01ux/03x02_i115.gif.zip?dl=0
data/input/screenshots/downtown/03x02_i115.gif,22fee43cae1255207b6818231d1f7478,https://www.dropbox.com/s/14m0zxxnszzx126/03x02_i115.gif.zip?dl=0
data/input/screenshots/downtown/03x03_i267.gif,50244440b5a7c0e0a6f712ac42734b4f,https://www.dropbox.com/s/nluned6u68vmvy4/03x03_i267.gif.zip?dl=0
data/input/screenshots/downtown/03x04_i190.gif,97187a82702bceff14192cec6ef899c4,https://www.dropbox.com/s/56cw8swuull5axa/03x04_i190.gif.zip?dl=0
data/input/screenshots/downtown/03x05_i190.gif,b92741758e1a726a57adbcb72bf16514,https://www.dropbox.com/s/nsh8432d5dgeph7/03x05_i190.gif.zip?dl=0
@ -273,8 +273,8 @@ data/input/screenshots/udistrict/01x03_i149.gif,3675c5b466dc8d334f126fdc74bd1983
data/input/screenshots/udistrict/01x04_i176.gif,263546fa51e767a8a64f9fb501ddcc7f,https://www.dropbox.com/s/zzv6nx6ejw6htcv/01x04_i176.gif.zip?dl=0
data/input/screenshots/udistrict/01x05_i276.gif,79041fbeee2b61504aa90e4338f341ec,https://www.dropbox.com/s/pt4rvwu16m8bg2z/01x05_i276.gif.zip?dl=0
data/input/screenshots/udistrict/01x06_i2.gif,0529fffe14116a7f204b86704b5b2c1c,https://www.dropbox.com/s/gq6ov7vdcxpgnjs/01x06_i2.gif.zip?dl=0
data/input/screenshots/udistrict/01x07_i188.gif,cb1379906ea3f714d853514c1576a59a,https://www.dropbox.com/s/mezjbyl7jhhxozz/01x07_i188.gif.zip?dl=0
data/input/screenshots/udistrict/01x08_i66.gif,48480d486e7e3f1c188f7f773621ec89,https://www.dropbox.com/s/l2nuwqbchirrbzv/01x08_i66.gif.zip?dl=0
data/input/screenshots/udistrict/01x07_i188.gif,995884313a19e12e149622b47eead370,https://www.dropbox.com/s/owu64l0rr2g5aox/01x07_i188.gif.zip?dl=0
data/input/screenshots/udistrict/01x08_i66.gif,8382c7b41595482beb29b5374a56faae,https://www.dropbox.com/s/ykzhz6hdeq527aa/01x08_i66.gif.zip?dl=0
data/input/screenshots/udistrict/01x09.gif,68a69600430ada459cd1a55b564e7a21,https://www.dropbox.com/s/olindya5idcylnm/01x09.gif.zip?dl=0
data/input/screenshots/udistrict/02x01_i0.gif,14fd2d4e48de7f9608280667cb8d9683,https://www.dropbox.com/s/krf95w3lpxng052/02x01_i0.gif.zip?dl=0
data/input/screenshots/udistrict/02x02_i196.gif,baa4fa0f093ad3a48ebafa53af7d34de,https://www.dropbox.com/s/l2l8kh4gyx28jke/02x02_i196.gif.zip?dl=0
@ -289,7 +289,7 @@ data/input/screenshots/udistrict/03x01_i4.gif,4974ba787075db459b1fab11ee32cce4,h
data/input/screenshots/udistrict/03x02_i21.gif,0490565696f94d192f7e0caf9cbc2f66,https://www.dropbox.com/s/rozkxrz8vsgbjsl/03x02_i21.gif.zip?dl=0
data/input/screenshots/udistrict/03x03_i25.gif,c0a84687050eb81e8fd12eb4cd1c3325,https://www.dropbox.com/s/tccmbr2hw1kk1go/03x03_i25.gif.zip?dl=0
data/input/screenshots/udistrict/03x04_i14.gif,326f8df37c51ceb3480d20038b609294,https://www.dropbox.com/s/1r8lsonb0aww9e0/03x04_i14.gif.zip?dl=0
data/input/screenshots/udistrict/03x05_i62.gif,f52cc4b26b873ae504d3b5d75083c3af,https://www.dropbox.com/s/1hzj9jo9b9fazc1/03x05_i62.gif.zip?dl=0
data/input/screenshots/udistrict/03x05_i62.gif,c03c547947a293cabca2b5386206a779,https://www.dropbox.com/s/5k4sfjz5yn1gpre/03x05_i62.gif.zip?dl=0
data/input/screenshots/udistrict/03x06_i437.gif,47d5c8e68380424c93149ef65f62f347,https://www.dropbox.com/s/a69z8ih8df52ci5/03x06_i437.gif.zip?dl=0
data/input/screenshots/udistrict/03x07_i237.gif,187f6837ff6dbfb6df560f74160a3785,https://www.dropbox.com/s/vqauwpefhzuznxt/03x07_i237.gif.zip?dl=0
data/input/screenshots/udistrict/03x08_i146.gif,a4f130f09ca4db735c539faa7adc9d2b,https://www.dropbox.com/s/7790nadi9eco5nx/03x08_i146.gif.zip?dl=0
@ -352,15 +352,15 @@ data/input/seattle/sidewalks.bin,034dd47ab77902dbc81c0107f13d8965,https://www.dr
data/input/seattle/sidewalks.kml,94d385ba03ef1b57a5ba10965913ec6c,https://www.dropbox.com/s/vn8amar9xi6vbvh/sidewalks.kml.zip?dl=0
data/input/seattle/trips_2014.csv,d4a8e733045b28c0385fb81359d6df03,https://www.dropbox.com/s/5ppravwmk6bf20d/trips_2014.csv.zip?dl=0
data/system/cities/seattle.bin,65ed19fe6b0a41d57ccb481a5c76652a,https://www.dropbox.com/s/kwei76ih7g12n1r/seattle.bin.zip?dl=0
data/system/maps/ballard.bin,e15b1cc7023fde8dc4becae14d298099,https://www.dropbox.com/s/d4c7hbztr3ij52m/ballard.bin.zip?dl=0
data/system/maps/downtown.bin,da15d5370a4005f75a8cabb50f84964c,https://www.dropbox.com/s/vtk3v9oqubyvm07/downtown.bin.zip?dl=0
data/system/maps/ballard.bin,70aae5b446565c838106670a36a4a936,https://www.dropbox.com/s/e8zwrwaonyfs9b5/ballard.bin.zip?dl=0
data/system/maps/downtown.bin,542d391978a059cfc5158ac43a6fe01a,https://www.dropbox.com/s/uf49xnm45xj6nwl/downtown.bin.zip?dl=0
data/system/maps/downtown_atx.bin,01bd85b66fee924cd4093cab15c9e1b1,https://www.dropbox.com/s/6x5x59agenaj92r/downtown_atx.bin.zip?dl=0
data/system/maps/huge_austin.bin,6562d49a757b64bc60cc99ba3261227b,https://www.dropbox.com/s/2i58ok54x1d4bgd/huge_austin.bin.zip?dl=0
data/system/maps/huge_seattle.bin,1f7bf889cafa5be0f11698e00044c464,https://www.dropbox.com/s/3v1u0c9dmj28qes/huge_seattle.bin.zip?dl=0
data/system/maps/huge_seattle.bin,077f8b055bbb4d021a0d214accf867f9,https://www.dropbox.com/s/lkxcwdw3j9lcovn/huge_seattle.bin.zip?dl=0
data/system/maps/lakeslice.bin,4b078e515f25a9953edf8402f93c654a,https://www.dropbox.com/s/zh0g041uy8f9b2b/lakeslice.bin.zip?dl=0
data/system/maps/montlake.bin,602491532147c48f2af6892ba657a392,https://www.dropbox.com/s/kp25sp03fxsbsii/montlake.bin.zip?dl=0
data/system/maps/south_seattle.bin,a4dbaac5342056f26b57a7462e5f4660,https://www.dropbox.com/s/s0bgjvz3um1lcdo/south_seattle.bin.zip?dl=0
data/system/maps/udistrict.bin,a1987c68fbf9046380652522923020fd,https://www.dropbox.com/s/qd13l6niir5hp51/udistrict.bin.zip?dl=0
data/system/maps/south_seattle.bin,cf1ce950b68e06685ad5a71b3f221dcc,https://www.dropbox.com/s/nf286k662gn2b2l/south_seattle.bin.zip?dl=0
data/system/maps/udistrict.bin,d367e924ed73fc4c340da2959c332c95,https://www.dropbox.com/s/frv1esnn050cp85/udistrict.bin.zip?dl=0
data/system/maps/west_seattle.bin,8d2b5960ab9894cbbb54f34536d1533d,https://www.dropbox.com/s/1paxj1lht4f59xf/west_seattle.bin.zip?dl=0
data/system/prebaked_results/lakeslice/weekday.bin,d35e808b075dd432064cf321c09fbc9d,https://www.dropbox.com/s/ijsps4dz4qg8dsg/weekday.bin.zip?dl=0
data/system/prebaked_results/montlake/car vs bike contention.bin,50b15194b8f91500ee6c17a5b0d498af,https://www.dropbox.com/s/jefg0ikjy9dsrdd/car%20vs%20bike%20contention.bin.zip?dl=0

View File

@ -122,7 +122,15 @@ pub fn get_lane_types(osm_tags: &BTreeMap<String, String>) -> (Vec<LaneType>, Ve
if osm_tags.get("cycleway:right") == Some(&"lane".to_string()) {
fwd_side.push(LaneType::Biking);
}
if osm_tags.get("cycleway:left") == Some(&"lane".to_string()) {
if osm_tags.get("cycleway:left") == Some(&"lane".to_string())
|| osm_tags.get("cycleway:left") == Some(&"opposite_lane".to_string())
|| osm_tags.get("cycleway") == Some(&"opposite_lane".to_string())
{
back_side.push(LaneType::Biking);
}
// Cycleway isn't explicitly specified, but this is a reasonable assumption anyway.
if back_side.is_empty() && osm_tags.get("oneway:bicycle") == Some(&"no".to_string()) {
back_side.push(LaneType::Biking);
}
}

View File

@ -154,7 +154,12 @@ async fn check_links() {
println!("> Check remote for {}", file);
let url = entry.dropbox_url.unwrap();
let url = format!("{}{}", &url[..url.len() - 1], "1");
if let Err(err) = client.head(&url).send().await.unwrap().error_for_status() {
if let Err(err) = client
.head(&url)
.send()
.await
.and_then(|res| res.error_for_status())
{
println!("{} broken: {}", url, err);
}
}