Difference between revisions of "Network Analysis: Finding shortest path in QGIS"

From CUOSGwiki
Jump to navigationJump to search
Line 140: Line 140:
   
   
 
Click somewhere in Canadian Museum of Nature.
 
Use the Capture Point button next to the Stop field and capture the point of Canadian War Museum.
   
Click somewhere in Canadian Museum of Nature.
 
Use the Capture Point button next to the Stop field and capture the point of Canadian War Museum.
 
Click on the Calculate button to see the solution:
 
   
 
[[File:Start.PNG|300px|thumb|left]]
   
[[File:Length.PNG|200px|thumb|left]]
 
 
   
   
Line 154: Line 152:
   
   
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
 
Click on the Calculate button to see the solution:
  +
  +
  +
  +
[[File:Length.PNG|200px|thumb|left]]
 
   
   
Line 181: Line 202:
   
 
The result for shortest path is shown below
 
The result for shortest path is shown below
[[File:Res1.PNG|200px|thumb|left]]
+
[[File:Res1.PNG|400px|thumb|left]]
   
   

Revision as of 20:02, 16 December 2014

Introduction

Calculating the shortest distance between two points is a commonly cited use for GIS. QGIS ships with this tool, but it’s not visible by default. In this tutorial we will show you what you need to get started.

Data

Acquired QGIS (version 2.6)

QgisLOGO.PNG You need to install Quantum GIS version 2.6 in order to get activate the road graph plugin.

Road Graph Plugin

  • Activate the Tool
Plugin.PNG













To activate the Road Graph plugin: Start the Plugin Manager by clicking on the QGIS main window’s menu item Plugins ‣ Manage Plugins. A dialog appears. Click OK on the Plugin Manager dialog.



This panel will appear in your interface

Panel.PNG












If the plugin doesn't show automatically in your interface, go to View ‣ Panels and ensure that Shortest path has a check mark next to it.


  • Configure the Tool
Config.PNG













Time Unit and Distance Unit we leave as default in hour and kilometer. Topology tolerance: In case if there is a gap between two lines to treat them as continuous, the topology tolerance may be applied, for example 10m. In our case we left as default 0. On the Transportation Layer, we choose the layer of the roads. In this case the clipped roads. For the direction field we leave as default. In other cases, while in the attribute table we might have a direction field, we might use the value of this field for direction. For this project we don't have any data for the direction. We keep the speed limit as default. And we choose the speed limit value under the Default Settings tab. For this example the speed was chosen 60 km/h as shown in Figure below.

Setting.PNG













  • Use the Tool

Suppose we want to calculate the distance in length from Canadian Museum of Nature to Canadian War Museum. In the plugin panel, click on the Capture Point button next to the Start field:

St.PNG




Click somewhere in Canadian Museum of Nature. Use the Capture Point button next to the Stop field and capture the point of Canadian War Museum.


Start.PNG













Click on the Calculate button to see the solution:


Length.PNG














The result for shortest path is shown below

Res1.PNG













  • Using Criteria

Conclusion

References