Creating a graph from multiple GTFS files?

Hi, I was wondering what the syntax would be for including multiple GTFS files for a graph build using GraphHopper. I found the gtfs.file and gtfs.files options, but these only seem to allow me to specify at most two GTFS files - I’ve tried specifying multiple gtfs.file[…] options or specifying gtfs.files as a comma-separated list of GTFS zip files, but both attempts only recognize two feeds at most.

Also, is there a documentation for all of the different options somewhere? I’m having trouble finding it.

Thank you

AFAIK, this is not possible at the moment. Probably you would have to merge the GTFS files before, and then import them into GraphHopper. I don’t know how to merge GTFS files, but for OSM files there is for example Osmosis.

BTW: PRs are always welcome :slight_smile:

1 Like

@boldtrn are you sure? I think it should be possible, maybe some command line parameter ugliness.

To be honest I am not sure :slight_smile:. I haven’t seen this before and I am quite certain that it’s not possible for OSM, so my assumption was that it wouldn’t be possible for GTFS either.

Oh, it is possible! It’s “just” not very well tested yet, and “just” not easily accessible.
Let me have a look, be back later.

Hmm, can’t try at the moment, but the code looks like you can say gtfs.file=file1,file2,file3
See PtModule.createGraphHopperStorage

Buyer beware though, this hasn’t been used a lot.

Also, you say you tried that – But I can’t find anything which looks like it would impose a maximum of two files.

4 Likes

Thanks for clarifying this Micha :slight_smile:. Something new to learn every day.

Powered by Discourse