From a92950d2345a30c0a53ff3c985d33d968a802c99 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Sun, 27 Jan 2013 23:01:37 +0100 Subject: [PATCH] Fixes how durations are parsed --- profiles/bicycle.lua | 3 +-- profiles/testbot.lua | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/profiles/bicycle.lua b/profiles/bicycle.lua index 6038126ee..3c14dc250 100644 --- a/profiles/bicycle.lua +++ b/profiles/bicycle.lua @@ -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 diff --git a/profiles/testbot.lua b/profiles/testbot.lua index 3eb1ff339..9c7b103ac 100644 --- a/profiles/testbot.lua +++ b/profiles/testbot.lua @@ -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