Connection between locations not found on local machine but on the web



I frequently observe that if I run GraphHopper on my local machine it does not find routes between two locations. However, if I query the web demo ( with the same coordinates it finds a valid route.

Below is a code snippet with two locations in Hamburg, Germany. If I run the code it does not find a route. Same coordinates in the web demo and everything is fine (

I use GraphHopper 0.12.0, OSM dump from 11-03-2019 and I am sure that my OSM file covers both locations. Any idea what I am missing?

Best, Johannes

double latitudeFrom = 53.65587;
    double longituteFrom = 10.094348;
    double latitudeTo = 53.58428;
    double longituteTo = 10.15681;

    String osmFile = "myosmfile.osm";
    String storageDirectory = "myghdirectory";

    GraphHopper hopper = new GraphHopperOSM().forServer();

    FlagEncoder encoder = new CarFlagEncoder();
    EncodingManager em = EncodingManager.create(encoder);


    GHRequest req = new GHRequest(latitudeFrom, longituteFrom, latitudeTo, longituteTo).
    GHResponse rsp = hopper.route(req);

    if(rsp.hasErrors()) {
        System.out.println("No route found.");
    } else {
        System.out.println("Route found.");


See e.g. this discussion: “Connection between locations not found”


Thanks, setMinNetworkSize(200,100) was sufficient.