diff --git a/extractor.cpp b/extractor.cpp index 1c6d3cf34..04a869927 100644 --- a/extractor.cpp +++ b/extractor.cpp @@ -416,7 +416,7 @@ int main (int argc, char *argv[]) { double distance = ApproximateDistance(edgeIT->startCoord.lat, edgeIT->startCoord.lon, nodesIT->lat, nodesIT->lon); assert(edgeIT->speed != -1); double weight = ( distance * 10. ) / (edgeIT->speed / 3.6); - int intWeight = std::max(1, (int)(edgeIT->isDurationSet ? edgeIT->speed : weight) ); + int intWeight = std::max(1, (int)std::floor((edgeIT->isDurationSet ? edgeIT->speed : weight)+.5) ); int intDist = std::max(1, (int)distance); short zero = 0; short one = 1;