“Connection between locations not found”

I am using GraphHopper Core on a desktop doing offline routing for car. After testing more than 9000 trips I tried, 7 of them show up with “Connection between locations not found” error message. However, those trips have no problem getting driving route on GraphHopper Map.
I found this old article on the forum 0.5.0: Connection between locations not found, which suggested playing with the settings “prepare.minOnewayNetworkSize=200” or decrease “prepare.minNetworkSize”, but that did not work for me.
One example is from (30.263,-97.794) to (30.265,-97.736):

I believe it is something about the origin (30.263,-97.794), since I have another trip with the same origin showing the same error message. Any suggestion?

Ps. Here is some key lines from my code:

String drivingWeight = “fastest”; //shortest, fastest, short_fastest

// Create Gaphhopper instance
GraphHopper hopper;
hopper = new GraphHopperOSM().forDesktop();
hopper.setDataReaderFile(“…/texas-latest.osm.pbf”);
hopper.setGraphHopperLocation(“…/gh-car_”+drivingWeight);
hopper.setEncodingManager(new EncodingManager(“car”));
hopper.getCHFactoryDecorator().setWeightingsAsStrings(drivingWeight);

GHRequest request = new GHRequest(origLat, origLng, destLat, destLng);
request.setWeighting(drivingWeight);
request.setVehicle(“car”);
GHResponse route = hopper.route(request);

“prepare.minOnewayNetworkSize=200” or decrease “prepare.minNetworkSize”, but that did not work for me.

Try increasing them.

Until 0.10 the settings are:

prepare.min_network_size=200
prepare.min_one_way_network_size=200

From 0.11 the settings are:

prepare.min_network_size: 200
prepare.min_one_way_network_size: 200

I have the same problem with graphs generated from osm data, in this website seems there is the same problem, for example
https://graphhopper.com/maps/?point=35.734994%2C51.402969&point=36.058721%2C51.526794&locale=de-DE&vehicle=car&weighting=fastest&elevation=true&use_miles=false&layer=Omniscale

what is the best way to insure that we can have at least one possible route?is it even possible?

This is a different issue (Cannot find point 1). In such a case please create new topics.

1 Like

This setting was the one I tried by adding hopper.setMinNetworkSize(200, 200) (I believe this is doing the same thing as you suggested?), but the problem remains.

As I said: try increasing it e.g. to 600.

Tried up to 20000 but still no luck (still the same 7 routes without connection), is it possible to be some other issue here?

Did you remove the temp data after each test?

Also, @karussell, the default for prepare.min_one_way_network_size in 0.11 (and master) is 0 (https://github.com/graphhopper/graphhopper/blob/master/core/src/main/java/com/graphhopper/GraphHopper.java#L103), not sure if a typo or wishful thinking :slight_smile:

Is there any doc about this parameters?

The parameters remove too small “islands” so that the routing engine snaps to other roads that are properly connected to each other. The difference between the two parameters is that min_network_size sets the value for “obvious” islands and min_one_way_network_size sets the value for islands that are still reachable but only in one direction. Does this help?

1 Like