Difference between revisions of "Evaluating Landscape Permeability in Quantum"

From CUOSGwiki
Jump to navigationJump to search
 
(299 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
==Disclaimer==
 
==Disclaimer==
::[[File:Wolf1.png|thumb|100px|frame| Vancouver Island Grey Wolf]]
+
::[[File:animation.gif|thumb|100px|frame| Vancouver Island Grey Wolf]]
  +
Please note that this Wiki tutorial has been produced for the GEOM4008 Advanced Topics in Geographic Information Systems class at Carleton University.
 
  +
Please note that this Wiki has been produced for the [http://www4.carleton.ca/cu0809uc/courses/GEOM/4008.html GEOM4008 Advanced Topics in Geographic Information Systems] class at [http://carleton.ca/ Carleton University] strictly as a tutorial to showcase the method of calculating landscape permeability using FOSS. The results should by no means be taken as a true analysis of grey wolf movement since much of the data were fictional.
   
 
==Introduction==
 
==Introduction==
   
The objective of this project was to develop a method to evaluate landscape permeability for large carnivores using only Free and Open-Source Software (FOSS). This tutorial has been created to allow non-GIS individuals to successfully complete this analysis in Quantum GIS (1.7.4) using the Grass Plugin. This tutorial will be carried out while analyzing the landscape permeability for grey wolf movement on Vancouver Island. The final result from this project will be a landscape permeability map and provide invaluable insight into the movement of the grey wolf. This information can be used to implement more successful conservation strategies, facilitate ecosystem-based management (EMB), and better understand the genetic flow in the island’s population.
+
The objective of this project was to develop a method to evaluate [http://www.rewilding.org/LandscapePermeability.html landscape permeability] for large carnivores using only [http://en.wikipedia.org/wiki/Free_and_open-source_software Free and Open-Source Software (FOSS)]. This tutorial has been created to allow non-GIS individuals to successfully complete this analysis in [http://www.qgis.org/ Quantum GIS] (1.7.4) using the [http://grass.osgeo.org/ GRASS] Plugin. This tutorial will be carried out while analyzing the landscape permeability for grey wolf movement on [http://en.wikipedia.org/wiki/Vancouver_Island Vancouver Island]. The final result of this project will be a landscape permeability map which will attempt to provide valuable insight into the movement of the [http://www.geog.uvic.ca/viwilds/iw-wolf.html Vancouver Island grey wolf]. This sort of information could potentially be used to implement more successful conservation strategies, facilitate [http://en.wikipedia.org/wiki/Ecosystem-based_management ecosystem-based management] (EBM), and better understand the genetic flow of the island’s population.
   
 
==Data==
 
==Data==
   
Before beginning this tutorial in Quantum GIS(QGIS) a variety of data is needed. In order to evaluate landscape permeability the data must be specific to the area and animal chosen to analyse. After the animal has been chosen parameters that would inhibit movement in the study area should be studied and then data must be located. For our analysis of movement on the grey wolf on Vancouver Island we used a combination of freely available data, as well as data we created for the purpose of this tutorial. See Table 1 for the data used and the source of the data.
+
Before beginning this tutorial in Quantum GIS (QGIS) a variety of data is needed. In order to evaluate landscape permeability the data must be specific to the area and animal chosen to analyze. After the animal has been chosen, parameters that would inhibit movement in the study area should be studied, and then data must be located. For our analysis of movement on the grey wolf on Vancouver Island, we used a combination of freely available data, as well as self-created data for the purpose of this tutorial. See Table 1 for the data used and the source of the data.
   
   
Line 15: Line 16:
 
|+'''Table 1. Data Used and Data Sources for Vancouver Island Grey Wolf'''
 
|+'''Table 1. Data Used and Data Sources for Vancouver Island Grey Wolf'''
 
|-
 
|-
! style="background:#efefef;" | Data Used
+
! style="color:#FFFFFF; background:#228822;" | Data Used
! style="background:#efefef;" | Data Source
+
! style="color:#FFFFFF; background:#228822;" | Data Format
  +
! style="color:#FFFFFF; background:#228822;" | Data Source
 
|-
 
|-
 
| Boundary of Vancouver Island
 
| Boundary of Vancouver Island
  +
| Vector Polygon
 
| [http://geo2.scholarsportal.info/#r/tab/browseTab Scholars Geoportal] Layer: Dissemination Blocks - Cartographic Boundary File (DB-CBF), 2011 Census / Producer: Statistics Canada
 
| [http://geo2.scholarsportal.info/#r/tab/browseTab Scholars Geoportal] Layer: Dissemination Blocks - Cartographic Boundary File (DB-CBF), 2011 Census / Producer: Statistics Canada
 
|-
 
|-
 
| Lakes
 
| Lakes
  +
| Vector Polygon
 
|[http://geo2.scholarsportal.info/#r/tab/browseTab Scholars Geoportal] Layer: Minor Water Regions (MNWTR) / Producer: DTMI Spatial Inc.
 
|[http://geo2.scholarsportal.info/#r/tab/browseTab Scholars Geoportal] Layer: Minor Water Regions (MNWTR) / Producer: DTMI Spatial Inc.
 
|-
 
|-
 
|Parks
 
|Parks
  +
| Vector Polygon
 
|[http://geo2.scholarsportal.info/#r/tab/browseTab Scholars Geoportal] Layer: Parks and Recreation - Region / Producer: DTMI Spatial Inc.
 
|[http://geo2.scholarsportal.info/#r/tab/browseTab Scholars Geoportal] Layer: Parks and Recreation - Region / Producer: DTMI Spatial Inc.
 
|-
 
|-
 
| Landcover
 
| Landcover
  +
| Vector Polygon
| [http://www.geobase.ca/geobase/en/data/landcover/index.html;jsessionid=8AA56CB430A0F096D082E9FEFC70C3EC GeoBase] Layer: Land Cover / Producer: Circa 2000
 
  +
| [http://www.geobase.ca/geobase/en/data/landcover/index.html;jsessionid=8AA56CB430A0F096D082E9FEFC70C3EC GeoBase] Layer: Land Cover / Circa 2000
 
|-
 
|-
 
| DEM
 
| DEM
  +
| Raster
 
| [http://www.geobase.ca/geobase/en/data/cded/index.html GeoBase] Layer: Canadian Digital Elevation Data / Producer: Natural Resources Canada
 
| [http://www.geobase.ca/geobase/en/data/cded/index.html GeoBase] Layer: Canadian Digital Elevation Data / Producer: Natural Resources Canada
 
|-
 
|-
 
| Road Density
 
| Road Density
  +
| Raster
 
| Created Data
 
| Created Data
 
|-
 
|-
 
| Grey Wolf Range
 
| Grey Wolf Range
  +
| Vector Points & Polygon
 
| Created Data
 
| Created Data
 
|-
 
|-
 
| Deforestation on Vancouver Island
 
| Deforestation on Vancouver Island
  +
| Vector Polygon
 
| Created Data
 
| Created Data
 
|-
 
|-
 
| Hunting Camps
 
| Hunting Camps
  +
| Vector Polygon
 
| Created Data
 
| Created Data
 
|-
 
|-
Line 51: Line 62:
 
==Methods==
 
==Methods==
   
It is highly recommended that these methods are done in order.
+
It is highly recommended that these methods are done in sequential order due to the number of step needed to complete this analysis.
   
===Preprocessing===
+
===QGIS Setup===
   
  +
Before you can begin in QGIS, you must first locate all the data that you wish to use. A good place to start if you are unsure where to find free data would be [http://geo1.scholarsportal.info/ Scholars GeoPortal*] and [http://www.geobase.ca/ GeoBase]. Once you have found all the data you wish to use, create a folder in your computer and place the data in this folder.
====Before QGIS====
 
  +
 
  +
<nowiki>*</nowiki> Note: Scholars GeoPortal data is only available to students attending universities whose libraries are a member of the [http://www.ocul.on.ca/ OCUL].
Before you can begin in QGIS you must first locate all the data that you wish to use. A good place to start if you are unsure where to find free data would be Scholars Geoportal and GeoBase. Links to these sites can be found in Table 1. Once you have found all the data you wish to use create a folder in your computer and place the data in this folder.
 
   
====Opening QGIS====
+
===Opening QGIS===
Before beginning ensure that Quantum GIS is installed on the computer you wish to use. If you do not have QGIS installed, [http://hub.qgis.org/projects/quantum-gis/wiki/Download download QGIS].
+
Before beginning, ensure that Quantum GIS is installed on the computer you wish to use. If you do not have QGIS installed, [http://hub.qgis.org/projects/quantum-gis/wiki/Download download QGIS].
*Once the installation has been completed, or if QGIS was already installed, click the QGIS icon to open the program. [[File:Icon.png]] This will open the initial QGIS window.
+
*Once the installation has been completed, or if QGIS was already installed, click the QGIS Icon to open the program. [[File:Icon.png]] This will open the initial QGIS Window.
 
*Immediately go to the File Tab. [[File:Filetab.png]]
 
*Immediately go to the File Tab. [[File:Filetab.png]]
 
*Click Save Project As. [[File:Saveas.png]]
 
*Click Save Project As. [[File:Saveas.png]]
 
*Save your project in the folder with all your data.
 
*Save your project in the folder with all your data.
*IMPORTANT NOTE: Remember to save your project often. [[File:Save.png]]
+
*IMPORTANT NOTE: Remember to save your project often by clicking Save. [[File:Save.png]]
   
====Installing the Grass Plugin====
+
===Installing the GRASS Plugin===
Once the initial QGIS window has been opened it is highly recommended that the GRASS plugin be installed next. The Grass plugin allows the tools from Grass to be used within QGIS.
+
Once the initial QGIS window has been opened, it is highly recommended that the GRASS Plugin be installed next. The GRASS Plugin allows the tools from [http://grass.osgeo.org/ GRASS GIS] to be used within QGIS.
 
*Go to the Plugins Tab. [[File:Pluginstab.png]]
 
*Go to the Plugins Tab. [[File:Pluginstab.png]]
 
*Click Manage Plugins. [[File:Manageplugins.png]]
 
*Click Manage Plugins. [[File:Manageplugins.png]]
 
*This will bring you to the QGIS Plugin Manager Window.
 
*This will bring you to the QGIS Plugin Manager Window.
 
*In filter write GRASS. [[File:filterg.png]]
 
*In filter write GRASS. [[File:filterg.png]]
*Click on the GRASS Plugin and make sure there is an x in the box. [[File:GRASS.png]]
+
*Click on the GRASS Plugin and make sure there is an X in the box. [[File:GRASS.png]]
 
*Finally, click OK. [[File:OK.png]]
 
*Finally, click OK. [[File:OK.png]]
  +
*Go back to the Plugins Tab, [[File:Plugins.png]] a new GRASS Tab should have appeared. [[File:GRASS1.png]]
 
  +
*Now, go back to the Plugins Tab, [[File:Plugins.png]] a new GRASS Tab should have appeared. [[File:GRASS1.png]]
*Hold your curser over Grass and a new Grass list will appear. As you can see most of the tools are grayed out.
 
  +
*Expanding this GRASS menu reveals that most of the tools are greyed out.
*In order to fix this click on New Mapset. The Mapset is the location where you want your grass files to be stored. [[File:NewMapset.png]]
 
  +
*In order to fix this click on New Mapset. The Mapset is the location where you want your GRASS files to be stored. [[File:NewMapset.png]]
*Click Browse [[File:Browse.png]] and then go to your chosen destination.
 
  +
*Click Browse [[File:Browse.png]], and then go to your chosen destination.
 
*Once you have browsed to the location, click Next. [[File:Next.png]]
 
*Once you have browsed to the location, click Next. [[File:Next.png]]
 
*Now you will create a new GRASS location. We named ours GRASS. [[File:Newlocation.png]]
 
*Now you will create a new GRASS location. We named ours GRASS. [[File:Newlocation.png]]
 
*Then click Next. [[File:Next.png]]
 
*Then click Next. [[File:Next.png]]
*This will bring you to the Projection window. Defining your projection is extremely important.
+
*This will bring you to the Projection Window. Defining your projection is extremely important.
*Click the circle beside Projection. [[File:Projection.png]] You must chosen the projection based on your study location. ***link to website*** As our location is in Vancouver Island we chose Universal **Transverse Mercator (UTM), NAD83 (NSRS2007) /UTM zone 10N. [[File:Zone10.png]]
+
*Click the circle beside Projection. [[File:Projection.png]] You must chosen the projection based on your study location; for more information on choosing an appropriate projection, see this [http://www.georeference.org/doc/guide_to_selecting_map_projections.htm Guide to Selecting Map Projections]. Since our location was in Vancouver Island, we chose Universal Transverse Mercator (UTM), NAD83 (NSRS2007) /UTM zone 10N. [[File:Zone10.png]]
*Once you have chosen your projection click Next. [[File:Next.png]]
+
*Once you have chosen your Projection, click Next. [[File:Next.png]]
 
*This will bring you to the Define GRASS Region Window.
 
*This will bring you to the Define GRASS Region Window.
*Scroll to the country your study area is in and click Set. [[File:Set.png]]
+
*Scroll to the country of your study area, and click Set. [[File:Set.png]]
 
*Then click Next. [[File:Next.png]]
 
*Then click Next. [[File:Next.png]]
*This will bring you to the Mapset window.
+
*This will bring you to the Mapset Window.
 
*Name your new Mapset. We named ours Mapset. [[File:Mapset.png]]
 
*Name your new Mapset. We named ours Mapset. [[File:Mapset.png]]
 
*Click Next. [[File:Next.png]]
 
*Click Next. [[File:Next.png]]
 
*Then click Finish. [[File:Finish.png]] Your new mapset has now been created!
 
*Then click Finish. [[File:Finish.png]] Your new mapset has now been created!
*If you go back to the Plugins Tab you can see that the tools are no longer grayed out. Depending on the computer you are using you may have to open the mapset every time you open and close QGIS.
+
*Now if you go back to the Plugins Tab, you can see that the tools are no longer grayed out. Depending on the computer you are using you may have to open the mapset every time you open and close QGIS.
*In order to do this go to the Plugins Tab. [[File:Plugins.png]]
+
*In order to do this, go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS [[File:GRASS1.png]]
 
*Lastly, click Open Mapset. [[File:OpenMapset1.png]]
 
*Lastly, click Open Mapset. [[File:OpenMapset1.png]]
  +
 
  +
==Workspace Setup==
====Add Vector Layers to QGIS====
 
  +
Before beginning any data processing, the data must be added and the region must be set up.
*To add vector layers, click the “Add Vectors layer” button at the top left of the screen. [[File:Addveclayer.png]]
 
  +
*Browse to the location were you saved your data. [[File:Browse.png]]
 
  +
===Adding Vector Layers to QGIS===
  +
*To add vector layers, click the Add Vectors layer button at the top left of the screen. [[File:Addveclayer.png]]
  +
*Browse to the location where you saved your data. [[File:Browse.png]]
 
*Click Open. [[File:Open.png]]
 
*Click Open. [[File:Open.png]]
*For this project we added the boundary of Vancouver Island, roads, lakes, parks, landcover, grey wolf range, hunting camps, deforestation as they were all vector layers.
+
*For this project we added the following vectors: Vancouver Island boundary, lakes, parks, landcover, grey wolf range (both polygon and points), hunting camps, and deforested areas.
*These layers will appear in the Table of Contents (T of C) on the left.
+
*These layers will appear in the Table of Contents (TOC) on the left.
   
====Add Raster Layers to QGIS====
+
===Adding Raster Layers to QGIS===
 
*To add a raster layer, click the Add Raster Layer button. [[File:Addraslayer.png]]
 
*To add a raster layer, click the Add Raster Layer button. [[File:Addraslayer.png]]
*Navigate to the folder with data using the Browse button. [[File:Browse.png]]
+
*Navigate to the desired folder using the Browse button. [[File:Browse.png]]
 
*Chose the w001001.adf file.
 
*Chose the w001001.adf file.
*Then click Open. [[File:Open.png]] These layers will show up in the T of C on the left. The raster layer we added to the project was the DEM layer.
+
*Then click Open. [[File:Open.png]] These layers will show up in the TOC on the left. The raster layers we added to the project included: Road Density and the DEM.
*In the T of C right click on the layer that says w001001. [[File:w001001.png]]
+
*In the TOC, right click on the layer that says w001001. [[File:w001001.png]]
*Click on properties. [[File:Properties.png]]
+
*Click on Properties. [[File:Properties.png]]
*Within the layer properties go to the General Tab. [[File:General.png]]
+
*Within the Layer Properties, go to the General Tab. [[File:General.png]]
*Under Display name give the layer an appropriate name. We named ours DEM. [[File:Displayname.png]]
+
*Under Display Name, give the layer an appropriate name. For example, DEM. [[File:Displayname.png]]
*Next go to the Style Tab. [[File:Style.png]]
+
*Next, go to the Style Tab. [[File:Style.png]]
*Change the Colour Map to be Pseudocolour. [[File:Pseudocolor.png]]
+
*Change the Color Map option to be Pseudocolour. [[File:Pseudocolor.png]]
 
*Then click OK. [[File:OK.png]]
 
*Then click OK. [[File:OK.png]]
   
====Edit Current Grass Region====
+
===Editing the Current GRASS Region===
It is very important to edit the Current Grass Region
+
It is very important to edit the Current GRASS Region in order to specify the processing extents and resolution.
*In order to do so go to the Plugins Tab. [[File:Plugins.png]]
+
*To do this, go to the Plugins Tab. [[File:Plugins.png]]
*Click on Grass. [[File:GRASS1.png]]
+
*Click on GRASS. [[File:GRASS1.png]]
*Then click the Edit Current Grass Region Button. [[File:Region.png]]
+
*Then click the Edit Current GRASS Region Button. [[File:Region.png]]
 
*The extent can be created by drawing an area of interest around your boundary layer.
 
*The extent can be created by drawing an area of interest around your boundary layer.
  +
*Next the resolution must be changed. Change the cell width and cell height. We changed our cell width and height to be 50. This may be dependent on your data. Originally we tried a cell size of 90; however, this produced images that were too course. We also tried a a cell size of 10; however, this would not run.
*Then click OK. [[File:OK.png]]
 
  +
*After you have changed the cell size click OK. [[File:OK.png]]
   
  +
==Data Processing==
====Clipping Vector Layers to AOI boundary====
 
*To clip all the layers to the Area of Interest (AOI) Boundary go to the Vector Tab. [[File:Vectortab.png]]
+
The data processing steps will set up all your layers in the proper formats to be used in the landscape permeability evaluation.
  +
  +
===Clipping Vector Layers to AOI boundary===
  +
*To clip all the layers to your Area of Interest (AOI), go to the Vector Tab. [[File:Vectortab.png]] Ex. we used the Vancouver Island boundary files as our AOI.
 
*Click Geoprocessing Tools. [[File:Geoprocessing.png]]
 
*Click Geoprocessing Tools. [[File:Geoprocessing.png]]
 
*Then click Clip. [[File:Clip.png]]
 
*Then click Clip. [[File:Clip.png]]
*The Input vector layer is the layer that needs to be clipped. [[File:Roads.png]] For example we had to clip our Roads file as we had all the Roads in BC.
+
*The input vector layer is the layer that needs to be clipped. [[File:Roads.png]] For example we had to clip our Roads file which originally contained all the Roads in BC.
*The Clip layer is the boundary layer. [[File:cliplayer.png]]
+
*The Clip layer is the layer you wish to be your AOI. [[File:cliplayer.png]]
*Name the output shapefile in the appropriate location. [[File:browse.png]]
+
*Name the output shapefile and specify an appropriate location for it. [[File:browse.png]]
 
*Then Click OK. [[File:OK.png]]
 
*Then Click OK. [[File:OK.png]]
   
====Union====
+
===Preforming a Union===
A union must be complete on all of the vector layers that do not have full data coverage of the boundary file.
+
A union must be completed on all of the vector layers that do not have full data coverage of the boundary file. The union will act to fill any NULL values in the dataset to be 0s instead; this will become important when using the Raster Calculator in later steps.
*To complete this process go to the Vector Tab, click Geoprocessing Tools, and click Union. [[File:Union.png]]
+
*To complete this process, go to the Vector Tab, click Geoprocessing Tools, and click Union. [[File:Union.png]]
*The input vector layer should be boundary file. [[File:Boundary.png]]
+
*The input vector layer should be boundary file in all cases. [[File:Boundary.png]]
*The union layer should be any layer that does not have full coverage as described above. [[File:Union1.png]] We completed this process for lakes, parks, grey wolf range, deforestation, and hunting camps.
+
*The union layer should be any layer that does not have full coverage, as described above. [[File:Union1.png]] We completed this process for lakes, parks, grey wolf range, landcover, deforested areas, and hunting camps.
 
*Specify the location and name of the output shapefile. [[File:browse.png]] An example of how we named ours is Parks_U.
 
*Specify the location and name of the output shapefile. [[File:browse.png]] An example of how we named ours is Parks_U.
 
*Click OK. [[File:OK.png]]
 
*Click OK. [[File:OK.png]]
*A geoprocessing box will pop up asking if you would like to add the new layer to the T of C.
+
*A geoprocessing box will pop up asking if you would like to add the new layer to the TOC.
 
*Click Yes. [[File:Yes.png]]
 
*Click Yes. [[File:Yes.png]]
  +
[[File:Parksunion.png]]
   
  +
'' Figure 1: shows the Parks_U layer. The boundary area is shown in grey and the parks are shown in white. ''
====Editing the Attribute Table====
 
  +
The attribute table must be edited on all the layers you preformed a union on.
 
  +
===Editing the Attribute Table===
*To open the attribute table right click on the layer. [[File:Openatttable.png]]
 
  +
The attribute table must be edited on all the layers you preformed a union on. A CLASS field will house the unique values from which we will create our rasters later on.
  +
*To open the attribute table, right click on the layer. [[File:Openatttable.png]]
 
*Left click on Open Attribute Table.
 
*Left click on Open Attribute Table.
*In order to edit click the editor mode on. [[File:Edit.png]]
+
*In order to edit, click the Editor Mode on. [[File:Edit.png]]
 
*Create a new column by clicking New Column. [[File:Newcolumn.png]]
 
*Create a new column by clicking New Column. [[File:Newcolumn.png]]
*The add Column window will pop up. Give the column a name. We named our CLASS. [[File:Columnname.png]]
+
*The Add Column Window will pop up. Give the column a name. We named our CLASS. [[File:Columnname.png]]
*If you would like you can give the column a comment, however it is not necessary.
+
*If you would like, you can give the column a comment; however, it is not necessary.
 
*Ensure the type is set to whole number (integer), [[File:type.png]] with a width of 1. [[File:width.png]]
 
*Ensure the type is set to whole number (integer), [[File:type.png]] with a width of 1. [[File:width.png]]
 
*The click OK. [[File:OK.png]]
 
*The click OK. [[File:OK.png]]
*In the new column CLASS set the original boundary to be 1 and all the remaining attributes to be 2
+
*In the new column CLASS, set the original boundary to be 1 and all the remaining attributes to be 2.
 
*The boundary can be distinguished by clicking on the numbers on the left side of the window. (seen in red). [[File:Class2.png]]
 
*The boundary can be distinguished by clicking on the numbers on the left side of the window. (seen in red). [[File:Class2.png]]
*As you click the numbers sections of the map will become highlighted. [[File:Highlight.png]]
+
*As you click the numbers, sections of the map will become highlighted. [[File:Highlight.png]]
*Again once you have found the boundary put a 1 in the CLASS column and a 2 in the rest of the column.
+
*Again, once you have found the boundary, put a 1 in the CLASS column and a 2 in the rest of the columns.
*To save changes click the editor mode button again. [[File:Edit.png]]
+
*To save changes click the Editor Mode button again. [[File:Edit.png]]
   
====Import Vectors to Grass====
+
===Importing Vectors to GRASS Format===
To use the GRASS plugin all the layers must be imported into a GRASS format. For all the vector layers the tool v.in.ogr.qgis must be used.
+
To use the GRASS Plugin all the layers must be imported into a GRASS format. For all the vector layers the tool v.in.ogr.qgis must be used.
 
*To do so go to the Plugins Tab. [[File:Plugins.png]]
 
*To do so go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
 
*Then click Open GRASS Tools. [[File:Grasstools.png]]
 
*Then click Open GRASS Tools. [[File:Grasstools.png]]
 
*Next go to the Modules List Tab. [[File:Moduleslist.png]]
 
*Next go to the Modules List Tab. [[File:Moduleslist.png]]
*In the filter box type v.in.ogr.qgis. [[File:filterv.png]]
+
*In the Filter Box type v.in.ogr.qgis. [[File:filterv.png]]
 
*Click on the Correct Tool. [[File:grassvec.png]]
 
*Click on the Correct Tool. [[File:grassvec.png]]
 
*The tool will pop up.
 
*The tool will pop up.
*Use the drop down OGR vector layer arrow to select a layer to change to grass format. [[File:vectlayer.png]]
+
*Use the drop down OGR vector layer arrow to select a layer to change to GRASS format. [[File:vectlayer.png]]
*IMPORTANT NOTE: the layer must be on in the T of C for the drop down to function.
+
*IMPORTANT NOTE: the layer must be on in the TOC for the drop down to function.
*Give the output vector map a name. [[File:outputvec.png]] An example of our naming scheme would be Deforest_U_G.
+
*Give the Output Vector Map a name. [[File:outputvec.png]] An example of our naming scheme is Deforest_U_G, where the "G" signifies that it is now in a GRASS vector format.
 
*Click Run. [[File:Run.png]]
 
*Click Run. [[File:Run.png]]
*Once the tool has successfully finished click View Output. [[File:ViewOutput.png]] The layer will appear in the T of C.
+
*Once the tool has successfully finished, click View Output. [[File:ViewOutput.png]] The layer will appear in the TOC.
   
====Import Raster to Grass====
+
===Importing Rasters to GRASS Format===
To use the GRASS plugin all the layers must be imported into a GRASS format. For all the vector layers the tool r.in.gdal.qgis must be used.
+
To use the GRASS Plugin, all the raster layers must also be imported into a GRASS format. For all the raster layers the tool r.in.gdal.qgis must be used.
*To do so go to the Plugins Tab. [[File:Plugins.png]]
+
*To do this, go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
 
*Then click Open GRASS Tools. [[File:Grasstools.png]]
 
*Then click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List Tab. [[File:Moduleslist.png]]
 
*Go to the Modules List Tab. [[File:Moduleslist.png]]
*In the filter box type r.in.gdal.qgis. [[File:filterr.png]]
+
*In the Filter Box, type r.in.gdal.qgis. [[File:filterr.png]]
 
*Click on the correct tool. [[File:grassras.png]]
 
*Click on the correct tool. [[File:grassras.png]]
*The tool will pop up.
+
*The tool will popup.
*Use the drop down loaded layer arrow to select a layer to change to grass format. [[File:grassrasinput.png]]
+
*Use the drop down loaded layer arrow to select a layer to change to GRASS format. [[File:grassrasinput.png]]
*IMPORTANT NOTE: the layer must be on in the T of C for the drop down to function.
+
*IMPORTANT NOTE: the layer must be on in the TOC and activated it show up in the dropdown menu.
*Give the output vector map a name a click Run. [[File:Run.png]] An example of our naming scheme would be DEM_G. [[File:grassrasoutput2.png]]
+
*Give the Output Raster Map a name a click Run. [[File:Run.png]] An example of our naming scheme is DEM_G. [[File:grassrasoutput2.png]]
*Once the tool has successfully finished click View Output. [[File:ViewOutput.png]] The layer will appear in the T of C.
+
*Once the tool has successfully finished, click View Output. [[File:ViewOutput.png]] The layer will appear in the TOC.
   
====Convert Vector to Raster====
+
===Converting Vectors to Rasters===
The convert vector to raster does exactly as the name sounds. All the vectors layers must be converted to raster. For our project we converted roads, lakes, parks, landcover, grey wolf range, hunting camps, and deforestation.
+
The convert vector to raster does exactly as the name sounds, converts GRASS vectors to GRASS rasters. All the vectors layers must be converted to raster in order to preform the reclassification in the following step. For our project we converted lakes, parks, landcover, grey wolf range, hunting camps, and deforestation.
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
*Then click Open Grass Tools. [[File:Grasstools.png]]
+
*Then click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in v.to.rast.attr. [[File:filterv.to.r.png]]
+
*In the Filter Box, type in v.to.rast.attr. [[File:filterv.to.r.png]]
*Click the correct tool. [[File:v.to.rast.png]] and the tool will then open.
+
*Click on the correct tool. [[File:v.to.rast.png]] and the tool will then open.
*Using the dropdown arrow place the name of the input vector map you wish to rasterize. [[File:inputv.to.r.png]]
+
*Using the dropdown menu, select input vector layer you wish to rasterize. [[File:inputv.to.r.png]]
*Remember the layer must be on for the dropdown menu to work.
+
*Remember, the layer must be on for it to appear in the dropdown menu.
*In the Attribute field place the CLASS layer that you created. [[File:attclass.png]]
+
*In the Attribute Field, select the CLASS layer that you created. [[File:attclass.png]]
*Give the output raster map a name. [[File:v.to.routput.png]]
+
*Give the Output Raster Map a name. [[File:v.to.routput.png]]
 
*Click Run. [[File:Run.png]]
 
*Click Run. [[File:Run.png]]
*Finally click View Output. [[File:ViewOutput.png]]
+
*Finally, click View Output. [[File:ViewOutput.png]]
   
====DEM to Slope====
+
===Raster Data Processing: Creating the Slope Layer===
In order to use the DEM for the analysis it must first be changed into slope layer.
+
To create a Slope layer, a Digital Elevation Model (DEM) must be given as the input.
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
*Click Open Grass Tools. [[File:Grasstools.png]]
+
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In the filter box type slope. [[File:Filterslope.png]]
+
*In the Filter Box, type Slope. [[File:Filterslope.png]]
 
*Click the Slope Tool. [[File:Slope.G.png]]
 
*Click the Slope Tool. [[File:Slope.G.png]]
*Input the name of the elevation raster map. For this project our input map was called DEM. [[File:slopeinput.png]]
+
*Input the name of the Elevation Raster Map (DEM). [[File:slopeinput.png]]
*Name the output slope raster map. Our output map was named slope. [[File:slopeoutput.png]]
+
*Name the Output Slope Raster Map. Our output map was named Slope. [[File:slopeoutput.png]]
*The format for reporting the slope can be degrees or percent. We used degrees. [[File:Degrees.png]]
+
*The format for reporting the slope can be degrees or percent; we used degrees. [[File:Degrees.png]]
 
*Click Run. [[File:Run.png]]
 
*Click Run. [[File:Run.png]]
 
*Lastly, click View Output. [[File:ViewOutput.png]]
 
*Lastly, click View Output. [[File:ViewOutput.png]]
  +
[[File:DEMtoslope.png]]
   
  +
'' Figure 2: Left: The DEM. Right: The resulting slope raster. ''
====Reclass====
 
  +
In order to assign a cost value to each cell, we must perform a reclass on each raster. Before beginning the reclass, a textfile (.txt) must be written in which the reclass rules will be specified. This subjective process that should be based on scientific literature and expert opinion.
 
  +
==Reclassifying the Rasters According to Cost==
  +
In order to assign a cost value to each cell, we must perform a reclass on each raster. Before beginning the reclass, a textfile (.txt) must be written in which the reclass rules will be specified. This subjective process that should be based on scientific literature and expert opinion.
  +
  +
===Creating the Reclass Rules Text Files===
 
*For each unique pixel value in a raster, the reclass rules will dictate the assigned cost (i.e. the level of difficulty, from 1 to 10) that a wolf would have traveling across it. For example, any water pixel in the lakes raster, was assigned a cost of 7. The cost value of 7 was assigned because water poses a barrier to wolf movement; however, the wolves can swim if necessary.
 
*For each unique pixel value in a raster, the reclass rules will dictate the assigned cost (i.e. the level of difficulty, from 1 to 10) that a wolf would have traveling across it. For example, any water pixel in the lakes raster, was assigned a cost of 7. The cost value of 7 was assigned because water poses a barrier to wolf movement; however, the wolves can swim if necessary.
 
[[File:Reclassrules.png]]
 
[[File:Reclassrules.png]]
 
*In the image shown above, the first column on the left indicates each unique pixel value in the raster (recall, for the layers in which a union was required,these values would be 1 (the boundary) and 2 (ex.lakes)). The second column indicates the cost value you wish to reassign to each pixel.
 
*In the image shown above, the first column on the left indicates each unique pixel value in the raster (recall, for the layers in which a union was required,these values would be 1 (the boundary) and 2 (ex.lakes)). The second column indicates the cost value you wish to reassign to each pixel.
*If the raster has more than two unique values, then you can assign a single cost value to a range of slope values. This example is demonstrated below using our Slope raster.
+
*If the raster has more than two unique values, then you can assign a single cost value to a range of slope values. This example is demonstrated below using our Slope Raster.
 
[[File:reclassrulesslope.png]]
 
[[File:reclassrulesslope.png]]
*For further help creating the reclass rule files see [http://grass.osgeo.org/grass64/manuals/r.reclass.html r.reclass Grass Help]
+
*For further help creating the reclass rule files see [http://grass.osgeo.org/grass64/manuals/r.reclass.html r.reclass GRASS Help]
 
   
  +
===Running the Reclass Tool===
 
Next you must actually run the reclass using the r.class tool.
 
Next you must actually run the reclass using the r.class tool.
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
*Click Open Grass Tools. [[File:Grasstools.png]]
+
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in r.reclass. [[File:filterreclass.png]]
+
*In the Filter Box, type in r.reclass. [[File:filterreclass.png]]
 
*Click on the correct tool. [[File:r.reclass.png]]
 
*Click on the correct tool. [[File:r.reclass.png]]
 
*Input the raster map to be reclassified. [[File:reclasinput.png]]
 
*Input the raster map to be reclassified. [[File:reclasinput.png]]
*For the File Containing Reclass Rules parameter window browse to the location of your saved reclass rules. [[File:reclassrulesinput.png]]
+
*For the File Containing Reclass Rules parameter, Browse to the location of your saved reclass rules text file. [[File:reclassrulesinput.png]]
*Specify a output raster map name. For example we called ours Huntrange_Reclass. [[File:relcassoutput.png]]
+
*Specify an Output Raster Map name. For example we called ours Huntrange_Reclass. [[File:relcassoutput.png]]
 
*Now click Run. [[File:Run.png]]
 
*Now click Run. [[File:Run.png]]
*Then click View Output. [[File:ViewOutput.png]]
+
*Then, click View Output. [[File:ViewOutput.png]]
   
====Combined Raster in Map Calc====
+
===Combining the Cost Rasters in the Map Calculator===
  +
To create a cost raster that displays the cumulative cost of moving over the land, all the individual cost rasters must be added together using the Raster Map Calculator.
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
*Click Open Grass Tools. [[File:Grasstools.png]]
+
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in r.mapcalculator. [[File:filtermapcalc.png]]
+
*In the Filter Box, type in r.mapcalculator. [[File:filtermapcalc.png]]
 
*Click on the map calculator tool. [[File:r.mapcalc.png]]
 
*Click on the map calculator tool. [[File:r.mapcalc.png]]
::[[File:Masterraster1.png|thumb|100px|frame| Map Calculator]]
+
[[File:Picture1005.png]]
  +
  +
'' Figure 3: Unfortunately, the r.mapcalculator tool can only take in 6 input rasters. Since we had 8 cost factors, the calculation needed to be done in two steps, shown above. ''
   
 
*Click Run. [[File:Run.png]]
 
*Click Run. [[File:Run.png]]
Line 254: Line 284:
 
[[File:FINALMASTERRASTER2.png]]
 
[[File:FINALMASTERRASTER2.png]]
   
  +
'' Figure 4: The final Master Cost Raster created by adding all the individual cost rasters together. The lighter areas indicate cells with high cost to movement (i.e. represent barriers or danger), and the darker areas show cells with lower cost. ''
  +
  +
==Evaluating the Least Cost Paths and Least Cost Corridors==
  +
===The Wolf Ranges===
  +
Before starting the actual evaluation, look at Figure 5 below. This shows the locations of the fictitious wolf ranges (i.e. areas where metapopulations of wolves are known to reside). The ranges are labeled A through D, from North to South, respectively. The goal of this analysis was to identify which paths pose the least resistant/danger to movement between each of these ranges.
  +
  +
[[File:boundarypoints2.png]] ::[[File:wolf3.png|thumb|100px|frame| Grey Wolf]]
   
  +
'' Figure 5: The location of wolf ranges A, B, C, and D. ''
   
 
===Evaluating Least Cost Path and Corridor between Wolf Ranges A and D===
 
===Evaluating Least Cost Path and Corridor between Wolf Ranges A and D===
  +
For this example, the least cost path and corridor from wolf ranges A to D were calculated.
The first step in actually evaluating a cost path/corridor, is to calculate an accumulated cost surface from a starting point; this is done using r.walk. The second step is to run r.drain on the results from r.walk; in this step the destination is specified. The output from this will be the least cost path from point A to D. This path should then be converted to a vector in order to create an editable line.
 
  +
The first step in actually evaluating a cost path/corridor, is to calculate an accumulated cost surface from a starting point (A); this is done using r.walk. The second step is to run r.drain on the results from r.walk; in this step the destination (D) is specified. The output from this will be the least cost path from point A to D. This path should then be converted to a vector in order to create an editable line.
   
To generate the least cost corridors between ranges A and D, an accumulated cost surface must be created using point D as the starting point. The final step is to add these two accumulated cost surface rasters together, which will create the cost corridor.
+
To generate the least cost corridors between ranges A and D, another accumulated cost surface must be created, this time, using point D as the starting point. The final step is to add these two accumulated cost surface rasters together, which will create the cost corridor.
   
  +
===Generating an Accumulated Cost Surface using r.walk===
====r.walk.vect for Wolf Range A====
 
  +
The r.walk.vect tool creates an accumulative cost distance value for each cell compared to the specified source location. This means that cells farther from the source feature will receive a higher cost distance value than cells closer to the source feature. This accumulated cost distance surface is a required input of the r.drain tool which actually generates the least cost path. In our example we wanted to inspect the path from wolf range A to D, so location A would be the starting point.
r.walk.vect creates the accumulated cost surfaces.
 
   
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
*Click Open Grass Tools. [[File:Grasstools.png]]
+
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in r.walk. [[File:filter_rwalk.png]]
+
*In the filter box type in r.walk. [[File:filter_rwalk.png]]
 
*Click on the r.walk.vect tool. [[File:r.walk.vect.png]]
 
*Click on the r.walk.vect tool. [[File:r.walk.vect.png]]
 
*In the Name of Elevation Input Raster Map parameter, select the DEM. [[file:rwalkelevlinput.PNG]]
 
*In the Name of Elevation Input Raster Map parameter, select the DEM. [[file:rwalkelevlinput.PNG]]
Line 276: Line 315:
 
*Now click Run. [[File:Run.png]]
 
*Now click Run. [[File:Run.png]]
 
*Then click View Output. [[File:ViewOutput.png]]
 
*Then click View Output. [[File:ViewOutput.png]]
*Once your map has appeared right click on the layer in the T of C.
+
*Once your map has appeared, right click on the layer in the TOC.
 
*Left click on properties. [[File:Properties.png]]
 
*Left click on properties. [[File:Properties.png]]
 
*Got to the Style Tab [[File:Style.png]]
 
*Got to the Style Tab [[File:Style.png]]
*In the Colourmap box uses the drop down arrow and click colourmap. [[File:Colourmap.png]]
+
*In the Colormap box, use the dropdown menu and click colormap. [[File:Colourmap.png]]
*Now go to the Colourmap Tab. [[File:colourmaptab.png]]
+
*Now go to the Colormap Tab. [[File:colourmaptab.png]]
*In the classification mode box use the up arrows to make 8 classes. [[File:classmode.png]]
+
*In the classification mode box, use the up arrows to make 8 classes. [[File:classmode.png]]
 
*Click classify. [[File:Classify.png]]
 
*Click classify. [[File:Classify.png]]
   
 
[[File:rwalkA.png]]
 
[[File:rwalkA.png]]
   
  +
'' Figure 6: The accumulated cost surface raster for wolf range A . ''
====r.drain====
 
  +
r.drain creates the least cost path between the staring point and the destination.
 
  +
===Generating Least Cost Paths using r.drain===
  +
r.drain creates the least cost path between the staring point and the destination. Although this tool was originally designed to be used in a hydrology context (hence the prompt for an elevation raster), it functions in the same manner for any accumulated cost surface raster.
   
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click GRASS. [[File:GRASS1.png]]
*Click Open Grass Tools. [[File:Grasstools.png]]
+
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in r.drain. [[File:rdrainfilter.png]]
+
*In the filter box type in r.drain. [[File:rdrainfilter.png]]
 
*Click on the r.drain tool. [[File:rdraintool.png]]
 
*Click on the r.drain tool. [[File:rdraintool.png]]
*In the Name of Elevation Raster Map box uses the drop down arrow to place rwalk_A. [[File:rdraininput.png]]
+
*In the Name of Elevation Raster Map box, use the dropdown menu to select rwalk_A. [[File:rdraininput.png]]
 
*Give the output raster map a name. An example of our naming scheme would be r.drainAD. [[File:rdrainoutput.png]]
 
*Give the output raster map a name. An example of our naming scheme would be r.drainAD. [[File:rdrainoutput.png]]
  +
*Next you must input the coordinates of the starting point. Contrary to it's decriptor, this point will actually be the destination point, in our case, this was wolf range D. Recall, the starting point (wolf range A) was previously specified in the r.walk tool to create the accumulated cost surface.
*Next you must input the coordinates of the starting points(s).
 
 
*The coordinates can be determined by using the Pan Map tool (in the upper left corner). [[File:handtool.png]]
 
*The coordinates can be determined by using the Pan Map tool (in the upper left corner). [[File:handtool.png]]
*Hold the Pan Map tool over starting point (in this case your D point). The coordinates can be seen in the left hand corner. [[File:coordinates.png]]
+
*Hold the Pan Map tool over the destination point The coordinates can be seen in the left hand corner. [[File:coordinates.png]]
 
*Write these coordinates down and then place them in the starting points box. [[File:startingpoint.png]]
 
*Write these coordinates down and then place them in the starting points box. [[File:startingpoint.png]]
*The Result is a path that goes from Wolf Habitat A to Wolf Habitat D. (See below)
+
*The result is a path that goes from Wolf Habitat A to Wolf Habitat D. (See Figure 7)
 
[[File:Path.png]]
 
[[File:Path.png]]
   
  +
'' Figure 7: The least cost path from wolf range A to D. It is hard to see since it is a raster. In the next step we will convert it to a vector and better symbolize it. ''
====r.to.vect.line====
 
The r.to.vect.line tool can change the raster path created from r.drain and create a vector line.
 
   
  +
===Converting the Least Cost Paths to Vectors===
*Click Grass. [[File:GRASS1.png]]
 
  +
The r.to.vect.line tool can change the raster path created from r.drain from a raster to vector line. This is highly recommended since it will create a line who's appearance editable.
*Click Open Grass Tools. [[File:Grasstools.png]]
 
  +
  +
*Go to the Plugins Tab. [[File:Plugins.png]]
  +
*Click GRASS. [[File:GRASS1.png]]
  +
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in r.to.vect.line. [[File:linetool.png]]
+
*In the filter box, type in r.to.vect.line. [[File:linetool.png]]
 
*Click on the correct tool. [[File:r.to.vect.linetool.png]]
 
*Click on the correct tool. [[File:r.to.vect.linetool.png]]
 
*The input raster map should be r.drainAD.[[File:lineinput.png]]
 
*The input raster map should be r.drainAD.[[File:lineinput.png]]
*The output vector map can be named adpath. [[File:lineoutput.png]]
+
*The output vector line should be named something appropriate to what your path represents. We named ours adpath. [[File:lineoutput.png]]
 
*Click Run. [[File:Run.png]]
 
*Click Run. [[File:Run.png]]
 
*Then click View Output. [[File:ViewOutput.png]]
 
*Then click View Output. [[File:ViewOutput.png]]
   
  +
=== Preparing to Generate a Least Cost Corridor===
====r.walk.vect for Wolf Range D====
 
  +
To create a least cost corridor between to locations, two accumulated cost surfaces must be generated for the corresponding start and end locations. In this example, we already have the accumulated cost surface for wolf range A; now we need a second accumulated cost surface surface for wolf range D. This will be done by running the r.walk.vect again; however, this time point D is the starting point. The second step in creating the corridor is to add these two accumulated cost surfaces together, this part will be addresses in the following section.
r.walk.vect must be run to again create the accumulated cost surface. However, instead of running r.walk.vect with Wolf Range A it will be run with Wolf Range D.
 
   
  +
*To create the second accumulated cost surface, refer to the "Generating an Accumulated Cost Surface using r.walk" section above.
*Look above for the steps to complete this.
 
*The only difference is the starting points vector map input. This time use wrD_pnt_G.[[File:walkstartpoint.png]]
+
*Be sure to change the starting point to be the appropriate layer for your specific analysis. In this case, the new input for us was wolf range D (wrD_pnt_G).[[File:walkstartpoint.png]]
*Also ensure to name the raster map to contain results differently. We named our rwalk_D. [[File:rwalkresultsname.png]]
+
*Don't forget to rename your output appropriately as well. We named ours rwalk_D. [[File:rwalkresultsname.png]]
*The resulting r.walk map for wolf habitat D is shown below.
+
*The resulting r.walk map for wolf range D is shown below.
 
[[File:rwalk_Dmap.png]]
 
[[File:rwalk_Dmap.png]]
   
  +
'' Figure 8: The accumulated cost surface raster for wolf range D . ''
====Creating the Corridor between Wolf Ranges A and D in Raster Calculator====
 
  +
  +
=== Generating a Least Cost Corridor between Two Locations===
  +
The final step to create a least cost corridor between two locations is to add the respective accumulated cost surfaces together using the r.mapcalc tool. This tool is a graphical version of the r.mapcalulator tool and was chosen this time just to give you experience working with both interfaces.
  +
 
*Go to the Plugins Tab. [[File:Plugins.png]]
 
*Go to the Plugins Tab. [[File:Plugins.png]]
*Click Grass. [[File:GRASS1.png]]
+
*Click on GRASS. [[File:GRASS1.png]]
*Click Open Grass Tools. [[File:Grasstools.png]]
+
*Click Open GRASS Tools. [[File:Grasstools.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
 
*Go to the Modules List. [[File:Moduleslist.png]]
*In filter type in r.mapclac. [[File:mapcalc.png]]
+
*In the filter box, type in r.mapclac. [[File:mapcalc.png]]
 
*Click on the r.mapcalc tool. [[File:rmapcalctool.png]]
 
*Click on the r.mapcalc tool. [[File:rmapcalctool.png]]
*In the window create an equation. Add rwalk_A and rwalk_D together. [[File:mapcalcequation.png]]
+
*In the window, create the addition equation that adds the two accumulated cost surfaces together. For example, our equation added rwalk_A and rwalk_D. [[File:mapcalcequation.png]]
*In the output name the map adcorridor. [[File:mapcalcoutput.png]]
+
*In the output, name the map something appropriate. We chose adcorridor. [[File:mapcalcoutput.png]]
 
*Click Run. [[File:Run.png]]
 
*Click Run. [[File:Run.png]]
*Finally click View Output. [[File:ViewOutput.png]]
+
*Finally, click View Output. [[File:ViewOutput.png]]
   
 
[[File:ADpath&cor.png]]
 
[[File:ADpath&cor.png]]
  +
  +
'' Figure 9: The least cost path from wolf range A to D overlaid on the corresponding least cost corridor map. ''
   
 
==Conclusion==
 
==Conclusion==
  +
Repeating the r.walk and r.drain processes of creating least cost paths and corridors for each combination of starting and ending destinations (AB,AC,AD,BC,BD,CD). You can create a map that resembles Figure 10 by turning on all these created layers in the TOC. This map shows all the possible least cost paths to each wolf range overlaid on an cumulative least cost corridor. This cumulative least cost corridor was created by adding all of the accumulated cost surfaces for each starting point together, as shown in Figure 11. Sometimes, it might be appropriate to overlay the paths on other surfaces, such as the master cost raster (e.g. Figure 12). This map just emphasizes that the paths in actual fact do follow the least costly (lighter cells) routes. For example, the large whiter circles represent the radius around the hunt camps, which were assigned a cost factor of 9; as a result, the paths serve around all of these dangerous areas.
[[File:FINALOUTPUTMAP.png]]
 
  +
  +
[[File:coridoor&path2.png]]
  +
  +
'' Figure 10: (Above) The final map showing all the possible least cost paths to each wolf range overlaid on a cumulative least cost corridor raster . ''
  +
  +
  +
[[File:A+B+C+D.png]]
  +
  +
'' Figure 11: (Above) The r.mapcalc graphical equation used to add all of the accumulated cost surfaces to create the cumulative least cost corridor raster seen in figure 10. ''
  +
  +
[[File:Masterrast&path.PNG]]
  +
  +
'' Figure 12: (Above) All the possible least cost paths overlaid on the master cost raster. This emphasizes that most of the high cost areas (shown in lighter tones) are being avoided by the paths. ''
  +
  +
  +
[[File:pawprints.gif]]
   
 
==Helpful Links==
 
==Helpful Links==
Line 361: Line 427:
 
==References==
 
==References==
   
[http://goo.gl/GqjlH.jpg Grey Wolf Pic]
+
[http://www.cbc.ca/news/canada/british-columbia/story/2012/09/28/bc-wedge-pack-wolf-kill.html Grey Wolf Pic]
  +
  +
[http://s197.beta.photobucket.com/user/nybklyn26/media/animated%20and%20non%20animated%20Paw%20Prints/pawprints-1-2.gif.html?sort=4&o=1 Animated Paw Prints]
  +
  +
==Bibliography==
  +
  +
[http://www.academia.edu/398732/Cost_Distance_Analysis_in_an_Alpine_Environment_Comparison_of_Different_Cost_Surface_Modules Gietl, R., M. Doneus, and M. Fera. "Cost Distance Analysis in an Alpine environment: Comparison of different cost surface modules." Proceedings of the 35th International Conference on Computer Applications and Quantitative Methods in Archaeology (CAA),(Berlin 2007). 2008.]
  +
  +
[https://www.msu.edu/~ashton/classes/428/labs/lab14/lab14_instructions.pdf Shortridge, Ashton. GEO 428: Least Cost Paths. Michigan: Michigan State Univeristy, 20 Nov. 2012. PDF.]
  +
  +
[http://www.bearbiology.com/fileadmin/tpl/Downloads/URSUS/Vol_15_1/Singleton_Gaines_15_1_.pdf Singleton, Peter H., William L. Gaines, and John F. Lehmkuhl. "Landscape permeability for grizzly bear movements in Washington and southwestern British Columbia." Ursus 15.1 (2004): 90-103.]
   
  +
[http://www.arlis.org/docs/vol1/51864782.pdf Singleton, Peter H., William Lee Gaines, and John F. Lehmkuhl. ''Landscape permeability for large carnivores in Washington: a geographic information system weighted-distance and least-cost corridor assessment''. US Department of Agriculture, Forest Service, Pacific Northwest Research Station, 2002.]
[https://www.msu.edu/~ashton/classes/428/labs/lab14/lab14_instructions.pdf]
 
   
  +
[http://www.qgis.org/ Quantum GIS Development Team, <2012>. Quantum GIS Geographic Information System. Open Source Geospatial Foundation Project. http://qgis.osgeo.org]
[http://www.bearbiology.com/fileadmin/tpl/Downloads/URSUS/Vol_15_1/Singleton_Gaines_15_1_.pdf]
 

Latest revision as of 13:29, 2 January 2013

Disclaimer

Vancouver Island Grey Wolf

Please note that this Wiki has been produced for the GEOM4008 Advanced Topics in Geographic Information Systems class at Carleton University strictly as a tutorial to showcase the method of calculating landscape permeability using FOSS. The results should by no means be taken as a true analysis of grey wolf movement since much of the data were fictional.

Introduction

The objective of this project was to develop a method to evaluate landscape permeability for large carnivores using only Free and Open-Source Software (FOSS). This tutorial has been created to allow non-GIS individuals to successfully complete this analysis in Quantum GIS (1.7.4) using the GRASS Plugin. This tutorial will be carried out while analyzing the landscape permeability for grey wolf movement on Vancouver Island. The final result of this project will be a landscape permeability map which will attempt to provide valuable insight into the movement of the Vancouver Island grey wolf. This sort of information could potentially be used to implement more successful conservation strategies, facilitate ecosystem-based management (EBM), and better understand the genetic flow of the island’s population.

Data

Before beginning this tutorial in Quantum GIS (QGIS) a variety of data is needed. In order to evaluate landscape permeability the data must be specific to the area and animal chosen to analyze. After the animal has been chosen, parameters that would inhibit movement in the study area should be studied, and then data must be located. For our analysis of movement on the grey wolf on Vancouver Island, we used a combination of freely available data, as well as self-created data for the purpose of this tutorial. See Table 1 for the data used and the source of the data.


Table 1. Data Used and Data Sources for Vancouver Island Grey Wolf
Data Used Data Format Data Source
Boundary of Vancouver Island Vector Polygon Scholars Geoportal Layer: Dissemination Blocks - Cartographic Boundary File (DB-CBF), 2011 Census / Producer: Statistics Canada
Lakes Vector Polygon Scholars Geoportal Layer: Minor Water Regions (MNWTR) / Producer: DTMI Spatial Inc.
Parks Vector Polygon Scholars Geoportal Layer: Parks and Recreation - Region / Producer: DTMI Spatial Inc.
Landcover Vector Polygon GeoBase Layer: Land Cover / Circa 2000
DEM Raster GeoBase Layer: Canadian Digital Elevation Data / Producer: Natural Resources Canada
Road Density Raster Created Data
Grey Wolf Range Vector Points & Polygon Created Data
Deforestation on Vancouver Island Vector Polygon Created Data
Hunting Camps Vector Polygon Created Data


Methods

It is highly recommended that these methods are done in sequential order due to the number of step needed to complete this analysis.

QGIS Setup

Before you can begin in QGIS, you must first locate all the data that you wish to use. A good place to start if you are unsure where to find free data would be Scholars GeoPortal* and GeoBase. Once you have found all the data you wish to use, create a folder in your computer and place the data in this folder.

* Note: Scholars GeoPortal data is only available to students attending universities whose libraries are a member of the OCUL.

Opening QGIS

Before beginning, ensure that Quantum GIS is installed on the computer you wish to use. If you do not have QGIS installed, download QGIS.

  • Once the installation has been completed, or if QGIS was already installed, click the QGIS Icon to open the program. Icon.png This will open the initial QGIS Window.
  • Immediately go to the File Tab. Filetab.png
  • Click Save Project As. Saveas.png
  • Save your project in the folder with all your data.
  • IMPORTANT NOTE: Remember to save your project often by clicking Save. Save.png

Installing the GRASS Plugin

Once the initial QGIS window has been opened, it is highly recommended that the GRASS Plugin be installed next. The GRASS Plugin allows the tools from GRASS GIS to be used within QGIS.

  • Go to the Plugins Tab. Pluginstab.png
  • Click Manage Plugins. Manageplugins.png
  • This will bring you to the QGIS Plugin Manager Window.
  • In filter write GRASS. Filterg.png
  • Click on the GRASS Plugin and make sure there is an X in the box. GRASS.png
  • Finally, click OK. OK.png
  • Now, go back to the Plugins Tab, Plugins.png a new GRASS Tab should have appeared. GRASS1.png
  • Expanding this GRASS menu reveals that most of the tools are greyed out.
  • In order to fix this click on New Mapset. The Mapset is the location where you want your GRASS files to be stored. NewMapset.png
  • Click Browse Browse.png, and then go to your chosen destination.
  • Once you have browsed to the location, click Next. Next.png
  • Now you will create a new GRASS location. We named ours GRASS. Newlocation.png
  • Then click Next. Next.png
  • This will bring you to the Projection Window. Defining your projection is extremely important.
  • Click the circle beside Projection. Projection.png You must chosen the projection based on your study location; for more information on choosing an appropriate projection, see this Guide to Selecting Map Projections. Since our location was in Vancouver Island, we chose Universal Transverse Mercator (UTM), NAD83 (NSRS2007) /UTM zone 10N. Zone10.png
  • Once you have chosen your Projection, click Next. Next.png
  • This will bring you to the Define GRASS Region Window.
  • Scroll to the country of your study area, and click Set. Set.png
  • Then click Next. Next.png
  • This will bring you to the Mapset Window.
  • Name your new Mapset. We named ours Mapset. Mapset.png
  • Click Next. Next.png
  • Then click Finish. Finish.png Your new mapset has now been created!
  • Now if you go back to the Plugins Tab, you can see that the tools are no longer grayed out. Depending on the computer you are using you may have to open the mapset every time you open and close QGIS.
  • In order to do this, go to the Plugins Tab. Plugins.png
  • Click GRASS GRASS1.png
  • Lastly, click Open Mapset. OpenMapset1.png

Workspace Setup

Before beginning any data processing, the data must be added and the region must be set up.

Adding Vector Layers to QGIS

  • To add vector layers, click the Add Vectors layer button at the top left of the screen. Addveclayer.png
  • Browse to the location where you saved your data. Browse.png
  • Click Open. Open.png
  • For this project we added the following vectors: Vancouver Island boundary, lakes, parks, landcover, grey wolf range (both polygon and points), hunting camps, and deforested areas.
  • These layers will appear in the Table of Contents (TOC) on the left.

Adding Raster Layers to QGIS

  • To add a raster layer, click the Add Raster Layer button. Addraslayer.png
  • Navigate to the desired folder using the Browse button. Browse.png
  • Chose the w001001.adf file.
  • Then click Open. Open.png These layers will show up in the TOC on the left. The raster layers we added to the project included: Road Density and the DEM.
  • In the TOC, right click on the layer that says w001001. W001001.png
  • Click on Properties. Properties.png
  • Within the Layer Properties, go to the General Tab. General.png
  • Under Display Name, give the layer an appropriate name. For example, DEM. Displayname.png
  • Next, go to the Style Tab. Style.png
  • Change the Color Map option to be Pseudocolour. Pseudocolor.png
  • Then click OK. OK.png

Editing the Current GRASS Region

It is very important to edit the Current GRASS Region in order to specify the processing extents and resolution.

  • To do this, go to the Plugins Tab. Plugins.png
  • Click on GRASS. GRASS1.png
  • Then click the Edit Current GRASS Region Button. Region.png
  • The extent can be created by drawing an area of interest around your boundary layer.
  • Next the resolution must be changed. Change the cell width and cell height. We changed our cell width and height to be 50. This may be dependent on your data. Originally we tried a cell size of 90; however, this produced images that were too course. We also tried a a cell size of 10; however, this would not run.
  • After you have changed the cell size click OK. OK.png

Data Processing

The data processing steps will set up all your layers in the proper formats to be used in the landscape permeability evaluation.

Clipping Vector Layers to AOI boundary

  • To clip all the layers to your Area of Interest (AOI), go to the Vector Tab. Vectortab.png Ex. we used the Vancouver Island boundary files as our AOI.
  • Click Geoprocessing Tools. Geoprocessing.png
  • Then click Clip. Clip.png
  • The input vector layer is the layer that needs to be clipped. Roads.png For example we had to clip our Roads file which originally contained all the Roads in BC.
  • The Clip layer is the layer you wish to be your AOI. Cliplayer.png
  • Name the output shapefile and specify an appropriate location for it. Browse.png
  • Then Click OK. OK.png

Preforming a Union

A union must be completed on all of the vector layers that do not have full data coverage of the boundary file. The union will act to fill any NULL values in the dataset to be 0s instead; this will become important when using the Raster Calculator in later steps.

  • To complete this process, go to the Vector Tab, click Geoprocessing Tools, and click Union. Union.png
  • The input vector layer should be boundary file in all cases. Boundary.png
  • The union layer should be any layer that does not have full coverage, as described above. Union1.png We completed this process for lakes, parks, grey wolf range, landcover, deforested areas, and hunting camps.
  • Specify the location and name of the output shapefile. Browse.png An example of how we named ours is Parks_U.
  • Click OK. OK.png
  • A geoprocessing box will pop up asking if you would like to add the new layer to the TOC.
  • Click Yes. Yes.png

Parksunion.png

Figure 1: shows the Parks_U layer. The boundary area is shown in grey and the parks are shown in white.

Editing the Attribute Table

The attribute table must be edited on all the layers you preformed a union on. A CLASS field will house the unique values from which we will create our rasters later on.

  • To open the attribute table, right click on the layer. Openatttable.png
  • Left click on Open Attribute Table.
  • In order to edit, click the Editor Mode on. Edit.png
  • Create a new column by clicking New Column. Newcolumn.png
  • The Add Column Window will pop up. Give the column a name. We named our CLASS. Columnname.png
  • If you would like, you can give the column a comment; however, it is not necessary.
  • Ensure the type is set to whole number (integer), Type.png with a width of 1. Width.png
  • The click OK. OK.png
  • In the new column CLASS, set the original boundary to be 1 and all the remaining attributes to be 2.
  • The boundary can be distinguished by clicking on the numbers on the left side of the window. (seen in red). Class2.png
  • As you click the numbers, sections of the map will become highlighted. Highlight.png
  • Again, once you have found the boundary, put a 1 in the CLASS column and a 2 in the rest of the columns.
  • To save changes click the Editor Mode button again. Edit.png

Importing Vectors to GRASS Format

To use the GRASS Plugin all the layers must be imported into a GRASS format. For all the vector layers the tool v.in.ogr.qgis must be used.

  • To do so go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Then click Open GRASS Tools. Grasstools.png
  • Next go to the Modules List Tab. Moduleslist.png
  • In the Filter Box type v.in.ogr.qgis. Filterv.png
  • Click on the Correct Tool. Grassvec.png
  • The tool will pop up.
  • Use the drop down OGR vector layer arrow to select a layer to change to GRASS format. Vectlayer.png
  • IMPORTANT NOTE: the layer must be on in the TOC for the drop down to function.
  • Give the Output Vector Map a name. Outputvec.png An example of our naming scheme is Deforest_U_G, where the "G" signifies that it is now in a GRASS vector format.
  • Click Run. Run.png
  • Once the tool has successfully finished, click View Output. ViewOutput.png The layer will appear in the TOC.

Importing Rasters to GRASS Format

To use the GRASS Plugin, all the raster layers must also be imported into a GRASS format. For all the raster layers the tool r.in.gdal.qgis must be used.

  • To do this, go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Then click Open GRASS Tools. Grasstools.png
  • Go to the Modules List Tab. Moduleslist.png
  • In the Filter Box, type r.in.gdal.qgis. Filterr.png
  • Click on the correct tool. Grassras.png
  • The tool will popup.
  • Use the drop down loaded layer arrow to select a layer to change to GRASS format. Grassrasinput.png
  • IMPORTANT NOTE: the layer must be on in the TOC and activated it show up in the dropdown menu.
  • Give the Output Raster Map a name a click Run. Run.png An example of our naming scheme is DEM_G. Grassrasoutput2.png
  • Once the tool has successfully finished, click View Output. ViewOutput.png The layer will appear in the TOC.

Converting Vectors to Rasters

The convert vector to raster does exactly as the name sounds, converts GRASS vectors to GRASS rasters. All the vectors layers must be converted to raster in order to preform the reclassification in the following step. For our project we converted lakes, parks, landcover, grey wolf range, hunting camps, and deforestation.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Then click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the Filter Box, type in v.to.rast.attr. Filterv.to.r.png
  • Click on the correct tool. V.to.rast.png and the tool will then open.
  • Using the dropdown menu, select input vector layer you wish to rasterize. Inputv.to.r.png
  • Remember, the layer must be on for it to appear in the dropdown menu.
  • In the Attribute Field, select the CLASS layer that you created. Attclass.png
  • Give the Output Raster Map a name. V.to.routput.png
  • Click Run. Run.png
  • Finally, click View Output. ViewOutput.png

Raster Data Processing: Creating the Slope Layer

To create a Slope layer, a Digital Elevation Model (DEM) must be given as the input.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the Filter Box, type Slope. Filterslope.png
  • Click the Slope Tool. Slope.G.png
  • Input the name of the Elevation Raster Map (DEM). Slopeinput.png
  • Name the Output Slope Raster Map. Our output map was named Slope. Slopeoutput.png
  • The format for reporting the slope can be degrees or percent; we used degrees. Degrees.png
  • Click Run. Run.png
  • Lastly, click View Output. ViewOutput.png

DEMtoslope.png

Figure 2: Left: The DEM. Right: The resulting slope raster.

Reclassifying the Rasters According to Cost

In order to assign a cost value to each cell, we must perform a reclass on each raster. Before beginning the reclass, a textfile (.txt) must be written in which the reclass rules will be specified. This subjective process that should be based on scientific literature and expert opinion.

Creating the Reclass Rules Text Files

  • For each unique pixel value in a raster, the reclass rules will dictate the assigned cost (i.e. the level of difficulty, from 1 to 10) that a wolf would have traveling across it. For example, any water pixel in the lakes raster, was assigned a cost of 7. The cost value of 7 was assigned because water poses a barrier to wolf movement; however, the wolves can swim if necessary.

Reclassrules.png

  • In the image shown above, the first column on the left indicates each unique pixel value in the raster (recall, for the layers in which a union was required,these values would be 1 (the boundary) and 2 (ex.lakes)). The second column indicates the cost value you wish to reassign to each pixel.
  • If the raster has more than two unique values, then you can assign a single cost value to a range of slope values. This example is demonstrated below using our Slope Raster.

Reclassrulesslope.png

Running the Reclass Tool

Next you must actually run the reclass using the r.class tool.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the Filter Box, type in r.reclass. Filterreclass.png
  • Click on the correct tool. R.reclass.png
  • Input the raster map to be reclassified. Reclasinput.png
  • For the File Containing Reclass Rules parameter, Browse to the location of your saved reclass rules text file. Reclassrulesinput.png
  • Specify an Output Raster Map name. For example we called ours Huntrange_Reclass. Relcassoutput.png
  • Now click Run. Run.png
  • Then, click View Output. ViewOutput.png

Combining the Cost Rasters in the Map Calculator

To create a cost raster that displays the cumulative cost of moving over the land, all the individual cost rasters must be added together using the Raster Map Calculator.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the Filter Box, type in r.mapcalculator. Filtermapcalc.png
  • Click on the map calculator tool. R.mapcalc.png

Picture1005.png

Figure 3: Unfortunately, the r.mapcalculator tool can only take in 6 input rasters. Since we had 8 cost factors, the calculation needed to be done in two steps, shown above.

  • Click Run. Run.png
  • Click View Output. ViewOutput.png

FINALMASTERRASTER2.png

Figure 4: The final Master Cost Raster created by adding all the individual cost rasters together. The lighter areas indicate cells with high cost to movement (i.e. represent barriers or danger), and the darker areas show cells with lower cost.

Evaluating the Least Cost Paths and Least Cost Corridors

The Wolf Ranges

Before starting the actual evaluation, look at Figure 5 below. This shows the locations of the fictitious wolf ranges (i.e. areas where metapopulations of wolves are known to reside). The ranges are labeled A through D, from North to South, respectively. The goal of this analysis was to identify which paths pose the least resistant/danger to movement between each of these ranges.

Boundarypoints2.png ::

Grey Wolf

Figure 5: The location of wolf ranges A, B, C, and D.

Evaluating Least Cost Path and Corridor between Wolf Ranges A and D

For this example, the least cost path and corridor from wolf ranges A to D were calculated. The first step in actually evaluating a cost path/corridor, is to calculate an accumulated cost surface from a starting point (A); this is done using r.walk. The second step is to run r.drain on the results from r.walk; in this step the destination (D) is specified. The output from this will be the least cost path from point A to D. This path should then be converted to a vector in order to create an editable line.

To generate the least cost corridors between ranges A and D, another accumulated cost surface must be created, this time, using point D as the starting point. The final step is to add these two accumulated cost surface rasters together, which will create the cost corridor.

Generating an Accumulated Cost Surface using r.walk

The r.walk.vect tool creates an accumulative cost distance value for each cell compared to the specified source location. This means that cells farther from the source feature will receive a higher cost distance value than cells closer to the source feature. This accumulated cost distance surface is a required input of the r.drain tool which actually generates the least cost path. In our example we wanted to inspect the path from wolf range A to D, so location A would be the starting point.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the filter box type in r.walk. Filter rwalk.png
  • Click on the r.walk.vect tool. R.walk.vect.png
  • In the Name of Elevation Input Raster Map parameter, select the DEM. Rwalkelevlinput.PNG
  • In the Name of Input Raster Map Containing Friction Costs parameter, insert the master cost raster. Rwalkcostinput2.PNG
  • In the Starting Points Vector Map parameter, select the starting location point. For our example, we wanted to start at Wolf Range A. Rwalkstartingpoint.PNG
  • Specify a output raster map name and deselect the option to Use the 'Knight's move'. For example we called ours rwalk_A. Rwalkoutput.PNG
  • Now click Run. Run.png
  • Then click View Output. ViewOutput.png
  • Once your map has appeared, right click on the layer in the TOC.
  • Left click on properties. Properties.png
  • Got to the Style Tab Style.png
  • In the Colormap box, use the dropdown menu and click colormap. Colourmap.png
  • Now go to the Colormap Tab. Colourmaptab.png
  • In the classification mode box, use the up arrows to make 8 classes. Classmode.png
  • Click classify. Classify.png

RwalkA.png

Figure 6: The accumulated cost surface raster for wolf range A .

Generating Least Cost Paths using r.drain

r.drain creates the least cost path between the staring point and the destination. Although this tool was originally designed to be used in a hydrology context (hence the prompt for an elevation raster), it functions in the same manner for any accumulated cost surface raster.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the filter box type in r.drain. Rdrainfilter.png
  • Click on the r.drain tool. Rdraintool.png
  • In the Name of Elevation Raster Map box, use the dropdown menu to select rwalk_A. Rdraininput.png
  • Give the output raster map a name. An example of our naming scheme would be r.drainAD. Rdrainoutput.png
  • Next you must input the coordinates of the starting point. Contrary to it's decriptor, this point will actually be the destination point, in our case, this was wolf range D. Recall, the starting point (wolf range A) was previously specified in the r.walk tool to create the accumulated cost surface.
  • The coordinates can be determined by using the Pan Map tool (in the upper left corner). Handtool.png
  • Hold the Pan Map tool over the destination point The coordinates can be seen in the left hand corner. Coordinates.png
  • Write these coordinates down and then place them in the starting points box. Startingpoint.png
  • The result is a path that goes from Wolf Habitat A to Wolf Habitat D. (See Figure 7)

Path.png

Figure 7: The least cost path from wolf range A to D. It is hard to see since it is a raster. In the next step we will convert it to a vector and better symbolize it.

Converting the Least Cost Paths to Vectors

The r.to.vect.line tool can change the raster path created from r.drain from a raster to vector line. This is highly recommended since it will create a line who's appearance editable.

  • Go to the Plugins Tab. Plugins.png
  • Click GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the filter box, type in r.to.vect.line. Linetool.png
  • Click on the correct tool. R.to.vect.linetool.png
  • The input raster map should be r.drainAD.Lineinput.png
  • The output vector line should be named something appropriate to what your path represents. We named ours adpath. Lineoutput.png
  • Click Run. Run.png
  • Then click View Output. ViewOutput.png

Preparing to Generate a Least Cost Corridor

To create a least cost corridor between to locations, two accumulated cost surfaces must be generated for the corresponding start and end locations. In this example, we already have the accumulated cost surface for wolf range A; now we need a second accumulated cost surface surface for wolf range D. This will be done by running the r.walk.vect again; however, this time point D is the starting point. The second step in creating the corridor is to add these two accumulated cost surfaces together, this part will be addresses in the following section.

  • To create the second accumulated cost surface, refer to the "Generating an Accumulated Cost Surface using r.walk" section above.
  • Be sure to change the starting point to be the appropriate layer for your specific analysis. In this case, the new input for us was wolf range D (wrD_pnt_G).Walkstartpoint.png
  • Don't forget to rename your output appropriately as well. We named ours rwalk_D. Rwalkresultsname.png
  • The resulting r.walk map for wolf range D is shown below.

Rwalk Dmap.png

Figure 8: The accumulated cost surface raster for wolf range D .

Generating a Least Cost Corridor between Two Locations

The final step to create a least cost corridor between two locations is to add the respective accumulated cost surfaces together using the r.mapcalc tool. This tool is a graphical version of the r.mapcalulator tool and was chosen this time just to give you experience working with both interfaces.

  • Go to the Plugins Tab. Plugins.png
  • Click on GRASS. GRASS1.png
  • Click Open GRASS Tools. Grasstools.png
  • Go to the Modules List. Moduleslist.png
  • In the filter box, type in r.mapclac. Mapcalc.png
  • Click on the r.mapcalc tool. Rmapcalctool.png
  • In the window, create the addition equation that adds the two accumulated cost surfaces together. For example, our equation added rwalk_A and rwalk_D. Mapcalcequation.png
  • In the output, name the map something appropriate. We chose adcorridor. Mapcalcoutput.png
  • Click Run. Run.png
  • Finally, click View Output. ViewOutput.png

ADpath&cor.png

Figure 9: The least cost path from wolf range A to D overlaid on the corresponding least cost corridor map.

Conclusion

Repeating the r.walk and r.drain processes of creating least cost paths and corridors for each combination of starting and ending destinations (AB,AC,AD,BC,BD,CD). You can create a map that resembles Figure 10 by turning on all these created layers in the TOC. This map shows all the possible least cost paths to each wolf range overlaid on an cumulative least cost corridor. This cumulative least cost corridor was created by adding all of the accumulated cost surfaces for each starting point together, as shown in Figure 11. Sometimes, it might be appropriate to overlay the paths on other surfaces, such as the master cost raster (e.g. Figure 12). This map just emphasizes that the paths in actual fact do follow the least costly (lighter cells) routes. For example, the large whiter circles represent the radius around the hunt camps, which were assigned a cost factor of 9; as a result, the paths serve around all of these dangerous areas.

Coridoor&path2.png

Figure 10: (Above) The final map showing all the possible least cost paths to each wolf range overlaid on a cumulative least cost corridor raster .


A+B+C+D.png

Figure 11: (Above) The r.mapcalc graphical equation used to add all of the accumulated cost surfaces to create the cumulative least cost corridor raster seen in figure 10.

Masterrast&path.PNG

Figure 12: (Above) All the possible least cost paths overlaid on the master cost raster. This emphasizes that most of the high cost areas (shown in lighter tones) are being avoided by the paths.


Pawprints.gif

Helpful Links

Download Quantum GIS

Welcome to the Quantum GIS Project

Quantum GIS User’s Manual

Welcome to GRASS GIS

Scholars Geoportal

GeoBase

Carleton Geography

References

Grey Wolf Pic

Animated Paw Prints

Bibliography

Gietl, R., M. Doneus, and M. Fera. "Cost Distance Analysis in an Alpine environment: Comparison of different cost surface modules." Proceedings of the 35th International Conference on Computer Applications and Quantitative Methods in Archaeology (CAA),(Berlin 2007). 2008.

Shortridge, Ashton. GEO 428: Least Cost Paths. Michigan: Michigan State Univeristy, 20 Nov. 2012. PDF.

Singleton, Peter H., William L. Gaines, and John F. Lehmkuhl. "Landscape permeability for grizzly bear movements in Washington and southwestern British Columbia." Ursus 15.1 (2004): 90-103.

Singleton, Peter H., William Lee Gaines, and John F. Lehmkuhl. Landscape permeability for large carnivores in Washington: a geographic information system weighted-distance and least-cost corridor assessment. US Department of Agriculture, Forest Service, Pacific Northwest Research Station, 2002.

Quantum GIS Development Team, <2012>. Quantum GIS Geographic Information System. Open Source Geospatial Foundation Project. http://qgis.osgeo.org