The previous recipe, Visualizing pgRouting results in QGIS, showed you how to manually add pgRouting results to the map. In this chapter, we will use the pgRoutingLayer plugin to get more convenient access to the functions that pgRouting offers, including the most basic algorithms, such as Dijkstra's algorithm, which we have used so far, to more complex algorithms, such as drivingDistance
and alphashape
, which can be used to visualize catchment zones, also known as service areas.
You should first go through the previous recipe, Creating a routing network for pgRouting, to set up the necessary PostGIS tables. Alternatively, you can use your own network tables, but be aware that you may have to alter some of the SQL statements if your table uses different column names.
Additionally, install the pgRoutingLayer plugin from Plugin Installer. You will need to enable experimental plugins in Settings to view this.