| Forum | GitHub | Maps | Blog

GraphHopperGtfs.createOrLoad() walk network and osm files



GraphHopperGtfs.createOrLoad() has the arguments createWalkNetwork and osmFiles. If i understand correctly this yields in three possible configurations:

a) set createWalkNetwork to false,
b) set createWalkNetwork to true but do not specify an osm file, and
c) set createWalkNetwork to true and specify an osm file.

What are the implications, especially regarding the first and last (walk) leg? @michaz can you elaborate on this? Thanks.


Hey @Johannes!

createWalkNetwork is an unsupported emergency option when you don’t have or don’t want a street network (OSM data) at all. It basically lets you almost-beeline-walk from station to station.

I don’t know what happens when you combine it with an OSM file. You say you’re getting an exception in another thread, so I guess… that’s it.

Maybe I should remove this. One should have an OSM file.


Removed this. Note that you can still not have an OSM file! (The tests do it like this, except the “multimodal” one.)

You just have to start your trip more or less exactly on a stop then.


OK, thanks for the info.

So if I do not pass an OSM file and my coordinate is not directly on a stop, does it than snap to the nearest stop?


Yeah. Implementation detail: Theres a little 0-length loop link around the stop, and your coordinate snaps to then nearest link.

Just like in MATSim, really.