Visualizing the pgRouting results in QGIS

In the previous recipe, Creating a routing network for pgRouting, we imported a network layer, built the topology, and finally tested the routing. Building on these results, this recipe will show you how to visualize the routing results on a map in QGIS.

Getting ready

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.

How to do it…

To visualize the results in QGIS, we can use the DB Manager SQL window, as shown in the following screenshot. The extended query that we use ...

Get QGIS: Becoming a GIS Power User now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.