This commit is contained in:
DennisOSRM 2013-07-17 16:23:57 +02:00
parent 129a846393
commit d2e68068bf

View File

@ -32,13 +32,13 @@ speed_profile = {
["default"] = 50 ["default"] = 50
} }
take_minimum_of_speeds = false take_minimum_of_speeds = false
obey_oneway = true obey_oneway = true
obey_bollards = true obey_bollards = true
use_restrictions = true use_restrictions = true
ignore_areas = true -- future feature ignore_areas = true -- future feature
traffic_signal_penalty = 2 traffic_signal_penalty = 2
u_turn_penalty = 20 u_turn_penalty = 20
-- End of globals -- End of globals
@ -182,11 +182,17 @@ function way_function (way)
-- Set direction according to tags on way -- Set direction according to tags on way
way.direction = Way.bidirectional way.direction = Way.bidirectional
if obey_oneway then if obey_oneway then
if oneway == "-1" then if oneway == "-1" then
way.direction = Way.opposite way.direction = Way.opposite
elseif oneway == "yes" or oneway == "1" or oneway == "true" or junction == "roundabout" or highway == "motorway_link" or highway == "motorway" then elseif oneway == "yes" or
way.direction = Way.oneway oneway == "1" or
oneway == "true" or
junction == "roundabout" or
(highway == "motorway_link" and oneway ~="no") or
(highway == "motorway" and oneway ~= "no")
then
way.direction = Way.oneway
end end
end end