Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour of 'TotalDistance' and 'TotalTime' #28

Open
pietervdvn opened this issue Apr 9, 2021 · 1 comment
Open

Behaviour of 'TotalDistance' and 'TotalTime' #28

pietervdvn opened this issue Apr 9, 2021 · 1 comment

Comments

@pietervdvn
Copy link
Contributor

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
Copy link
Contributor

xivk commented May 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants