Converting GTFS to GraphServer

Published on Monday, June 6, 2011

If you want to use Graphserver to do some analysis with GTFS, you will need to convert GTFS into the database. This is how I did it.

Get an appropriate AMI from Amazon's EC2

I used the following AMI. If you have enough memory, you don't need to do this.


Lookup and read the GTFSDB INSTALL.txt document

Prepare system

sudo apt-get install mercurial
hg clone gtfsdb
sudo apt-get install python-setuptools
sudo easy_install psycopg2
sudo apt-get install build-essential

Download GTFS database

ubuntu@domU-12-31-39-00-5D-B8:/mnt/gtfsdb$ pwd
sudo python install
sudo wget
sudo apt-get install python-psycopg2

Prepare configuration file

create = True
database = postgresql://nsw:131500@
filename = /mnt/
geospatial = True
#schema = None

Perform import

python gtfsdb/scripts/