add service roads for buses. closes #203 [rebuild]

This commit is contained in:
Dustin Carlino 2020-07-19 15:29:13 -07:00
parent a837c79500
commit 2f2245e90f
4 changed files with 65 additions and 51 deletions

View File

@ -175,6 +175,7 @@ pub fn extract_osm(
osm_id: way.id,
});
} else if tags.is("highway", "service") {
// If we got here, is_road didn't interpret it as a normal road
map.parking_aisles.push(pts);
} else if tags.is("historic", "memorial") {
if pts[0] == *pts.last().unwrap() {
@ -418,6 +419,9 @@ fn is_road(tags: &mut Tags) -> bool {
if tags.is("railway", "light_rail") {
return true;
}
if tags.is("railway", "tram") {
return false;
}
if !tags.contains_key(osm::HIGHWAY) {
return false;
@ -442,8 +446,6 @@ fn is_road(tags: &mut Tags) -> bool {
"path",
"cycleway",
"proposed",
// This one's debatable. Includes alleys.
"service",
// more discovered manually
"abandoned",
"elevator",
@ -457,6 +459,14 @@ fn is_road(tags: &mut Tags) -> bool {
return false;
}
// Service roads can represent lots of things, most of which we don't want to keep yet. What's
// allowed here is just based on what's been encountered so far in Seattle and Kraków.
if tags.is(osm::HIGHWAY, "service") {
if !tags.is("psv", "yes") && !tags.is("bus", "yes") {
return false;
}
}
// If there's no parking data in OSM already, then assume no parking and mark that it's
// inferred.
if !tags.contains_key(osm::PARKING_LEFT)
@ -476,6 +486,8 @@ fn is_road(tags: &mut Tags) -> bool {
tags.insert(osm::INFERRED_SIDEWALKS, "true");
if tags.is_any(osm::HIGHWAY, vec!["motorway", "motorway_link"])
|| tags.is("junction", "roundabout")
|| tags.is("foot", "no")
|| tags.is(osm::HIGHWAY, "service")
{
tags.insert(osm::SIDEWALK, "none");
} else if tags.is("oneway", "yes") {

View File

@ -5,21 +5,21 @@ data/input/berlin/planning_areas.bin,f1a3bd5118a0e4982b64c2307e01d82a,https://ww
data/input/berlin/planning_areas.kml,1bfc2044f1f5f40acdcdded1a644ad22,https://www.dropbox.com/s/9bvbshrtjw14tm7/planning_areas.kml.zip?dl=0
data/input/krakow/osm/huge_krakow.osm,03bae13bcf9461236b81dd1f0a74696d,https://www.dropbox.com/s/ooqaw4z5yfwucql/huge_krakow.osm.zip?dl=0
data/input/krakow/osm/malopolskie-latest.osm.pbf,36071de68f68c516fe81300c2d1940a9,https://www.dropbox.com/s/4718vobelcz32id/malopolskie-latest.osm.pbf.zip?dl=0
data/input/raw_maps/ballard.bin,8162c495f7badae242daece500a3eec9,https://www.dropbox.com/s/zt2jyimhvccxb9s/ballard.bin.zip?dl=0
data/input/raw_maps/berlin_center.bin,5e02a8b0ca872ebbd4606ba65a7ce8e9,https://www.dropbox.com/s/tlwcfxys0vfz4oz/berlin_center.bin.zip?dl=0
data/input/raw_maps/downtown.bin,677f1dff7694d1119118af33a7b2fffe,https://www.dropbox.com/s/x012jvq1jbl3qt3/downtown.bin.zip?dl=0
data/input/raw_maps/huge_krakow.bin,9d29a53eaa517d9402f320482c91b154,https://www.dropbox.com/s/dimk5018nex81g0/huge_krakow.bin.zip?dl=0
data/input/raw_maps/huge_seattle.bin,59b4879e6a56efd3138b4356bc1c892b,https://www.dropbox.com/s/56gmu90fco65ewz/huge_seattle.bin.zip?dl=0
data/input/raw_maps/ballard.bin,ecca35908bb3628ae6da8a42a9100f52,https://www.dropbox.com/s/pl71aoecgfj6k3b/ballard.bin.zip?dl=0
data/input/raw_maps/berlin_center.bin,b65f30e53cd53072c859bf35c529bb2f,https://www.dropbox.com/s/b4rzgabcrpkvtb1/berlin_center.bin.zip?dl=0
data/input/raw_maps/downtown.bin,0ec5eca5e9ce8e1568da5e29df3855d2,https://www.dropbox.com/s/w3wc11i2i7uoi0v/downtown.bin.zip?dl=0
data/input/raw_maps/huge_krakow.bin,0e0832e9e760e1f54806429f93a79652,https://www.dropbox.com/s/akccssswc3kqwmp/huge_krakow.bin.zip?dl=0
data/input/raw_maps/huge_seattle.bin,da299f07965dd513e77110d63731f1f7,https://www.dropbox.com/s/qucw789aijdfgf5/huge_seattle.bin.zip?dl=0
data/input/raw_maps/lakeslice.bin,ccbd3916efc6834935e4eba9b1c164c0,https://www.dropbox.com/s/bcean6p6fftj4ep/lakeslice.bin.zip?dl=0
data/input/raw_maps/montlake.bin,69be106b60c30188f6badc7b4ff4075a,https://www.dropbox.com/s/tfra95r79dpmz0n/montlake.bin.zip?dl=0
data/input/raw_maps/south_seattle.bin,527039d3663394901ec4cda94653d2be,https://www.dropbox.com/s/sb8e99taqydirao/south_seattle.bin.zip?dl=0
data/input/raw_maps/udistrict.bin,054d618782217f196413ff91b5ca581e,https://www.dropbox.com/s/8zok3gzv4j1j064/udistrict.bin.zip?dl=0
data/input/raw_maps/west_seattle.bin,b8579e16b39807f6d184132515eaf20b,https://www.dropbox.com/s/zzmk5wy67ux4lnd/west_seattle.bin.zip?dl=0
data/input/screenshots/downtown.zip,0c1cb5312bd61b5d7538ceca379547ce,https://www.dropbox.com/s/qawd35wz62m2acl/downtown.zip.zip?dl=0
data/input/screenshots/huge_krakow.zip,ca7ef8cd9b2c202db4e9495788076b13,https://www.dropbox.com/s/dbzon7k5ukndtza/huge_krakow.zip.zip?dl=0
data/input/screenshots/lakeslice.zip,75ef40f25aafed76ffabd6eff241d8e6,https://www.dropbox.com/s/z0z96lsn7bunqfy/lakeslice.zip.zip?dl=0
data/input/screenshots/montlake.zip,9f4b0e4c4529e4bf5a2b12cc5483924e,https://www.dropbox.com/s/r9vkgwesqklfuq2/montlake.zip.zip?dl=0
data/input/screenshots/udistrict.zip,bd5ce0ddec426d9680f9390c780d8a87,https://www.dropbox.com/s/ecnt1tyza48y9o2/udistrict.zip.zip?dl=0
data/input/raw_maps/south_seattle.bin,fd784f59323de1251d831f199abb0b8f,https://www.dropbox.com/s/8w6gdsql5sashbt/south_seattle.bin.zip?dl=0
data/input/raw_maps/udistrict.bin,e1a9b1261f363c1fc9d02f73fd5fb68d,https://www.dropbox.com/s/db4nhgmk0ggwai8/udistrict.bin.zip?dl=0
data/input/raw_maps/west_seattle.bin,11bb35d1d04fd5576832cd1901cf7dc0,https://www.dropbox.com/s/87ijfmz1nntem8i/west_seattle.bin.zip?dl=0
data/input/screenshots/downtown.zip,36ef73db5d2229b03efd60e8bb8c8f69,https://www.dropbox.com/s/qawd35wz62m2acl/downtown.zip.zip?dl=0
data/input/screenshots/huge_krakow.zip,ac0aa5993f437e62d6ec5e58116a00d9,https://www.dropbox.com/s/dbzon7k5ukndtza/huge_krakow.zip.zip?dl=0
data/input/screenshots/lakeslice.zip,440f239ddab35ad97a7807f46c92fe8c,https://www.dropbox.com/s/z0z96lsn7bunqfy/lakeslice.zip.zip?dl=0
data/input/screenshots/montlake.zip,1f829e77c8379940bf62d9548128ae1a,https://www.dropbox.com/s/r9vkgwesqklfuq2/montlake.zip.zip?dl=0
data/input/screenshots/udistrict.zip,88acb1b6135b897e959f4769aec451fd,https://www.dropbox.com/s/ecnt1tyza48y9o2/udistrict.zip.zip?dl=0
data/input/seattle/N47W122.hgt,0db4e23e51f7680538b0bbbc72208e07,https://www.dropbox.com/s/mmb4mgutwotijdw/N47W122.hgt.zip?dl=0
data/input/seattle/blockface.bin,add872bab9040ae911366328a230f8b5,https://www.dropbox.com/s/rxd2care60tbe75/blockface.bin.zip?dl=0
data/input/seattle/blockface.kml,350bd9e59bf2af4e885a7c0741e6ee6b,https://www.dropbox.com/s/ukknmpjdvilncq9/blockface.kml.zip?dl=0
@ -34,29 +34,29 @@ data/input/seattle/osm/south_seattle.osm,86e589eaf7cd4f32db88ea9218e795d4,https:
data/input/seattle/osm/udistrict.osm,8eff2a0ded7eda9abfe469ac7a5c7b2d,https://www.dropbox.com/s/s3yb9xqbjuntu3v/udistrict.osm.zip?dl=0
data/input/seattle/osm/washington-latest.osm.pbf,05c7409a81df5b0d0bc058ebd619fbb5,https://www.dropbox.com/s/a6dax5p59ltjetm/washington-latest.osm.pbf.zip?dl=0
data/input/seattle/osm/west_seattle.osm,20109b038a36b527fe68bd4aa58baa92,https://www.dropbox.com/s/gsvwkd854wvyz5d/west_seattle.osm.zip?dl=0
data/input/seattle/parcels.bin,048769779e65c8ee50fbd3b5d30388b1,https://www.dropbox.com/s/21mg80tasowhdf5/parcels.bin.zip?dl=0
data/input/seattle/parcels.bin,49e67567945ae9d56bff4f6875fa44b3,https://www.dropbox.com/s/yph0zg2vqijsvb2/parcels.bin.zip?dl=0
data/input/seattle/parcels_urbansim.txt,db63d7d606e8702d12f9399e87e6a00f,https://www.dropbox.com/s/6g8rbsf200dssj3/parcels_urbansim.txt.zip?dl=0
data/input/seattle/popdat.bin,1aa2569c7e5a5a4773d7ca706d60432d,https://www.dropbox.com/s/0lwlep06spt0itv/popdat.bin.zip?dl=0
data/input/seattle/popdat.bin,22ceb8293ce6259f48d84f6c878444d3,https://www.dropbox.com/s/wdvfuw1dbqc381j/popdat.bin.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,d9f86e7387d3b013952acdfe4cfb09a5,https://www.dropbox.com/s/jmgjhzwp33r5ugu/seattle.bin.zip?dl=0
data/system/maps/ballard.bin,33399d8581e959e56accee655adafbd0,https://www.dropbox.com/s/p8cp9m0q8qptoj7/ballard.bin.zip?dl=0
data/system/maps/berlin_center.bin,de351262c6f79d80a306f4576931bd11,https://www.dropbox.com/s/96vf3s6n3335ocp/berlin_center.bin.zip?dl=0
data/system/maps/downtown.bin,18d6180c933ca5c6a8b881935789bffa,https://www.dropbox.com/s/klcwrdw9a53k1tg/downtown.bin.zip?dl=0
data/system/maps/huge_krakow.bin,b49e3d9f801c1ff62a1b4f55cbf0a77b,https://www.dropbox.com/s/4pq6akxr53qvn1v/huge_krakow.bin.zip?dl=0
data/system/maps/huge_seattle.bin,545372e1db83cc175f1b9a0e5226c9b2,https://www.dropbox.com/s/wvlckocfgbtgsh4/huge_seattle.bin.zip?dl=0
data/system/maps/ballard.bin,1fe56c26ec2b722329a478db4713ded2,https://www.dropbox.com/s/2tgd4xu7wpg5hhm/ballard.bin.zip?dl=0
data/system/maps/berlin_center.bin,7ebd5fb433ce9c6954157b03a4280d7d,https://www.dropbox.com/s/5a3br6fdzk0x79m/berlin_center.bin.zip?dl=0
data/system/maps/downtown.bin,e8eebd85d3d5c6afc449a4ca37741c50,https://www.dropbox.com/s/r9mobddwb0t0un5/downtown.bin.zip?dl=0
data/system/maps/huge_krakow.bin,b6f77d8fc5d1f8c1a2335a302a5e5304,https://www.dropbox.com/s/0eml9g3bcnuxvda/huge_krakow.bin.zip?dl=0
data/system/maps/huge_seattle.bin,af67395147ee2a16cf48b9cd7ff076e3,https://www.dropbox.com/s/varcmd8at5aywsn/huge_seattle.bin.zip?dl=0
data/system/maps/lakeslice.bin,7fe76927dd154051a9e3dfa5e5842954,https://www.dropbox.com/s/lbo4y418e2qo2it/lakeslice.bin.zip?dl=0
data/system/maps/montlake.bin,1232e900355ba1cb9837e2790c16870c,https://www.dropbox.com/s/f28ivdxynz2j2u5/montlake.bin.zip?dl=0
data/system/maps/south_seattle.bin,bb701fcf4abe9330cfb58121d3e5bad7,https://www.dropbox.com/s/2kfgbtz2jd3xav2/south_seattle.bin.zip?dl=0
data/system/maps/udistrict.bin,0dbd16d4b45a2efbf9d98d89054231bc,https://www.dropbox.com/s/1651xn91s8ihr2n/udistrict.bin.zip?dl=0
data/system/maps/west_seattle.bin,57411a6e8a0ed843c96d35cf929af6ff,https://www.dropbox.com/s/iulfhcgsn4atduk/west_seattle.bin.zip?dl=0
data/system/prebaked_results/lakeslice/weekday.bin,119f695d602c0fbd6ff60ad0733b533a,https://www.dropbox.com/s/auuq2enda6t45gg/weekday.bin.zip?dl=0
data/system/maps/south_seattle.bin,e55041e835c231eb72a094ac79deaf05,https://www.dropbox.com/s/3wzzoy9a7fnf5xg/south_seattle.bin.zip?dl=0
data/system/maps/udistrict.bin,27ab45844280ed27b6bb1f93cd839504,https://www.dropbox.com/s/8fybainsikurj79/udistrict.bin.zip?dl=0
data/system/maps/west_seattle.bin,aabdedc39c81c35c59a2bc4609cfff01,https://www.dropbox.com/s/ej5zcbfr1qvpwyi/west_seattle.bin.zip?dl=0
data/system/prebaked_results/lakeslice/weekday.bin,9618adccebe5104d39642745e775e59d,https://www.dropbox.com/s/2ntjqw7m5f6kx4r/weekday.bin.zip?dl=0
data/system/prebaked_results/montlake/car vs bike contention.bin,fba6493b919e8cc50854088367e38d95,https://www.dropbox.com/s/jefg0ikjy9dsrdd/car%20vs%20bike%20contention.bin.zip?dl=0
data/system/prebaked_results/montlake/weekday.bin,e7f975ccf56b67dc31563286742118f1,https://www.dropbox.com/s/t3os651iqdck801/weekday.bin.zip?dl=0
data/system/scenarios/ballard/weekday.bin,97f3262146d9b84fe61326a81d9eef1a,https://www.dropbox.com/s/rmhxak4i3at7c76/weekday.bin.zip?dl=0
data/system/scenarios/downtown/weekday.bin,18563e48427406a9ecf162f0e33a9649,https://www.dropbox.com/s/n36jlq6q7ghai21/weekday.bin.zip?dl=0
data/system/scenarios/huge_seattle/weekday.bin,844d779efe4d20d3a40586dcca7d4ad5,https://www.dropbox.com/s/elf3cir98xyx7xj/weekday.bin.zip?dl=0
data/system/scenarios/lakeslice/weekday.bin,a8aebf2ccf45c43a4b121f9a3fcde14e,https://www.dropbox.com/s/w6u3sbzdu29myge/weekday.bin.zip?dl=0
data/system/scenarios/montlake/weekday.bin,104da3edb9c2f0902814326bcb54827b,https://www.dropbox.com/s/491g9et3n1wwgur/weekday.bin.zip?dl=0
data/system/scenarios/south_seattle/weekday.bin,2f5cd281c51fa7bc8bf37ef4690ad09c,https://www.dropbox.com/s/vebqei9onftbclp/weekday.bin.zip?dl=0
data/system/scenarios/udistrict/weekday.bin,88d935be31d2e263f09136ab68c60b46,https://www.dropbox.com/s/c4m2ymbyjeu55eg/weekday.bin.zip?dl=0
data/system/scenarios/west_seattle/weekday.bin,62b0b653760cadaddb63fb96720fccab,https://www.dropbox.com/s/djmbz0r7hoa4ghj/weekday.bin.zip?dl=0
data/system/prebaked_results/montlake/weekday.bin,40179cdbbf30c610d98fc013ccfd70f3,https://www.dropbox.com/s/1kszhaua3wsncq0/weekday.bin.zip?dl=0
data/system/scenarios/ballard/weekday.bin,d6674ffa15e50690eadbd49066d4b355,https://www.dropbox.com/s/mq80nwoc9pnia5h/weekday.bin.zip?dl=0
data/system/scenarios/downtown/weekday.bin,f00a8f8cb58e0fa1389c5ce8cc7431a7,https://www.dropbox.com/s/hkpuu0t1lpwp824/weekday.bin.zip?dl=0
data/system/scenarios/huge_seattle/weekday.bin,eaecb4e05d2b4f675c284b1c2b8c8a9a,https://www.dropbox.com/s/fswf3t7f8rf2mih/weekday.bin.zip?dl=0
data/system/scenarios/lakeslice/weekday.bin,cec14f00dfd3d2563987c8d63e503ec0,https://www.dropbox.com/s/wpjbirx8ycaxvxi/weekday.bin.zip?dl=0
data/system/scenarios/montlake/weekday.bin,c6659caaefef6e440f9d22fe5311e5ab,https://www.dropbox.com/s/b9ix4vyqtadkhhc/weekday.bin.zip?dl=0
data/system/scenarios/south_seattle/weekday.bin,b75717c11ccfe48508b464d286d5d805,https://www.dropbox.com/s/7cperku8ehxszfl/weekday.bin.zip?dl=0
data/system/scenarios/udistrict/weekday.bin,813231118879a35e2bbe6820a9c18961,https://www.dropbox.com/s/i4vpus5256zwn8c/weekday.bin.zip?dl=0
data/system/scenarios/west_seattle/weekday.bin,3fdab9eae79c220043b6d727b3cbecc8,https://www.dropbox.com/s/5rgtxl9xglnyxrz/weekday.bin.zip?dl=0

View File

@ -71,7 +71,8 @@ pub fn get_lane_types(osm_tags: &BTreeMap<String, String>) -> (Vec<LaneType>, Ve
}
};
let driving_lane = if tags.is("access", "no") && tags.is("bus", "yes") {
let driving_lane =
if tags.is("access", "no") && (tags.is("bus", "yes") || tags.is("psv", "yes")) {
// Sup West Seattle
LaneType::Bus
} else if tags

View File

@ -360,6 +360,7 @@ impl Road {
"unclassified" => 0,
"road" => 0,
"crossing" => 0,
"service" => 0,
// If you hit this error and the highway type doesn't represent a driveable road,
// you may want to instead filter out the OSM way entirely in
// convert_osm/src/osm_reader.rs's is_road().