Routez: Web-based trip planning software
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Routez is a transit planning web service written in Python and Javascript. It uses the libroutez ( library for trip planning functionality.


Install various required packages:

Ubuntu or Debian Linux (older versions e.g. 10.04 Lucid Lynx):

sudo apt-get install -y g++ imagemagick make python-dev ruby ruby1.8-dev \
    ruby-dev swig sqlite3-dev libpcre++-dev

Ubuntu or Debian Linux (newer versions e.g. 11.04 Natty Narwhal):

sudo apt-get install -y g++ imagemagick make python-dev ruby ruby1.8-dev \
    ruby-dev swig libsqlite3-dev libpcre++-dev

MacOS X:

Install an Apple Developer SDK (the iOS dev SDK should work fine), pcre ( and ImageMagick (easiest to install this via MacPorts or similar).

Initialize git submodules from the root directory:

git submodule init
git submodule update

Then, in root, copy local.cfg.tmpl to local.cfg and modify it according to your needs. It should be fairly self-explanatory how to do so-- here's the one I use for

extends = buildout.cfg

server_name =
cmaps_api_key = 6cf313fb0cac592a98c0f60ab0693118
analytics_key = UA-1648932-4
use_local_geocoder = 1

gtfs_file = /Users/wlach/src/
osm_file = /Users/wlach/src/hrm-area-serviced-by-mt-3.osm
gml_file = /Users/wlach/src/ns-geobase/NRN_NS_7_1_GEOM.gml

ssh_alias = hbus
buildout_directory = /home/routez/Sites/hbus

The only section that really demands explanation is geodata.

  • gtfs_file: A general transit feed file of the region you're covering
  • osm_file: An OpenStreetMap file of the road network for the region you're covering (can be omitted if you don't care about trip planning)
  • gml_file: A geometry markup file (as published by of the region you're covering. Canadian-specific, can be omitted for other locales (though typing in an address will no longer work in the travel UI: you'll have to use lat/lng coordinates directly)

Run buildout from the project's root directory:

./bin/buildout -c local.cfg

Run a script to generate the required databases:


Running routez

To run a test server on your workstation, simply run:

./bin/routez runserver

The only currently supported server configuration for routez is currently the Ubuntu Lucid LTS release ( using the nginx web server ( So install that if needed:

sudo apt-get install -y nginx

Remove nginx's default site:

rm /etc/nginx/sites-enabled/default

Link routez to your sites-enabled directory:

ln -s $PWD/etc/routez-nginx.conf /etc/nginx/sites-enabled/routez

Generate static files:

./bin/routez collectstatic

Restart nginx:

/etc/init.d/nginx restart

Start routez:


And you're off! You should be able to get access to routez through your site's IP address.