a-b-street / abstreet

Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
https://a-b-street.github.io/docs/
Apache License 2.0
7.77k stars 345 forks source link

Heuristics for locating stop signs #520

Open Robinlovelace opened 3 years ago

Robinlovelace commented 3 years ago

Zooming in near residential areas it seems that all junctions have stop signs regardless of road size. Case in point just South of the Institute for Transport Studies building in Leeds:

image

OSM road tags there seem to be mostly residential and on the ground there are not stop signs, cars just roll around except at the traffic lights correctly shown in the top left of the image above.

Tentative suggestion for a quick fix: remove stop signs on residential roads or put stop signs only on certain types of road, something that could be context specific.

Main take-away from the image though: A/B Street can visualise the site more realistically/intuitively than the default OSM basemap, amazing!

Robinlovelace commented 3 years ago

Same site on OSM is less feature rich.

image

Robinlovelace commented 3 years ago

For full reproducibility check this out, URL formed by copy pasting from the OSM basemap URL into the A/B Street URL, this is so cool! https://actdev.cyipt.bike/abstreet/?--actdev=lcid&--cam=18.5/53.80763/-1.55849

dabreegster commented 3 years ago

How it works now: https://github.com/a-b-street/abstreet/blob/5139a88a66501eab334f200f4b1de77d4b63fe7b/map_model/src/objects/stop_signs.rs#L103 1) Classify each incoming road as (highway, arterial, local, dedicated cycleway) based on OSM highway tag 2) If all roads have the same rank, make it an all-way stop. 3) Otherwise, everything stops except the highest-priority roads. 4) Prune out stop sign from extremely short roads, which're likely just part of a junction in reality.

Since all the roads are residential, step 2 is what's happening here. It's a correct heuristic in many US suburbs. Around Seattle, it's sometimes true, sometimes not -- there are plenty of places deliberately lacking stop signs.

OSM sometimes has individual stop signs mapped, but often not.

... So I'm not immediately sure what to do. Probably adding an enum to mapconfig to toggle different heuristics across cities.