-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve speed limit calculation for narrow roads #2732
Comments
Reopening this discussion as I am currently investigating this topic. As of April 2024, OSMR handles narrow ways as follows (standard car profile):
Note: I maintain these rules on the OSM wiki page: https://wiki.openstreetmap.org/wiki/Routing/Narrow_Roads
To clarify, I completely disagree with the original poster. Narrow roads should be tagged based on their physical condition rather than anticipated traffic volume. In Thailand, narrow roads are prevalent in both urban and rural areas due to historical motorcycle use, inadequate infrastructure planning, and budget constraints. Routing cars through these narrow roads, often less than 3 meters wide and bordered by fences or walls, can be extremely challenging, especially when encountering oncoming traffic. Here are some concerns regarding the current rules:
![]() The OSM wiki does not clearly specify the use of
It appears that the bidirectional check is only applied when It's worth considering why borderline cases, such as roads with My proposal, inspired by this GitHub issue: #6712
Looking forward to receiving feedback from the community. Let's work together to improve routing support for narrow roads 😃 Note: I've also put forward a proposal for rendering narrow roads: gravitystorm/openstreetmap-carto#4948 |
This issue seems to be stale. It will be closed in 30 days if no further activity occurs. |
Following a discussion on IRC, I'm opening a ticket here.
A narrow road penalty was implemented in #1338. But halving the speed is way too harsh IMO.
The width of a road (or the number of lanes) is normally related to the throughput of the road, and not to the speed of single vehicles. Yes, you may have to wait until someone from the other direction passed you, or even back up a bit. But 1-lane roads normally have only one lane because it's very calm there, and you're unlikely to bump into someone else. And on a 2-lane road you can also be stuck in a traffic jam (something that's very unlikely on a 1-lane road) or behind a slow vehicle.
Also, most small roads are badly tagged (due to lower traffic thus less mappers). Perhaps some have a width tagged, others don't. Same for the lanes and maxspeed.
I'd prefer to completely remove the narrow-road penalty, and replace it with a penalty based on curvature, or perhaps road classification.
F.e. on a highway=unclassified (the typical narrow road), the legal speed limit is usually 90 km/h around here. But trying to get a speed of 90 km/h would be suicide or murder. On an unclassified road, you can't expect more than 60 km/h in my experience.
Apart from that, lanes=3 and width=3 should be the default for unclassified roads, even if it's not tagged like that (but then the penalty should also be made less harsh, the current speed for roads tagged with lanes=1 is really too low).
The most interesting thing would ofc be speed depending on curvature. Though I don't really know how to calculate that (and make it independent from the density of nodes on the way).
In my example on IRC, the estimated speed ranges from 12 km/h for a street with tagged width but no tagged maxspeed (so the maxspeed defaults to 90 km/h), to 84 km/h for a street with tagged maxspeed but no tagged width (but also just one lane, which should be the default for unclassified roads). I hope you can agree that this difference is too big for two roads that are basically the same.
http://map.project-osrm.org/debug/#16.05/50.94951/3.08938
http://map.project-osrm.org/debug/#16.05/50.93666/3.07863
Actually, the 84 km/h road is a lot slower as it's surrounded by trees which block your view, while the 12 km/h road has an open view most times of the year (if there's no corn on the fields), so you can even get above 60 km/h on that road. But as a routing engine can't realistically take the view around a corner into account, both streets should be about equal.
Thanks for considering this request.
The text was updated successfully, but these errors were encountered: