Cannot load graph with "encoding does not match"

I have some graphs, but Android app (with 0.4.1 version library) cannot load them with message:
Encoding does not match:
Graphhopper config: car|speedFactor=5.0|speedBits=5|turnCosts=false
Graph: car|speedFactor=5.0|speedBits=5|turnCosts=false|version=1, dir:/sdcard/Download…

Indeed the graph file properties file has “graph.flagEncoders=car|speedFactor=5.0|speedBits=5|turnCosts=false|version=1” line. So the problem seems to be additional “version=1” in the properties. How/why this is there, and how to overcome the issue, preferably without regenerating graph packages?

I know that graphhopper version used for generation and reading must be same, but all the version parameters are same for in library and graph, only difference is this |version=1 in the end of flagEncoders.

Jaak

Yes, there was a change introducing this version annotation, which forces a rebuild even if underlying data format was unchanged. So, if you are sure you know what you are doing and if you have really the same versions revert this commit. See also this identical comment.

Thanks, it seems that library update to 0.5.0 helped and was simpler than I anticipated (minimal changes)

1 Like