Use inferred sidewalks for Leeds, after detecting another geometry bug

when building sidewalk corners. Raw sidewalks from OSM aren't suitable
for traffic simulation yet.
This commit is contained in:
Dustin Carlino 2020-11-04 08:46:06 -08:00
parent 21cd7a197d
commit e99dd5bba7
4 changed files with 17 additions and 11 deletions

View File

@ -46,13 +46,13 @@
"checksum": "a702f4fa6680793c7e1047668d8d0b69"
},
"data/input/leeds/footways.bin": {
"checksum": "59fa91ed0935dc0049d644dff53b5f0e"
"checksum": "95961d499e97b049e620f145eb58c7c8"
},
"data/input/leeds/leeds_center_separate_cycleways.bin": {
"checksum": "d209fb64e088914617f10fbaba4cc97c"
"checksum": "ddd4940fad2c228615c98ebde883c2e3"
},
"data/input/leeds/leeds_center_snapped_cycleways.bin": {
"checksum": "ad96e232fea00b1e7cfd9480ed3028fb"
"checksum": "e2962e8c3bb5be82c65e03c21858cc34"
},
"data/input/leeds/osm/leeds_center.osm": {
"checksum": "7c5408f54d8c62aee7420a711a228ec0"
@ -100,7 +100,7 @@
"checksum": "5362657bbcdac16ac22aadf58f2a769c"
},
"data/input/raw_maps/leeds_center.bin": {
"checksum": "abd2c3964d724077e287e7f3210eab0a"
"checksum": "38ec311a319b9ccca42c09172d2a8e59"
},
"data/input/raw_maps/montlake.bin": {
"checksum": "60776c41875cad8f79354dff8c4d3d47"
@ -337,7 +337,7 @@
"checksum": "da08eecbaeebbadea93d3ee96cdeaea6"
},
"data/system/maps/leeds_center.bin": {
"checksum": "c50278ac1d5b38575d53cc9b517fded4"
"checksum": "380fe8d5a62094f5bbbbc2f227826fde"
},
"data/system/maps/montlake.bin": {
"checksum": "59c3c1bddd2e0bf317e8a0b63e85a580"

View File

@ -97,6 +97,7 @@ pub fn nice_map_name(name: &str) -> &str {
// Outside Seattle
"berlin_center" => "Berlin (city center)",
"krakow_center" => "Kraków (city center)",
"leeds_center" => "Leeds (city center)",
"southbank" => "London (Southbank)",
"tel_aviv" => "Tel Aviv",
"xian" => "Xi'an",

View File

@ -31,7 +31,7 @@ pub fn osm_to_raw(name: &str, timer: &mut abstutil::Timer, config: &ImporterConf
map_config: map_model::MapConfig {
driving_side: map_model::DrivingSide::Left,
bikes_can_use_bus_lanes: false,
inferred_sidewalks: false,
inferred_sidewalks: true,
},
onstreet_parking: convert_osm::OnstreetParking::JustOSM,

View File

@ -432,11 +432,16 @@ fn make_shared_sidewalk_corner(
return baseline;
}
pts_between.extend(
PolyLine::must_new(deduped)
.must_shift_right(l1.width.min(l2.width) / 2.0)
.points(),
);
if let Ok(pl) = PolyLine::must_new(deduped).shift_right(l1.width.min(l2.width) / 2.0) {
pts_between.extend(pl.points());
} else {
timer.warn(format!(
"SharedSidewalkCorner between {} and {} has weird collapsing geometry, so \
just doing straight line",
l1.id, l2.id
));
return baseline;
}
}
}
pts_between.push(l1.last_pt());