[GraphHopper] Unreachable addresses by car

David Ödling davidodling at me.com
Tue Dec 16 14:03:41 UTC 2014


Hi!
I have encountered a problem in finding routes between a few number of addresses. Most work well, but it seems like some addresses on one way streets and in areas with restricted access it fails to find a route. I have implemented a quick-fix for this by adjusting the coordinates in a outgoing  spiral until a route is found. But this is not a good solution in densely populated areas, so,  is there any better solution?

Hopefully, I’m simply doing something wrong by getting this problem, as I do not get the same problem on the test-server:
https://graphhopper.com/maps/?point=10%20Lilla%20Nygatan%2C%2011129%2C%20Stockholm%2C%20Sweden&point=10A%20Arsenalsgatan%2C%20103%2027%2C%20Stockholm%2C%20Sweden&layer=Lyrk <https://graphhopper.com/maps/?point=10%20Lilla%20Nygatan,%2011129,%20Stockholm,%20Sweden&point=10A%20Arsenalsgatan,%20103%2027,%20Stockholm,%20Sweden&layer=Lyrk>

In essence my setup looks like this:

Init:

        hopper = new CustomGraphHopper(settings);
        hopper.setPreciseIndexResolution(1000);
        hopper.forDesktop();
        hopper.setInMemory(true);
        hopper.setOSMFile(osmPath);
        hopper.setGraphHopperLocation("GraphData");
        hopper.setEncodingManager(new EncodingManager("car"));
        hopper.importOrLoad();

Req: 

        GHRequest req = new GHRequest(graph.getNode(from).address.getLatitude(), graph.getNode(from).address.getLongitude(), graph.getNode(to).address.getLatitude(), graph.getNode(to).address.getLongitude())
            .setWeighting("custom")
            .setLocale("SE").setLocale("sv_SE")
            .setVehicle("car").setAlgorithm("dijkstrabi");
        GHResponse rsp = hopper.route(req);


Thanks in advance, 

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20141216/c6269213/attachment.html>


More information about the GraphHopper mailing list