Closed TomQv closed 6 years ago
Some feedback already:
The first step is doable without too much changes to the existing way of working.
The second step is more complex because routing only depends on:
So we would need to add something extra to the core routing infrastructure. Als check the roadmap:
https://github.com/itinero/routing/wiki/Roadmap#version-20-and-beyond
I bumped the elevation-profiles, the first step here, to the roadmap for version 1.4:
https://github.com/itinero/routing/wiki/Roadmap#version-14
The following needs to be done:
Second step is not trivial. For example bicycle or hiking in the mountains, where speed is depending on the gradient, which can even vary along one edge. Maybe one solution could be to compute a constant factor for each edge based on the elevation profile in preprocessing and use this factor later in the lua for the vehicle-profile to calculate the actual costs. There is information available about how the profile is affecting speed eg. for hikers here (only in German).
I had something similar in mind yes... Thinking a bit further on this it may be possible to introduce the first step without breaking changes and affecting the core algorithms.
The advantage here is that it doesn't break the RouterDb (as much) and when there is no elevation data nothing changes. We also need to think about how to extend the routing profiles for the second step, that may be the biggest issue.
We could also figure out how to store the elevation data seperate from the routerdb, perhaps you are also rendering it, and post-process routes to add the elevation data.
This has now been implemented, needs some real-world testing but the tests I did are looking good. There is a sample available:
https://github.com/itinero/routing/blob/develop/samples/Sample.Elevation/Program.cs
Full support, and then I mean elevation support in routing profiles are for Itinero 2.0 and are on the roadmap:
http://docs.itinero.tech/docs/itinero/development/index.html
Proposal for enhancement:
Second step: