-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathREADME
34 lines (21 loc) · 1009 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
GTFS MySQL IMPORT SCRIPT
Author: Tom Lee ([email protected])
This is a simple set of scripts that will import a GTFS dataset into
a lightweight MySQL database. The work is based on Washington, DC's
WMATA GTFS dataset, and has not been thoroughly checked for completeness
against the GTFS spec -- some optional fields or tables may not
currently be supported (but should be trivial to add).
In addition to the GTFS fields, a number of columns have been created
to assist in the conversion of GTFS's string-based date/time
representations to more useful Unix timestamp-style second counts.
DEAD-SIMPLE USAGE:
1. Create a database, e.g. CREATE DATABASE gtfs
2. Run table creation scripts against the database:
cat sql/*.sql | mysql -p -u USERNAME -h HOST -D gtfs
3. Edit settings.py with your mysql details.
4. Put your GTFS files into the gtfs/ folder
5. Run the import script:
python load_gtfs.py
6. Run the time index creation script:
python build_indices.py
7. Build something neat