jarondl / pygtfs

A python (2/3) library for GTFS
MIT License
63 stars 44 forks source link

Load database from file? #37

Closed sid-kap closed 6 years ago

sid-kap commented 6 years ago

Is there a way to convert the GTFS feed to a database and cache it to a file, so that every time after that I can load it instantly, rather than doing the GTFS -> database conversion (which takes over a minute) each time?

jarondl commented 6 years ago

Yes, the gtfs2db command should do exactly that - it loads the gtfs and converts it to a sqllite file, which then loads very quickly.

It is installed as a separate command when you install pygtfs.

sid-kap commented 6 years ago

How do I use it? The documentation is not very detailed. Is gtfs2db append feed.zip feed.db the correct usage for creating a new DB?

jarondl commented 6 years ago

Yes, exactly.