Graph.location not working in command line after graph built with V1.0

Since version 1.0, it looks like the -Ddw.graphhopper.graph.location parameter is not recognised when reloading a previously built graph (it worked OK with 0.13.0).

Running The following command:

java -jar -Xmx60000m -Xms60000m -Ddw.graphhopper.graph.location=D:\OSM\planet-latest.osm-gh -jar C:\Graphhopper\1.0\graphhopper-web-1.0.jar server C:\Graphhopper\1.0\config.yml

gives the following error:

“If no graph.location is provided you need to specify an OSM file”

Am I doing something wrong or does this look like a bug?

The graph.location param works OK when generating a new graph, just not when reloading a previously generated graph.

A workaround seems to be to add the graph location in the config file but it would be better if the command line parameter was still available to avoid having to modify the config file each time the graph changes.

You might have commented out the line graph.location: graph-cache in your config.yml file. See the discussion The trick is just to put some graph.location: graph-cache into config.yml.

1 Like

Thanks. Yes, that was the issue. I did comment out this line, as I was providing the graph location in the command line. I’ve now replaced it as follows and it works OK:

graph.location: “”

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.