GTFS Database
Project description
Supported Databases
PostgreSQL (PostGIS for Geo tables) - preferred
Oracle - tested
MySQL - tested
SQLite - tested
Installation
All
Install PostgreSQL (and PostGIS) or some other SQLAlchemy-supported RDBMS
Install Distribute (or setuptools) - http://pypi.python.org/pypi/distribute#installation-instructions
Linux
Clone the gtfsdb repository, then run easy_install . at the top level. Or, set up a virtualenv and run python setup.py develop.
Windows
Have a database–the docs and examples assume Postgres & PostGIS are installed - http://www.postgresql.org/download/windows - http://postgis.refractions.net/download/windows/
Install Python 2.6 or 2.7 using an installer from python.org
Install Psygopg2 using installer - http://www.stickpeople.com/projects/python/win-psycopg/
Clone gtfsdb repository
cd to top level of gtfsdb tree
python setup.py install or python setup.py develop
Usage
The GTFS file being used is assumed to be valid.
Example load of GTFS sample into SQLite:
gtfsdb-load http://code.google.com/transit/spec/sample-feed.zip
Example load of GTFS sample into PostgreSQL with PostGIS enabled:
- gtfsdb-load –database_url postgresql://postgres@localhost –is_geospatial
Note: using the is_geospatial arg will take much longer to load
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.