diff --git a/Cargo.lock b/Cargo.lock index 0c5966e8ed..dbf546db51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2206,6 +2206,7 @@ dependencies = [ "enumset", "fast_paths", "geom", + "kml", "log", "nbez", "petgraph", diff --git a/convert_osm/src/lib.rs b/convert_osm/src/lib.rs index 09683d16ac..4e62024122 100644 --- a/convert_osm/src/lib.rs +++ b/convert_osm/src/lib.rs @@ -18,7 +18,6 @@ mod extract; pub mod osm_geom; mod parking; pub mod reader; -mod snappy; mod split_ways; mod transit; @@ -123,10 +122,6 @@ pub fn convert(opts: Options, timer: &mut abstutil::Timer) -> RawMap { add_extra_buildings(&mut map, path).unwrap(); } - timer.start("snap cycleways"); - snappy::snap_cycleways(&mut map); - timer.stop("snap cycleways"); - map.config = opts.map_config; map } diff --git a/game/src/lib.rs b/game/src/lib.rs index e4af4428f7..570919115f 100644 --- a/game/src/lib.rs +++ b/game/src/lib.rs @@ -360,9 +360,7 @@ fn finish_app_setup( if let Some(ref mut secondary) = app.secondary { secondary.sim.timed_step( &secondary.map, - // And actually, make it easier to distinguish the two maps by setting the - // alternate in the future slightly! - Duration::hours(6) + Duration::minutes(30), + Duration::hours(6), &mut None, &mut Timer::throwaway(), ); diff --git a/map_model/Cargo.toml b/map_model/Cargo.toml index 7fd52977b9..303104c731 100644 --- a/map_model/Cargo.toml +++ b/map_model/Cargo.toml @@ -11,6 +11,7 @@ anyhow = "1.0.38" enumset = { version = "1.0.3", features=["serde"] } fast_paths = { git = "https://github.com/easbar/fast_paths", branch = "large_edge_weights_quick_fix" } geom = { path = "../geom" } +kml = { path = "../kml" } log = "0.4.14" nbez = "0.1.0" petgraph = { version = "0.6.0", features=["serde-1"] } diff --git a/map_model/src/make/mod.rs b/map_model/src/make/mod.rs index baf42fc5b9..29c1e40416 100644 --- a/map_model/src/make/mod.rs +++ b/map_model/src/make/mod.rs @@ -26,6 +26,7 @@ mod medians; pub mod merge_intersections; mod parking_lots; pub mod remove_disconnected; +pub mod snappy; pub mod traffic_signals; mod transit; pub mod turns; diff --git a/convert_osm/src/snappy.rs b/map_model/src/make/snappy.rs similarity index 99% rename from convert_osm/src/snappy.rs rename to map_model/src/make/snappy.rs index ea7713bff6..284fb2d746 100644 --- a/convert_osm/src/snappy.rs +++ b/map_model/src/make/snappy.rs @@ -4,8 +4,9 @@ use abstio::MapName; use abstutil::MultiMap; use geom::{Distance, FindClosest, Line, PolyLine}; use kml::{ExtraShape, ExtraShapes}; -use map_model::raw::{OriginalRoad, RawMap}; -use map_model::Direction; + +use crate::raw::{OriginalRoad, RawMap}; +use crate::Direction; const DEBUG_OUTPUT: bool = false; diff --git a/map_model/src/raw.rs b/map_model/src/raw.rs index 114b5b44f6..e5cb29f360 100644 --- a/map_model/src/raw.rs +++ b/map_model/src/raw.rs @@ -529,6 +529,11 @@ impl RawMap { crate::make::collapse_intersections::trim_deadends(self); timer.stop("trimming dead-end cycleways"); + // Not sure yet about the right order for these + timer.start("snap separate cycleways"); + crate::make::snappy::snap_cycleways(self); + timer.stop("snap separate cycleways"); + crate::make::remove_disconnected::remove_disconnected_roads(self, timer); timer.start("merging short roads");