[GraphHopper] Graph for all Vehicles?

Peter K peathal at yahoo.de
Thu Jun 13 20:07:42 UTC 2013


Hi Kirill,

if you want multiple vehicles you need to turn off contraction
hierarchies (enabled by default).
To do this comment or remove the prepare.chShortcuts line in
config.properties

If you need CH and multiple vehicles you'll need to do this in multiple
graphs.

> or is this a bug?

there are no bugs ;)

Regards,
Peter.

> Hi,
>
> I'm trying to import osm data using the latest master branch with config:
>
> osmreader.acceptWay=FOOT,BIKE,CAR
>
> I'm getting:
>
> $ ./graphhopper.sh import ../../zurich.osm
> ## using java 1.7.0_21 (64bit) from
> ## using existing osm file ../../zurich.osm
> ## existing jar found
> core/target/graphhopper-0.1-SNAPSHOT-jar-with-dependencies.jar
> ## now import. JAVA_OPTS=-XX:PermSize=60m -XX:MaxPermSize=60m
> -Xmx1000m -Xms1000m
> Exception in thread "main" java.lang.IllegalStateException: multiple
> encoders are active. cannot return one:BIKE,CAR,FOOT
>         at
> com.graphhopper.routing.util.EncodingManager.getSingle(EncodingManager.java:189)
>         at com.graphhopper.GraphHopper.load(GraphHopper.java:426)
>         at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:318)
>         at com.graphhopper.GraphHopper.main(GraphHopper.java:62)
>
>
> Question: is it allowed to have multiple vehicles? (or separate
> graphs? or is this a bug?)
>
> Cheers,
> Kirill




More information about the GraphHopper mailing list