Dear community,
I would like to get elevation data along with the regular map matching. According to the documentation, it should be quite easy. However, I do not understand, where I have to put the required line “graph.elevation.provider=srtm”. I copied this line to a new file config.properties, but I am not sure where this one has to go.
Can you help me?
Kind regards,
Evgenia
Yes, you put this in the config.properties and a new import is necessary: https://github.com/graphhopper/graphhopper/blob/master/docs/core/elevation.md, which requires to remove the area-gh
folder
Re 2: ah yes, this seems to be a mismatching between the GH core and map matching repo that we have to fix
Re 2: remove the graph-cache and no mvn clean is necessary
@karussell I have tried to use the elevation information but without success.
I copied the configuration I have on graphhopper API to the one for the map-matching library. And the result is:
graphhopper:
datareader.file: map-data/leipzig_germany.osm.pbf
graph.location: graph-cache
graph.flag_encoders: hike
prepare.ch.weightings: no
graph.elevation.provider: multi
graph.elevation.calc_mean: true
graph.elevation.smoothing: true
graph.elevation.cache_dir: ./srtmprovider/
graph.elevation.dataaccess: RAM_STORE
server:
applicationConnectors:
- type: http
port: 8989
# for security reasons bind to localhost
bindHost: localhost
adminConnectors:
- type: http
port: 8990
bindHost: localhost
However, after removing the graph-cache folder, I run the map-matching import (no errors here) and I try to match a GPX file, but there is no elevation data added to the result GPX.
This is how I import:
java -jar -Xms8G -Xmx8G matching-web/target/graphhopper-map-matching-web-0.12-SNAPSHOT.jar import ../main_maps/andorra_france_spain.osm.pbf --vehicle hike
This is how I match:
java -jar matching-web/target/graphhopper-map-matching-web-0.12-SNAPSHOT.jar match camino-de-santiago-del-baztan.gpx
Thanks in advance!
In fact, the srtmprovider folder is never created. I have tried to copy the one I have in graphhopper main library, but it seems to ignore it.