[GIS] Basic PostGIS and PGRouting question

pgroutingpostgresql

I'm using OSX 10.6 and just downloaded and installed PostgreSQL 9.0.2-1 and pgRouting 1.0.5-1 for Postgres 9.0 from here.

I'm a confused what my next steps are though. I'd like to try loading a simple network into pgRouting and running a few different network routing analyses on it to test it out. However, I don't know where to begin.

How do I open PostgreSQL or pgRouting? I'm fairly comfortable with terminal commands and scripting, but as I installed precompiled versions, I don't know where anything is or what to get at. I have looked at the pgRouting documentation, but I didn't see anything similar to my question.

Best Answer

I was in the same boat as you just a couple of weeks ago and was able to get a shortest path with relative ease by using the tools/information below:

As previously mentioned, I use pgAdminIII as my GUI for writing SQL and managing tables.

As for getting started, I would definitely start by following along with @underdark's excellent A Beginner’s Guide to pgRouting blog posting from a few weeks ago. There are 3 posts in all, so be sure to look at newer posts than this one. I was able to get the shortest route implemented very quickly by following along.

I would also recommend the PostGIS In Action eBook, which has a short section on using pgRouting.

If you want to download OpenStreetMap data, I found the osm2po utility to work fairly easy for loading and configuring the data, which then can give you a starting place and a configured road network in place. Downloading a small spatial extent from CloudMade will speed up your processing time and make it easier to learn, rather than downloading and working with say, an entire country.

Lastly, download a GIS software like QGIS to visualize your network and routing outputs.

Related Question