Route not found that should be routable on own Gra

2019-08-29 09:34发布

问题:

The Problem:

On my Graphhopper (GH) installation, there are some cases that are not routable, that should be routable in my opinion. The same route is routable on the GH Demo version, while my installation uses the latest GH code.

Examples:

This route is plannable on GH demo server while I'm getting a "not found" error on my machine.

Though when I call the second point in the locationIndex:

LocationIndex index = hopper.getLocationIndex();
QueryResult qr = index.findClosest( place.lat, place.lon, EdgeFilter.ALL_EDGES );
GHPoint3D snappedPoint = qr.getSnappedPoint();

it is found (around 20-30m from the point). This leads me to believe the OSM data I am using is correct (I doublechecked if roads there are connected and not edited in the last month, because I am using a month old OSM data).

This is another example EDIT: fixed with new dataset! of a route that is not plannable on my machine, while it works on the GH demo server and gets found in the locationIndex. I have not modified the GH code.

Config:

The config I am using on my server is as follows:

graph.dataaccess=RAM_STORE
prepare.chWeighting=no
osmreader.wayPointMaxDistance=1
graph.flagEncoders=bike,foot
web.jsonpAllowed=true

Question:

Is there something I can configure to allow these routes to be routable? Or can you point me into the right direction what the cause of my problem would be?

EDIT: With a new dataset, the second example I posted is 'fixed'. The first one still remains..

Also, a new example. It seems as if my routing machine can't use the 'main' road that GH uses to achieve a result. I double checked if the bike flag encoders (all 3 of them) are the same as the master GH version, and they are. This part was routable with my previous OSM dataset, so I went to see what changed in the OSM data. Unfortunately I cannot see what exactly changed in the data set, but the cyclepath that is adjacent to the main road has oneway=true specified. Maybe this still has something to do with my oneway settings?

回答1:

With the help of Karussel, we have found the problem.

The problem is that some 'sub-networks' in the graph get deleted when preparing the graph, because they fall below the threshold of the minimum amount of nodes needed for a closed-off island to be routable. Lowering this threshold can be done with the following properties in your config.properties (see this question)

prepare.minOnewayNetworkSize=200 
prepare.minNetworkSize=100

This would solve my examples in the question. Though because I am creating a prepared graph for two vehicles (foot & bike), with the current Graphhopper build, this setting is not used. So this only works when having one vehicle in the graph.

The current Github issue for this can be found here.