itinero / routing2

The next version of the Itinero route planner.
Apache License 2.0
7 stars 1 forks source link

Behaviour of 'TotalDistance' and 'TotalTime' #28

Open pietervdvn opened 3 years ago

pietervdvn commented 3 years ago

In a route object, TotalDistance and TotalTime should be multiplied by 100 to get the distance in meters and seconds respectively. This is done by the routebuilder

I know this is done to have more precision, but is that really needed? Having it in meters and seconds is more intuitive and makes using the library easier.

xivk commented 3 years ago

Not strictly needed no, but it saves space for every edge al little bit can add up to quite a lot in the end. The code is here:

https://github.com/itinero/routing2/blob/develop/src/Itinero/Network/Tiles/NetworkTile.cs#L249

Perhaps we could hide this better by doing this in the NetworkTile class and in the rest of the code we use m.