Performing network analysis
Network analysis allows you to find the most efficient route between two points along a defined network of connected lines. These lines might represent streets, pipes in a water system, the Internet, or any number of connected systems. Network analysis abstracts this common problem so that the same techniques and algorithms can be applied across a wide variety of applications. In this recipe, we'll use a generic line network to perform analysis using the Dijkstra algorithm, which is one of the oldest algorithms used to find the shortest path. QGIS has all of this functionality built in.
Getting ready
First, download the vector dataset from the following link, which includes two shapefiles, and unzip it to a directory named shapes
in your qgis_data
directory:
How to do it...
We will create a network graph by defining the beginning and end of our network of lines, and then use this graph to determine the...