mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-29 04:35:51 +03:00
more OSM types so medium map doesn't immediately crash. trying to fix
bad polyline projection in another branch, but don't have it working yet
This commit is contained in:
parent
3cff2cecd7
commit
6bff2113be
@ -51,10 +51,21 @@ impl ControlStopSign {
|
||||
let r = map.get_parent(*l);
|
||||
let rank = if let Some(highway) = r.osm_tags.get("highway") {
|
||||
match highway.as_ref() {
|
||||
"motorway" => 20,
|
||||
"motorway_link" => 19,
|
||||
|
||||
"primary" => 17,
|
||||
"primary_link" => 16,
|
||||
|
||||
"secondary" => 14,
|
||||
"secondary_link" => 13,
|
||||
|
||||
"tertiary" => 10,
|
||||
"tertiary_link" => 9,
|
||||
"secondary" => 8,
|
||||
|
||||
"residential" => 5,
|
||||
|
||||
"unclassified" => 0,
|
||||
_ => panic!("Unknown OSM highway {}", highway),
|
||||
}
|
||||
} else {
|
||||
|
@ -735,6 +735,8 @@ loading GTFS is actually a bit unclear -- both the map layer and the sim layer
|
||||
have to parse the same GTFS? well, it's like RoadEdits -- we can pass it into
|
||||
the map constructor and physically just load it once.
|
||||
|
||||
routing: https://stackoverflow.com/questions/483488/strategy-to-find-your-best-route-via-public-transportation-only
|
||||
|
||||
|
||||
## Everything as FSMs
|
||||
|
||||
|
@ -27,11 +27,11 @@ pub struct UI {
|
||||
|
||||
impl UI {
|
||||
pub fn new(window_size: Size) -> UI {
|
||||
let mut canvas = Canvas::new(window_size);
|
||||
let canvas = Canvas::new(window_size);
|
||||
// TODO this is only for debug_intersection
|
||||
//canvas.cam_zoom = 7.5;
|
||||
//canvas.center_on_map_pt(1350.0, 400.0);
|
||||
canvas.center_on_map_pt(800.0, 600.0);
|
||||
//canvas.center_on_map_pt(800.0, 600.0);
|
||||
|
||||
UI {
|
||||
canvas,
|
||||
@ -76,12 +76,12 @@ impl gui::GUI for UI {
|
||||
let mut labels: Vec<(Pt2D, String)> = Vec::new();
|
||||
|
||||
if true {
|
||||
self.debug_polygon_drawing(g, &mut labels);
|
||||
self.moving_polyline(g, &mut labels);
|
||||
} else {
|
||||
self.trim_polyline(g, &mut labels);
|
||||
self.debug_intersection(g, &mut labels);
|
||||
self.moving_polyline(g, &mut labels);
|
||||
self.debug_polyline(g, &mut labels);
|
||||
self.debug_polygon_drawing(g, &mut labels);
|
||||
}
|
||||
|
||||
// TODO detect "breakages" by dist from p2 to p2_c beyond threshold
|
||||
|
Loading…
Reference in New Issue
Block a user