Encounter “Caused by: java.lang.IllegalStateException: Heading is not (fully) supported for CHGraph.” error i looked at issue #483 at github i specify the weighting but can’t tell where or what is causing the problem.
GHRequest request = new GHRequest(lat1,lon1,lat2,lon2,90,90);
request.setAlgorithm(AlgorithmOptions.DIJKSTRA_BI);
request.setLocale(Locale.US);
request.getHints().put(“instructions”, true);
request.setVehicle(“car”);
request.setWeighting(“fastest”);
GHResponse response = hopper.route(request);
Using :
Android Graphhopper v0.6.0.
Samsung S5 v5.0.0.
Android Studio
Regards Kevin.
Heading in routing currently works without Contraction Hierarchies (#225), that is you need a flexibility mode graph.
Also to use a fastest path too (#485).
Emux
1 Like
It is very likely that this is a theoretical limitation, but with some workarounds one could make it working in practise (most of the time).
that is you need a flexibility mode graph.
Just fyi: in the latest master you can use a CH-prepared graph and query flexible requests, see this issue comment
1 Like
Karussell can you tell me more about what is a flexibility mode graph?
So i should use the library from github rather than the gradle release one, so that i can achieve routing with headings ?
Sorry, if i am slow but kind of new to these technologies.
Regards Kevin.
To use it you have to disable CH for import via prepare.chWeighting=no
.
In versions >= 0.6.0 (currently not yet released) it is prepare.chWeightings=no
. Or let it enabled and force the flexible mode while routing which will get a runtime parameter like routing.ch.disable=true
(passed via request.getHints().put(xy,true))
1 Like

I did this but can’t get it to work maybe i am doing it wrongly.
Sorry, I meant version > 0.6.0, so for 0.6.0 this won’t work (this way). Please either try the latest master OR import with prepare.chWeighting=no