Fixes issues #434 and #431

This commit is contained in:
DennisOSRM 2012-09-26 17:32:09 +02:00
parent df819d20b5
commit dccb9f2424

View File

@ -124,7 +124,7 @@ function way_function (way, numberOfNodesInWay)
(speed_profile[man_made] ~= nil and speed_profile[man_made] > 0)
then
if durationIsValid(duration) then
way.speed = parseDuration / math.max(1, numberOfSegments-1);
way.speed = math.max( duration / math.max(1, numberOfNodesInWay-1) );
way.is_duration_set = true;
end
way.direction = Way.bidirectional;