Fixing duration parsing

This commit is contained in:
DennisOSRM
2013-01-30 13:46:20 +01:00
parent e0c211085c
commit 9db884f371
2 changed files with 2 additions and 212 deletions
+2 -3
View File
@@ -139,14 +139,13 @@ function way_function (way, numberOfNodesInWay)
if (speed_profile[route] ~= nil and speed_profile[route] > 0)
then
if durationIsValid(duration) then
way.speed = math.max( parseDuration(duration) / math.max(1, numberOfNodesInWay-1) );
way.is_duration_set = true
way.duration = math.max( parseDuration(duration), 1 );
end
way.direction = Way.bidirectional
if speed_profile[route] ~= nil then
highway = route;
end
if not way.is_duration_set then
if not way.duration > 0 then
way.speed = speed_profile[highway]
end
end