0

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?

Thermometer
  • 2,567
  • 3
  • 20
  • 41
  • I think that is a duplicate of http://stackoverflow.com/a/26433076/194609 - would you try? – Karussell Jan 16 '15 at 18:23
  • Thanks for your reply! I didn't find that issue before, it could be the same issue as I have. What settings does the GH demo site use? Or what do you suggest me to set it to? I tried setting `prepare.minOnewayNetworkSize=200` and `prepare.minNetworkSize=100`, but the problem for the two examples I gave still persist. Could you maybe elaborate on what the setting does so I can determine what values to set? – Thermometer Jan 19 '15 at 09:42
  • Did you recreate the graph cache so that these settings take effect? – Karussell Jan 28 '15 at 07:01
  • Yeah I did. I begin to suspect it would be a data issue after all... I'll create a new graph with new OSM data and report back – Thermometer Feb 06 '15 at 13:21
  • When using Java code make also sure you are reading the config and do `hopper.init(cmdArgs)` – Karussell Feb 07 '15 at 17:32
  • I am using the API like the GH website does (not with Java). I just used Java in my question to show that a nearest node could be found. I tried a new OSM dataset and one of the examples I gave was 'fixed' (see my edited question). But the other one still remains. I also have a new example [here](https://graphhopper.com/maps/?point=52.284736%2C6.535884&point=52.283072%2C6.533378&vehicle=bike&locale=nl&elevation=true&layer=Lyrk) where a route cannot be found on my machine whilst showing no problems on the GH website. Are you using the exact same network size config as I do? – Thermometer Feb 11 '15 at 09:40
  • Ah, the problem in your case is then probably that you are using two vehicles for one graph. Currently the minOnewayNetworkSize can only be used for one vehicle. See https://github.com/graphhopper/graphhopper/issues/86 – Karussell Feb 11 '15 at 11:35
  • Ah! That seems to make sense indeed, thanks. I'll rerun the prepare for only bike and report back here. How do you do this on the graphhopper website? Do you have multiple processes per vehicle instead of one graph for bike/foot? – Thermometer Feb 11 '15 at 11:43
  • Yes we have multiple JVMs and join them via a simple layer on top. But the main reason for that is that CH is currently also not supported for multiple vehicles. – Karussell Feb 11 '15 at 13:28

1 Answers1

2

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.

Community
  • 1
  • 1
Thermometer
  • 2,567
  • 3
  • 20
  • 41
  • Great work tracking this down, I had the same problem and its roots are not obvious - upvoted. I was getting similar results for routing cars in an archipelago. Since I assume the feature to remove the sub-networks is to protect against undesirable routing behaviour, have you noticed anything problematic from this change? – roganjosh Jul 30 '15 at 13:39