First of all, I’d like to deeply thank you for your project and efforts on keeping it an open source project. It’s amazing how great can the results be achieved
I’m working on a hiking app and would like to pack the Graphhopper data for my offline maps. To start with, I’m setting up a local server so I can serve the results for the hike vehicle without having to pack the Graphhopper data (will do that later).
It’s going pretty good with this, since now I received the routing data and it’s almost as accurate as the one from your online API. To give some context related to my question, check this URL https://graphhopper.com/maps/?point=42.31575%2C2.482717&point=42.322636%2C2.51102&locale=en-GB&vehicle=hike&weighting=fastest&elevation=true&use_miles=false&layer=TF%20Outdoors
It has the vehicle hike set up, an origin and destination points, and the elevation tag set as true.
This I have tried to repeat on my local server, and the route that I receive is the same, except for the elevation data.
I have tried using CGIAR, SRTM, SRTMGL1 and MULTI providers, and so far, the one that gets closer to the online version of Graphhopper is SRTMGL1. But it’s still far from accurate.
In link provided above, I obtain the following results:
- Lenght: 5.79km
- Time: 1h 9min
- Elevation gain: 709m
- Elevation loss: 171m
However, on my local server using SRTMGL1, I obtain:
- Lenght: 6.16km
- Time: 1h 13min
- Elevation gain: 949m
- Elevation loss: 369m
With the other elevation providers (CGIAR, SRTM and MULTI) I get bigger data (longer length, time, elevation gain and elevation loss). So I assume SRTMGL1 is much more precise, and since the downloaded data are bigger, it makes sense.
So how could I achieve similar results (or even identical ones) than the online API Graphhopper ones? If the difference would be small, it would be OK for me, but I see that the difference is too big and doesn’t seem to be good enough.
Any help would be much appreciated.
P.S. If I use the online API, then I get identical elevation gain/loss and length. So the way I’m calculating the elevation gain/loss shouldn’t have anything to do with this. I’m basically assuming the first point has cumulated elevation gain/loss as 0, and then if the next value is bigger than the previous one, I add it to the cumulated elevation gain, if it’s lower, then I add it to the cumulated elevation loss.