osrm-backend/profiles/lib/stop_sign.lua
2022-10-28 22:04:02 +02:00

22 lines
629 B
Lua

local StopSign = {}
function StopSign.get_value(node)
local tag = node:get_value_by_key("highway")
if "stop" == tag then
local direction = node:get_value_by_key("direction")
if direction then
if "forward" == direction then
return traffic_flow_control_direction.direction_forward
end
if "backward" == direction then
return traffic_flow_control_direction.direction_reverse
end
end
return traffic_flow_control_direction.direction_all
end
return traffic_flow_control_direction.none
end
return StopSign