pgRouting

Create a routing database

We will create a database “routing” and load the PostGIS and pgRouting functions.

createdb -U postgres -E UNICODE routing
createlang -U postgres plpgsql routing
cd /usr/share/postgresql/8.2/contrib/
psql -U postgres -f postgis-1.2.1/lwpostgis.sql routing
psql -U postgres -f postgis-1.2.1/spatial_ref_sys.sql routing
psql -U postgres -f routing_core.sql routing
psql -U postgres -f routing_wrappers.sql routing