[GraphHopper] turn restrictions

Bruno Carle bruno.carle at gmail.com
Mon Aug 18 12:10:32 UTC 2014


Hi Peter,
I am trying to get the turn restrictions working. But i can not get it to
route accordingly. Actually I can not find out how to enable it.
Also I saw that TurnCostStorage.getTurnCost() is never referenced, except
in some in commented code in GraphhopperStorage... maybe there is no
Weighting class implemented that takes into account the turn restrictions
yet?

Here is my test, the turn restriction being tested should prevent us from
going from Blanicka into Urugayska.


    String osmFile= "../../maps/OLD/prague-latest.osm.pbf";


    GraphHopper graphHopper=new GraphHopper().setInMemory(true)
                .setGraphHopperLocation("/tmp/ghLoc")
                .setOSMFile(osmFile)
                .disableCHShortcuts()
                .setEncodingManager(new EncodingManager("car",4,20));

    graphHopper.importOrLoad();


    GHRequest ghRequest=new GHRequest(new GHPoint(50.07483120416,
14.4390392303),new GHPoint(50.07333, 14.43869));

    GHResponse ghResponse=graphHopper.route(ghRequest);
    System.err.println(ghResponse.getPoints());



route returned :
http://imgur.com/QWLgoOL


Route expected goes around Namesti Miru square:
http://imgur.com/MftaocZ

Thanks,
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20140818/f5dc9415/attachment.html>


More information about the GraphHopper mailing list