QGIS Road Graph Plugin

Road Graph Plugin

This plugin finds the shortest path between two points on a polyline layer and creates this path over a road network layer. It is helpful to use it to find distance and travel time.

To use the Road Graph Plugin:

1) Open the .shp file polyline layers you will be working with in QGIS.
2) Select “Road Graph Plugin” under the plugin manager (see this Using Plugins tutorial for more information)
Screen%20Shot%202013-12-07%20at%205.17.51%20PM.png

3) A new section should appear beneath the layers menu titled “Shortest path.” If this doesn’t appear, go to the QGIS menu bar and go through View > Panels and select “Shortest path” so it has a check mark beside it.

Screen%20Shot%202013-12-07%20at%209.41.46%20PM.png

4) Go to the menu bar and look through Vector > Road graph > Settings. A new window titled “Road graph plugin settings” will appear.

5) Select the time unit (hours or seconds), distance unit (kilometers or meters), and the topology tolerance you are going to use (with the layers I’m using, I always have the topology tolerance set to 0.0000).

6) Under the “Transportation layer” tab, choose from the “Layer” drop down list the polyline layer you want to measure a path on. In the second drop down list of “Speed field” choose the unit you want speed to be measured in (kilometers per hour, or meters per second).
Screen%20Shot%202013-12-07%20at%208.34.32%20PM.png

7) Under the “Default settings” tab, select the speed you want the path time to be measured in. Click “Okay” when you’re finished with the settings.

Screen%20Shot%202013-12-07%20at%208.55.32%20PM.png

8) Back on the main QGIS window under the “Shortest path” section, choose your starting point by first clicking the “Capture point” button to the right of the “Start” text box (the image on it is a red dot with four blue arrows pointing towards it) and then selecting the point on your polyline layer. The coordinates should appear in the “Start” text box.

Screen%20Shot%202013-12-07%20at%209.24.35%20PM.png

9) Next, select the ending point on your path with the “Stop” “Capture point” button in the same way you chose your starting point.

Screen%20Shot%202013-12-07%20at%209.29.27%20PM.png

10) To find distance and time from the path you have selected, click “Calculate” and the numerical values will appear in the “Length” and “Time” text boxes respectively, as well as a red line showing your calculated path.

Screen%20Shot%202013-12-07%20at%209.30.11%20PM.png

See Also:

Road Graph Plugin Lesson

QGIS User Manual

Reviewed/Edited by Phuong Tseng