Turn restrictions not working in GraphHopper -


with graphhopper 0.4.0, cannot enable car + bike2 + foot turncosts=true systematically error, can use 2 modes.

but graphhopper 0.4.1 , 0.5 graphhopper-web-0.5-20150422.180133-28-bin it’s worth, turn restrictions not taken @ in consideration in final graph whatever number of vehicles is, still have first error anyway more 2 modes.

so, how increase flags?

plus, if way set private, graphhopper not consider tag , use anyway in both 0.4 or 0.5.

config file

##### vehicles ##### # # possible options: car,foot,bike,bike2,mtb,racingbike,motorcycle (comma separated) # bike2 takes elevation data account (like up-hill slower down-hill) # , requires enabling graph.elevation.provider below graph.flagencoders=bike2,foot  # enable turn restrictions car or motorcycle.  # need additionally set prepare.chweighting=no before using (see below , #270) graph.flagencoders=foot,bike2|turncosts=true  #osmreader.bytesforflags=8 #osmreader.acceptway=car,bike,foot   ##### elevation ##### # # populate graph elevation data use srtm, default noop graph.elevation.provider=srtm # # default location cache /tmp/srtm # graph.elevation.cachedir=./srtmprovider/ # # if have slow disk or plenty of ram change default mmap to: # graph.elevation.dataaccess=ram_store    ##### storage ##### # # configure memory access, use ram_store equipped servers,  # mmap_store_sync used otherwise lot slower graph.dataaccess=ram_store  # if want reduce storage size , don't need instructions resulting path use: # osmreader.instructions=false osmreader.waypointmaxdistance=1   #### speed-up mode vs. flexibility mode #### # # default speed-up mode 'fastest' weighting used. internally graph preparation via # contraction hierarchies done speed routing up. requires more ram/disc space holding # graph less every request. first vehicle of flagencoders list prepared. # prepare.chweighting=fastest # # disable speed-up mode (contraction hierarchies, ch) via enabling flexibility mode: prepare.chweighting=no   ##### web ##### # if want support jsonp response type need add explicitely here. default disabled  # stronger security. web.jsonpallowed=true 

log

