I am getting this error when enabling elevation data on GraphHopper: “Caused by: java.lang.IllegalStateException: Configured dimension (3) is not equal to dimension of loaded graph (2)” However, I thought it worked straight out of the box? I realized that by default the variable “elevation” is set to false in GraphHopper.java but after I set it to true it still doesn’t work. Any insight into why changing the GraphHopper.java file doesn’t do anything? I think there’s a jar file being created during the execution of the graphhopper.sh script but I thought it was created from the GraphHopper file?
I figured out that I don’t get the error with the bike2 encoder. Does this mean that I can’t access elevation data if I’m routing using any other encoder? (i.e. generic)
Never mind, it works after I change it back to generic now. I think it was because changing it to bike2 encoder enabled the data to be downloaded? And so it works with any encoder now because the data is already downloaded. It seems strange though that it wouldn’t work automatically with the other encoders.
If you change an import setting like elevation is, you need to do the import again. Then it will work with all encoders. Although e.g. only
bike2 considers the elevation data while routing, the change for the other encoders is just a third dimension of every point of the route.
Yeah, I did the import again and I got the error when doing the import. But after I did the import with bike2 I didn’t get the error, and then I could do the import with other encoders.
You’ll need to call graphHopper.clean or remove the graphhopper files before doing a re-import
Right, I had done that too already. No worries though, it works now!