Sometimes when I use Graphhopper with GTFS I get an interesting result and was wondering if it is intentional. If I want to go from point A to point B and the best route to walk (lets say its 0.3 miles away). If I run it with pt. I get directions to walk farther away from point B just to get on a bus to take me to another stop and then walk to point A when the ideal route is just to walk from point A to point B.
To start the server I run java -Xmx1g -Xms1g -jar graphhopper/web/target/graphhopper-web-*-with-dep.jar datareader.file=osrm/map.osm gtfs.file=tcat-ny-us.zip jetty.port=8988 jetty.resourcebase=./graphhopper/web/src/main/webapp graph.flag_encoders=pt prepare.ch.weightings=no graph.location=./graph-cache &>/dev/null &
If I change graph.flag_encoders to pt,foot would that help?
Is map.osm covering the area of the gtfs? If you can link to the actual used files and let me know the two coordinates or link to the test servers this would help.
The coordinates and information:
Time: 2018-03-04 15:09
Start: 42.44505,-76.479167
End: 42.445786,-76.48304
I hope this helps. In my opinion is it quicker just to walk to the location, but graphhopper suggests a route. I was wondering if this was intentional and if so, is there a way around it.
We currently always (and exclusively) compute a transit trip. Transit routing is not integrated with the rest of the service yet (and uses a different algorithm). It’s currently expected that comparing the transit option with “walk only” or other modes would happen one layer above. This may change.
Thanks @michaz for sharing this! So the OSM network is currently supposed to calculate just the first and last leg. Could we add an option to calculate walking transit trips on the fly or (as you are indicating) does this require a substantial change to the algorithm?
It’s totally possible, and in the previous attempt, it was done, because there it was the natural thing to do. In the current implementation, it will create a slight assymetry which is why it’s currently not in.
But I totally see that it belongs in there. Will put on to-do list.
Thanks for the response! What do you suggest is the best to determine if it is better to walk? I was thinking of comparing total walking distance of transit route vs walking from point a to point b.