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:
committed by
Daniel Patterson
parent
11fde865f7
commit
77b4fbb69c
@@ -269,6 +269,7 @@ function setup()
|
||||
["at:rural"] = 100,
|
||||
["at:trunk"] = 100,
|
||||
["be:motorway"] = 120,
|
||||
["be-vlg:rural"] = 70,
|
||||
["by:urban"] = 60,
|
||||
["by:motorway"] = 110,
|
||||
["ch:rural"] = 80,
|
||||
|
||||
@@ -432,7 +432,7 @@ end
|
||||
|
||||
-- maxspeed and advisory maxspeed
|
||||
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)
|
||||
forward = WayHandlers.parse_maxspeed(forward,profile)
|
||||
backward = WayHandlers.parse_maxspeed(backward,profile)
|
||||
|
||||
Reference in New Issue
Block a user