Fixes how durations are parsed
This commit is contained in:
parent
ccdc6f1a63
commit
a92950d234
@ -162,8 +162,7 @@ function way_function (way, numberOfNodesInWay)
|
||||
way.direction = Way.bidirectional
|
||||
way.ignore_in_grid = true
|
||||
if durationIsValid(duration) then
|
||||
way.speed = math.max( parseDuration(duration) / math.max(1, numberOfNodesInWay-1) )
|
||||
way.is_duration_set = true
|
||||
way.duration = math.max( 1, parseDuration(duration) )
|
||||
else
|
||||
way.speed = route_speeds[route]
|
||||
end
|
||||
|
@ -49,9 +49,7 @@ function way_function (way, numberOfNodesInWay)
|
||||
way.name = name
|
||||
|
||||
if route ~= nil and durationIsValid(duration) then
|
||||
way.ignore_in_grid = true
|
||||
way.speed = math.max( 1, parseDuration(duration) / math.max(1, numberOfNodesInWay-1) )
|
||||
way.is_duration_set = true
|
||||
way.duration = math.max( 1, parseDuration(duration) )
|
||||
else
|
||||
way.speed = speed_profile[highway] or speed_profile['default']
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user