Per default elevation is disabled. But you can easily enable it e.g. via
graph.elevation.provider: cgiar. Or use other possibilities
multi (combined cgiar and gmted).
Then GraphHopper will automatically download the necessary data for the area and include elevation for all vehicles - making also the distances a bit more precise.
The default cache directory
/tmp/<provider name> will be used. For large areas it is highly recommended to use a SSD disc, thus you need to specify the cache directory:
All should work automatically but you can tune certain settings like the location where the files are downloaded and e.g. if the servers are not reachable, then you set:
For CGIAR there are two URLs you can use:
http://srtm.csi.cgiar.org/SRT-ZIP/SRTM_V41/SRTM_Data_GeoTiff/ where the last one is only accessibly if you specify the full zip file
If the geographical area is small and you need a faster import you can change the default MMAP setting to:
The CGIAR data is preferred because of the quality but is in general not public domain. But we got a license for our and our users’ usage: https://graphhopper.com/public/license/CGIAR.txt
Using SRTM instead CGIAR has the minor advantage of a faster download, especially for smaller areas.
Integrating your own elevation data is easy and just requires you to implement the ElevationProvider interface and then specify it via GraphHopper.setElevationProvider. Have a look in the existing implementations for a simple overview of caching and DataAccess usage.