Further changes to duration handling
This commit is contained in:
parent
9ecfed4e56
commit
adf0c726ef
@ -136,8 +136,7 @@ function way_function (way, numberOfNodesInWay)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Handling ferries and piers
|
-- Handling ferries and piers
|
||||||
if (speed_profile[route] ~= nil and speed_profile[route] > 0)
|
if (speed_profile[route] ~= nil and speed_profile[route] > 0) then
|
||||||
then
|
|
||||||
if durationIsValid(duration) then
|
if durationIsValid(duration) then
|
||||||
way.duration = math.max( parseDuration(duration), 1 );
|
way.duration = math.max( parseDuration(duration), 1 );
|
||||||
end
|
end
|
||||||
@ -145,7 +144,7 @@ function way_function (way, numberOfNodesInWay)
|
|||||||
if speed_profile[route] ~= nil then
|
if speed_profile[route] ~= nil then
|
||||||
highway = route;
|
highway = route;
|
||||||
end
|
end
|
||||||
if not way.duration > 0 then
|
if tonumber(way.duration) < 0 then
|
||||||
way.speed = speed_profile[highway]
|
way.speed = speed_profile[highway]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -165,6 +164,11 @@ function way_function (way, numberOfNodesInWay)
|
|||||||
end
|
end
|
||||||
way.speed = math.min(speed_profile["default"], maxspeed)
|
way.speed = math.min(speed_profile["default"], maxspeed)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if durationIsValid(duration) then
|
||||||
|
way.duration = math.max( parseDuration(duration), 1 );
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Set access restriction flag if access is allowed under certain restrictions only
|
-- Set access restriction flag if access is allowed under certain restrictions only
|
||||||
if access ~= "" and access_tag_restricted[access] then
|
if access ~= "" and access_tag_restricted[access] then
|
||||||
|
Loading…
Reference in New Issue
Block a user