com.google.inject.internal.messageprocessor visit infos: exception caught , reported. message: java.lang.illegalargumentexception: encoders requesting more 32 bits of way flags. decrease number of vehicles or increase flags take long. java.lang.illegalstateexception: couldn't load graph     @ com.graphhopper.http.defaultmodule.configure(defaultmodule.java:82)     @ com.google.inject.abstractmodule.configure(abstractmodule.java:59)     @ com.google.inject.spi.elements$recordingbinder.install(elements.java:223)     @ com.google.inject.abstractmodule.install(abstractmodule.java:118)     @ com.graphhopper.http.ghserver$1.configure(ghserver.java:114)     @ com.google.inject.abstractmodule.configure(abstractmodule.java:59)     @ com.google.inject.spi.elements$recordingbinder.install(elements.java:223)     @ com.google.inject.spi.elements.getelements(elements.java:101)     @ com.google.inject.internal.injectorshell$builder.build(injectorshell.java:133)     @ com.google.inject.internal.internalinjectorcreator.build(internalinjectorcreator.java:103)     @ com.google.inject.guice.createinjector(guice.java:95)     @ com.google.inject.guice.createinjector(guice.java:72) @ com.google.inject.guice.createinjector(guice.java:62)     @ com.graphhopper.http.ghserver.start(ghserver.java:62)     @ com.graphhopper.http.ghserver.main(ghserver.java:48) caused by: java.lang.illegalargumentexception: encoders requesting more 32 bits of way flags. decrease number of vehicles or increase flags take long.     @ com.graphhopper.routing.util.encodingmanager.registerencoder(encodingmanager.java:183)     @ com.graphhopper.routing.util.encodingmanager.<init>(encodingmanager.java:106)     @ com.graphhopper.routing.util.encodingmanager.<init>(encodingmanager.java:75)     @ com.graphhopper.graphhopper.init(graphhopper.java:574)     @ com.graphhopper.http.defaultmodule.creategraphhopper(defaultmodule.java:55)     @ com.graphhopper.http.defaultmodule.configure(defaultmodule.java:69)     ... 14 more  exception in thread "main" com.google.inject.creationexception: guice creation errors:  1) explicit bindings required , java.lang.boolean annotated @com.google.inject.name.named(value=jsonpallowed) not explicitly bound.   while locating java.lang.boolean annotated @com.google.inject.name.named(value=jsonpallowed)     field @ com.graphhopper.http.ghbaseservlet.jsonpallowed(ghbaseservlet.java:35)   @ com.graphhopper.http.ghservletmodule.configureservlets(ghservletmodule.java:60)  2) explicit bindings required , java.lang.boolean annotated @com.google.inject.name.named(value=jsonpallowed) not explicitly bound.   while locating java.lang.boolean annotated @com.google.inject.name.named(value=jsonpallowed)     field @ com.graphhopper.http.ghbaseservlet.jsonpallowed(ghbaseservlet.java:35)   @ com.graphhopper.http.ghservletmodule.configureservlets(ghservletmodule.java:63)  3) explicit bindings required , java.lang.boolean annotated @com.google.inject.name.named(value=jsonpallowed) not explicitly bound.   while locating java.lang.boolean annotated @com.google.inject.name.named(value=jsonpallowed)     field @ com.graphhopper.http.ghbaseservlet.jsonpallowed(ghbaseservlet.java:35)   @ com.graphhopper.http.ghservletmodule.configureservlets(ghservletmodule.java:66)  4) exception caught , reported. message: couldn't load graph   @ com.graphhopper.http.ghserver$1.configure(ghserver.java:114)  5) explicit bindings required , com.graphhopper.graphhopper not explicitly bound.   while locating com.graphhopper.graphhopper     field @ com.graphhopper.http.graphhopperservlet.hopper(graphhopperservlet.java:55)   @ com.graphhopper.http.ghservletmodule.configureservlets(ghservletmodule.java:66)  6) explicit bindings required , com.graphhopper.util.translationmap not explicitly bound.   while locating com.graphhopper.util.translationmap     field @ com.graphhopper.http.i18nservlet.map(i18nservlet.java:35)   @ com.graphhopper.http.ghservletmodule.configureservlets(ghservletmodule.java:60)  7) explicit bindings required , com.graphhopper.graphhopper not explicitly bound.   while locating com.graphhopper.graphhopper     field @ com.graphhopper.http.infoservlet.hopper(infoservlet.java:39)   @ com.graphhopper.http.ghservletmodule.configureservlets(ghservletmodule.java:63)  7 errors     @ com.google.inject.internal.errors.throwcreationexceptioniferrorsexist(errors.java:435)     @ com.google.inject.internal.internalinjectorcreator.initializestatically(internalinjectorcreator.java:154)     @ com.google.inject.internal.internalinjectorcreator.build(internalinjectorcreator.java:106)     @ com.google.inject.guice.createinjector(guice.java:95)     @ com.google.inject.guice.createinjector(guice.java:72)     @ com.google.inject.guice.createinjector(guice.java:62)     @ com.graphhopper.http.ghserver.start(ghserver.java:62)     @ com.graphhopper.http.ghserver.main(ghserver.java:48) caused by: java.lang.illegalstateexception: couldn't load graph     @ com.graphhopper.http.defaultmodule.configure(defaultmodule.java:82)     @ com.google.inject.abstractmodule.configure(abstractmodule.java:59)     @ com.google.inject.spi.elements$recordingbinder.install(elements.java:223)     @ com.google.inject.abstractmodule.install(abstractmodule.java:118)     @ com.graphhopper.http.ghserver$1.configure(ghserver.java:114)     @ com.google.inject.abstractmodule.configure(abstractmodule.java:59)     @ com.google.inject.spi.elements$recordingbinder.install(elements.java:223)     @ com.google.inject.spi.elements.getelements(elements.java:101)     @ com.google.inject.internal.injectorshell$builder.build(injectorshell.java:133)     @ com.google.inject.internal.internalinjectorcreator.build(internalinjectorcreator.java:103)     ... 5 more caused by: java.lang.illegalargumentexception: encoders requesting more 32 bits of way flags. decrease number of vehicles or increase flags take long.     @ com.graphhopper.routing.util.encodingmanager.registerencoder(encodingmanager.java:183)     @ com.graphhopper.routing.util.encodingmanager.<init>(encodingmanager.java:106)     @ com.graphhopper.routing.util.encodingmanager.<init>(encodingmanager.java:75)     @ com.graphhopper.graphhopper.init(graphhopper.java:574)     @ com.graphhopper.http.defaultmodule.creategraphhopper(defaultmodule.java:55)     @ com.graphhopper.http.defaultmodule.configure(defaultmodule.java:69)     ... 14 more 

turn restrictions work e.g. car if disable ch prepare.chweighting=no

the illegalargumentexception means should decrease used space or increase available space, error message should improved on how so:

osmreader.bytesforflags=8

fixed via this commit. (btw: differences of versions come due fact need more bits in more recent versions)

now regarding:

plus, if way set private, graphhopper not consider tag , use anyway in both 0.4 or 0.5

we exclude other tags bet against bug :). maybe tell did exactly


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -