mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-27 00:12:55 +03:00
use better symbols for stable roads/intersections
This commit is contained in:
parent
d261d69fa5
commit
18391811e4
@ -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?
|
||||
|
@ -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)
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user