PG Routing – Creating a routable network

As an open source alternative to ESRI’s Network Analyst, PG routing provides a very solid platform to perform routing queries. This post, in tandem with posts on shortest distance algorithms and driving distance calculations, will highlight certain basic functionalities within pg routing that I have been playing around with over the past few weeks. I should add that most of this would not have been possible without the help of Anita Graser’s blog, which contains many wonderful posts on the seemingly unlimited capabilities of QGIS!

Pg routing can be downloaded here. Copy the bin, lib and share folders over to your postgres installation folder. Test that it is been installed properly by creating a pg routing enabled database using

 CREATE extension pg_routing 

and then running pgr_version() which should result in details of the pg routing you installed.

Continue reading

Advertisements