Skip to content

1. Initial setup: the static data source

Arjan edited this page Oct 29, 2024 · 12 revisions

GTFS2 is setup around the 'static' gtfs data, scheduled trips when/where the vehicles run.

  1. Start to setup the route or local stop with the STATIC datasource (zip), containing only scheduled stop(times)
  2. Optionally you can add real-time data related to the static route or local stop, as well as vehicle locations and alerts, depending on your transport provider.

First route for a GTFS provider

Information: in this wiki I use the data sources of Palmbus Cannes (France) as they offer both static and all realtime services

image

image

It will place the gtfs zip file in the /config/gtfs2 folder and start the extraction to the sqlite database

Note: if not yet available, it will create that 'gtfs2' folder too You can close this screen and now you have to wait until the extraction has finished, i.e. when the sqllite-journal file no longer exists

image

Manual download of zip datasource / placement

If you donot have a link to a file or you want to download the file manually for other reasons:

  • make sure you have a folder /config/gtfs2 (usually (homeassistant/gtfs2)
  • place the zip file into that folder, i.e. for palmbus, the folder should contain a file palmbus.zip
  • use above 1st/first selection option to extract, using the same name as the zip file (without the .zip)

Performance

Extracting can take quite a while depending on zip and system performance, examples:

  • The palmbus.zip 6.7Mb zip extracted to 230Mb sqlite took about 12 minutes
  • The 250Mb zip covering the Netherland extracted to 14+Gb sqlite in 5+ hours

When extracted, you can come back and retry to Setup a route

Clone this wiki locally