-
Notifications
You must be signed in to change notification settings - Fork 143
Description
Hello Brouter users!
multiple requests and ideas were posted in the last months to get a higher “safety” routing:
examples:
#817
“possibility to assign initial cost of an intersection”
#796
“dangerous_junction“
#792
“How to add initialcost for crossing a primary…”
Further requests were also addressed to navigation apps that support a routing with Brouter:
osmandapp/OsmAnd#23314
“and propose a safer traffic light crossing (instead of a highway crossing)”
With @afischerdev we worked in the last weeks on an approach to a solution!
1- The (first) use case we considered:
A biker is riding on a highway such as track, path, residential… and have to cross a primary or secondary highway with very high car-traffic and WITHOUT any securing equipment (such as traffic-signal, zebra...).
The main problem (or challenge):
Of course, all junctions are known in OSM as node, but the junctions without traffic-signal or zebra are generally WITHOUT any tag!
And without a tag, no check can be done on a node…
(on the contrary, when tags allready exist on a node, a check is possible in the node context:
Examples: barrier=block|bollard…, railway=crossing, crossing=traffic_signals, etc..)
2- The approach with a new Pseudo-tag:
2 years ago we introduced s.c. “pseudo-tags” to be able to consider noise, river, forest, town and traffic during the route calculation.
(using a Postgis database, “classes” are precalculated for each OSM segment. The OSM map is then enriched with these “new tags” and the resulting map is used during route calculation in Brouter)
With a similar processing we add now the new pseudo-tag “estimated_crossing_class” to the nodes that we do not consider “secured”:
For that we consider first the junctions (=nodes) where an highway of type tertiary, residential, cycleway, track, path,etc… is crossing a primary or secondary highway.
A filter then eliminates the junctions that are secured by traffic-signal, zebra, roundabout ... or when the traffic is estimated too low.
By “island” or “railway_crossing” the risk / class is only lowered.
Finally a “class” (value between 1 and 6) is estimated, it reflects the estimated risk at the node:
The calculation is based on 3 parameters of the crossed primary/secondary:
a- The pseudo-tag “estimated_traffic_class”
b- The maxspeed
c- The number of lanes
A first version of the pseudo-tag is available and can be visualized using this link:
https://brouter.de/brouter-web/PseudoTags.html
(select “crossing” in the class_type and enter a town name + submit)
Further, the new pseudo-tag is installed on the test-instance of the brouter (see below).
3- How to use the new pseudo-tag for routing / prerequisites ?
The new pseudo-tag is currently installed only on the test-instance:
The new RD5 map-files and a new lookups.dat were installed.
https://brouter.de/brouter-test/#map=13/49.9949/8.6407/osm-mapnik-german_style
Example of use in a profile / Define “node-cost” on unsecured nodes
See “example1.txt”
4- Unexpected detours & left-turns
When setting a high penalty (cost) on nodes, “unexpected” (crazy) detours can appear when the estimated_crossing_class evoluates on the road.
Example:
https://brouter.de/brouter-test/#map=17/49.98964/8.63914/osm-mapnik-german_style&lonlats=8.639291,49.989672;8.638175,49.989361&profile=MTB_NodeCost
An experimental solution to avoid such detours is to introduce a “left-turn” cost at the unsecured nodes!
(a version with “right-turn” cost by left drivers becomes then necessary)
The “left-turn” cost is added to the turn costs when the biker is on the primary/secondary and turns left into an highway with lowpriority classifier.
- A new Brouter version is prerequisite
- The turn-left costs are defined with new /special “global” parameters
Configuration:
Add the following variables in the context:global
See “example2.txt”
Status:
Tests with a the experimental version are possible in the test-instance.
3 profiles were extended to use the new pseudo-tag:
https://brouter.de/brouter-test/#map=13/49.9949/8.6407/osm-mapnik-german_style&profile=racebike-verylowtraffic
https://brouter.de/brouter-test/#map=13/49.9949/8.6407/osm-mapnik-german_style&profile=MTB_light
https://brouter.de/brouter-test/#map=13/49.9949/8.6407/osm-mapnik-german_style&profile=trekking_SB
Remark:
We do not recommend to set the “crossing_penalty” to very high values:
Example:
https://brouter.de/brouter-test/#map=13/48.3097/8.7624/osm-mapnik-german_style&lonlats=8.724424,48.286721;8.727533,48.331476&profile=MTB_light
If no secured crossing exists far away at this place, do not try to set the penalty higher and higher…
Too high penalties can lead to unexpected results by the routing (send the biker on the secondary in the example).
But, whenever possible, compared with the old routing (just set for that “consider_crossing=false) the new routing will avoid unsecured junctions:
In the last example two options are now interesting for a safety routing:
Consider_traffic
Consider_crossing
If you plan as example a route with childrens, very low traffic should be selected using the default option “consider_traffic = as cyclist alone in the week”, but the resulting routing on the preferred residentials crossed the primary 100 meters away from the securing traffic-signal :
Using now at the same time the option “consider_crossing = true”, the route crossed the primary at the traffic-signal.
Thank for any test results, remarks or further ideas
Afischerdev / Essbee