From 18391811e42d07ef15eb8fcb64b9b1b2e51ce983 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Fri, 8 Feb 2019 12:43:57 -0800 Subject: [PATCH] use better symbols for stable roads/intersections --- docs/TODO_quality.md | 5 ++--- editor/src/plugins/view/warp.rs | 12 ++++-------- map_model/src/make/initial/merge.rs | 10 +++++----- map_model/src/make/initial/mod.rs | 4 ++-- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/docs/TODO_quality.md b/docs/TODO_quality.md index e786b65a3f..3e091648a7 100644 --- a/docs/TODO_quality.md +++ b/docs/TODO_quality.md @@ -8,11 +8,10 @@ - bad polyline shifting causes jagged lane endings in generalized_trim_back - handle small roads again somehow? - - rename o and O to R and I... easier. :) - - what's going on with O253 generally? + - what's going on with R253 generally? - automate the manual fix. check it in larger 23rd map. - - o40 has a long cut when merged, why not hit in the middle? + - I40 has a long cut when merged, why not hit in the middle? - what if we allow intersections between infinite lines for merged cases? - try it bigger - deal with loop roads? diff --git a/editor/src/plugins/view/warp.rs b/editor/src/plugins/view/warp.rs index 7c5761cb62..04240524b6 100644 --- a/editor/src/plugins/view/warp.rs +++ b/editor/src/plugins/view/warp.rs @@ -99,16 +99,14 @@ fn warp_point(line: String, map: &Map, sim: &Sim, draw_map: &DrawMap) -> Option< 'i' => ID::Intersection(IntersectionID(idx)), 'b' => ID::Building(BuildingID(idx)), 'a' => ID::Area(AreaID(idx)), - // TODO ideally "pa" prefix? - 'e' => ID::Parcel(ParcelID(idx)), + 'P' => ID::Parcel(ParcelID(idx)), 'p' => ID::Pedestrian(PedestrianID(idx)), 'c' => { // This one gets more complicated. :) ID::Car(sim.lookup_car_id(idx)?) } 't' => ID::Trip(TripID(idx)), - // TODO "tu"? - 'u' => { + 'T' => { if let Some(id) = map.lookup_turn_by_idx(idx) { ID::Turn(id) } else { @@ -116,8 +114,7 @@ fn warp_point(line: String, map: &Map, sim: &Sim, draw_map: &DrawMap) -> Option< return None; } } - // TODO "si" - 'o' => { + 'I' => { let stable_id = raw_data::StableIntersectionID(idx); if let Some(i) = map .all_intersections() @@ -130,8 +127,7 @@ fn warp_point(line: String, map: &Map, sim: &Sim, draw_map: &DrawMap) -> Option< return None; } } - // TODO "sr" - 'O' => { + 'R' => { let stable_id = raw_data::StableRoadID(idx); if let Some(r) = map.all_roads().iter().find(|r| r.stable_id == stable_id) { ID::Lane(r.children_forwards[0].0) diff --git a/map_model/src/make/initial/merge.rs b/map_model/src/make/initial/merge.rs index e0e650c804..20b00e7574 100644 --- a/map_model/src/make/initial/merge.rs +++ b/map_model/src/make/initial/merge.rs @@ -6,19 +6,19 @@ use std::collections::HashSet; pub fn short_roads(map: &mut InitialMap) { if false { - // o228 + // I228 merge(map, StableRoadID(311)); - // o201 + // I201 merge(map, StableRoadID(240)); - // o37 + // I37 merge(map, StableRoadID(91)); - // o40 + // I40 merge(map, StableRoadID(59)); - // o25 + // I25 merge(map, StableRoadID(389)); merge(map, StableRoadID(22)); } diff --git a/map_model/src/make/initial/mod.rs b/map_model/src/make/initial/mod.rs index 7ea9f0389a..ce8a76d0aa 100644 --- a/map_model/src/make/initial/mod.rs +++ b/map_model/src/make/initial/mod.rs @@ -171,7 +171,7 @@ impl InitialMap { } if false { - // Delete o247 and O370. remove connection of O370 from o309. + // Delete I247 and R370. remove connection of R370 from I309. m.intersections.remove(&StableIntersectionID(247)); m.roads.remove(&StableRoadID(370)); m.intersections @@ -179,7 +179,7 @@ impl InitialMap { .unwrap() .roads .remove(&StableRoadID(370)); - // make O253's src be the intersection it hits. recalculate that intersection. + // make R253's src be the intersection it hits. recalculate that intersection. m.roads.get_mut(&StableRoadID(253)).unwrap().src_i = StableIntersectionID(119); m.intersections .get_mut(&StableIntersectionID(119))