Fix maxspeed to consider source:maxspeed
tags (#5217)
* In Belgium the maximum speed in rural areas is 70 in the region Flanders * parse maxspeed using source:maxspeed and maxspeed:type tags * add changelog * make maxspeed:advisory more important than maxspeed * add test for source:maxspeed
This commit is contained in:
parent
11fde865f7
commit
77b4fbb69c
@ -12,6 +12,8 @@
|
|||||||
- FIXED: don't override default permissions on /opt [#5311](https://github.com/Project-OSRM/osrm-backend/pull/5311)
|
- FIXED: don't override default permissions on /opt [#5311](https://github.com/Project-OSRM/osrm-backend/pull/5311)
|
||||||
- Matching:
|
- Matching:
|
||||||
- CHANGED: matching will now consider edges marked with is_startpoint=false, allowing matching over ferries and other previously non-matchable edge types. [#5297](https://github.com/Project-OSRM/osrm-backend/pull/5297)
|
- CHANGED: matching will now consider edges marked with is_startpoint=false, allowing matching over ferries and other previously non-matchable edge types. [#5297](https://github.com/Project-OSRM/osrm-backend/pull/5297)
|
||||||
|
- Profile:
|
||||||
|
- ADDED: Parse `source:maxspeed` and `maxspeed:type` tags to apply maxspeeds and add belgian flanders rural speed limit. [#5217](https://github.com/Project-OSRM/osrm-backend/pull/5217)
|
||||||
|
|
||||||
# 5.20.0
|
# 5.20.0
|
||||||
- Changes from 5.19.0:
|
- Changes from 5.19.0:
|
||||||
|
@ -137,3 +137,28 @@ OSRM will use 4/5 of the projected free-flow speed.
|
|||||||
| primary | | | 30 | -1 | | 23 km/h | | 6.7 |
|
| primary | | | 30 | -1 | | 23 km/h | | 6.7 |
|
||||||
| primary | 20 | 30 | | -1 | | 15 km/h | | 4.4 |
|
| primary | 20 | 30 | | -1 | | 15 km/h | | 4.4 |
|
||||||
| primary | 20 | | 30 | -1 | | 23 km/h | | 6.7 |
|
| primary | 20 | | 30 | -1 | | 23 km/h | | 6.7 |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Car - Respect source:maxspeed
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a b c d e f g
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | source:maxspeed | maxspeed |
|
||||||
|
| ab | trunk | | |
|
||||||
|
| bc | trunk | | 60 |
|
||||||
|
| cd | trunk | FR:urban | |
|
||||||
|
| de | trunk | CH:rural | |
|
||||||
|
| ef | trunk | CH:trunk | |
|
||||||
|
| fg | trunk | CH:motorway | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | speed |
|
||||||
|
| a | b | ab,ab | 85 km/h |
|
||||||
|
| b | c | bc,bc | 48 km/h |
|
||||||
|
| c | d | cd,cd | 40 km/h |
|
||||||
|
| d | e | de,de | 64 km/h |
|
||||||
|
| e | f | ef,ef | 80 km/h |
|
||||||
|
| f | g | fg,fg | 96 km/h |
|
@ -269,6 +269,7 @@ function setup()
|
|||||||
["at:rural"] = 100,
|
["at:rural"] = 100,
|
||||||
["at:trunk"] = 100,
|
["at:trunk"] = 100,
|
||||||
["be:motorway"] = 120,
|
["be:motorway"] = 120,
|
||||||
|
["be-vlg:rural"] = 70,
|
||||||
["by:urban"] = 60,
|
["by:urban"] = 60,
|
||||||
["by:motorway"] = 110,
|
["by:motorway"] = 110,
|
||||||
["ch:rural"] = 80,
|
["ch:rural"] = 80,
|
||||||
|
@ -432,7 +432,7 @@ end
|
|||||||
|
|
||||||
-- maxspeed and advisory maxspeed
|
-- maxspeed and advisory maxspeed
|
||||||
function WayHandlers.maxspeed(profile,way,result,data)
|
function WayHandlers.maxspeed(profile,way,result,data)
|
||||||
local keys = Sequence { 'maxspeed:advisory', 'maxspeed' }
|
local keys = Sequence { 'maxspeed:advisory', 'maxspeed', 'source:maxspeed', 'maxspeed:type' }
|
||||||
local forward, backward = Tags.get_forward_backward_by_set(way,data,keys)
|
local forward, backward = Tags.get_forward_backward_by_set(way,data,keys)
|
||||||
forward = WayHandlers.parse_maxspeed(forward,profile)
|
forward = WayHandlers.parse_maxspeed(forward,profile)
|
||||||
backward = WayHandlers.parse_maxspeed(backward,profile)
|
backward = WayHandlers.parse_maxspeed(backward,profile)
|
||||||
|
@ -148,6 +148,7 @@
|
|||||||
{"key": "maxspeed", "value": "AT:rural"},
|
{"key": "maxspeed", "value": "AT:rural"},
|
||||||
{"key": "maxspeed", "value": "AT:trunk"},
|
{"key": "maxspeed", "value": "AT:trunk"},
|
||||||
{"key": "maxspeed", "value": "BE:motorway"},
|
{"key": "maxspeed", "value": "BE:motorway"},
|
||||||
|
{"key": "maxspeed", "value": "BE-VLG:rural"},
|
||||||
{"key": "maxspeed", "value": "BY:urban"},
|
{"key": "maxspeed", "value": "BY:urban"},
|
||||||
{"key": "maxspeed", "value": "BY:motorway"},
|
{"key": "maxspeed", "value": "BY:motorway"},
|
||||||
{"key": "maxspeed", "value": "CH:rural"},
|
{"key": "maxspeed", "value": "CH:rural"},
|
||||||
|
Loading…
Reference in New Issue
Block a user