[GraphHopper] Exception Cannot load the graph - it wasn't create via com.graphhopper.storage.GraphStorage

Peter K peathal at yahoo.de
Fri Aug 23 20:18:11 UTC 2013


Hi Phil,

CH shortcuts are enabled by default in the example configuration and so
it assumes a LevelGraphStorage. Turn this config off or use the Java
code to load it:

hopper.setCHShortcuts(true, true)

Regards,
Peter.

> Hi,
>
> I've been following the guide
> https://github.com/graphhopper/graphhopper/wiki/Developers. I can
> build a graph by calling this in cygwin:
>
> ./graphhopper.sh web europe_germany_berlin.osm
>
> I then try loading it in code using:
>
> GraphHopperAPI gh = new GraphHopper().forServer();
> gh.load("D:\\Processing\\Graphhopper\\graphhopper\\europe_germany_berlin-gh");
>
> but it gives me this exception:
>
> Exception in thread "main" java.lang.IllegalStateException: Cannot
> load the graph - it wasn't create via
> com.graphhopper.storage.GraphStorage!
> D:\Processing\Graphhopper\graphhopper\europe_germany_berlin-gh/
>
> which happens when it checks the first int from the header of the
> nodes DataAccess object against the hashcode of the GraphStorage class
> name.
>
> What am I doing wrong? When you build a graph from the command line
> does it create it using a different class, not GraphStorage? Or does
> Maven somehow build GraphStorage into a different namespace?
>
> many thanks
>
> Phil
>
>  
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/graphhopper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130823/3441b22b/attachment.html>


More information about the GraphHopper mailing list