Habitat Analysis using QGIS 3.22 and QuickMapServices Plugin

From CUOSGwiki
Revision as of 10:38, 11 December 2020 by TylerCoade (talk | contribs)
Jump to navigationJump to search

Purpose

The overall objective of this tutorial is to develop the spatial analysis and cartographic skills within the open-source software QGIS 3.10. By using the QuickMapServices plugin, users should be able to see the applicability of the add-on and be able to use it going forward in their own mapping careers. This tutorial will follow a step-by-step process that will determine ideal habitat locations for a hypothetical animal within Algonquin Park Ontario. With all of the data being open-sourced and QGIS being free, the entirety of this tutorial can be completed by anyone with a well-functioning computer or laptop.

Data Management and Setup

Required Programs and Plugins (Windows 64-Bit)

  • The following programs are required to complete the tutorial. Please visit the URL’s attached and follow the steps to successfully install QGIS 3.10 (long-term release) along with the Open Layer Plugin. Please note: the following tutorial is being completed on a computer using Windows 10 as its OS.

Download Links

  • 1) QGIS 3.10 [1]
  • 2) QuickMapServices Plugin
QGIS 3.10 Download










Data Management for the Tutorial

  • Data being used are all accessible through Ontario GeoHub. When downloading the datasets, be sure to select the shapefile option within Ontario Geohub as this will be the format that we will be using later on in our tutorial (See figure 2 for additional context)
    • Provincial Park Boundaries [2]
    • Ontario Watershed [3]
    • Digital Elevation Model of Ontario [4]
    • Road Network within Ontario [5]


Ontario Geohub Download options
  • Download options available within Ontario GeoHub. These options can be accessed once a dataset is selected within the website and these options can be found on the right side of the website.
















Organization of Shapefiles within your Computer

After you have downloaded all of the required files, it is strongly recommended to create a new folder within your C: drive that will act as a main directory for the project. This is very important as we will be dealing with a large number of shapefiles that will be changed in many different ways. This folder will also become the working directory and saving location for the project as a whole, therefore it will keep everything compact and easily accessible.


Setting up QGIS for Habitat Analysis

You can now open up QGIS for the first time as there will be an icon located on the desktop of your computer. You will be prompted by three different options within the middle of the screen and you will need to select “New Empty Project” (See figure 3 for screenshot of this action).

QGIS Start-up Screen



























  • Screenshot indicating which option you are required to select when beginning a new project within QGIS 3.10. This option should always be selected when beginning any new task.


QGIS Coordinate Reference System Settings

Prior to importing your shapefiles into QGIS, you are required to set a projected coordinate system for your new project file. In this case, all of the data being used was accessible made accessible through the Ministry of Natural Resources therefore we will be using their projected coordinate system known as “NAD83/ Ontario MNR Lambert”. This will ensure all of our analysis will be accurate and measured within useable measurements. This menu can be accessed by the following path within the top menu of QGIS: Project -> Properties -> CRS. Please see screenshot below for reference when setting up your CRS within QGIS 3.

QGIS Coordinate Reference System Setup



























  • This is what your CRS settings should look like prior to begging this project. It is crucial that you complete this step otherwise the data might become corrupt.


Importing your Shapefiles

As mentioned above, now is the time you can import your shapefiles. You can import your shapefiles by using the browser menu within QGIS and located the folder within your C: drive (or wherever else you saved them). Select each shapefile, and drag it into the layers tab located underneath the browser tab. Your browser tab can be seen in the photo below and your imported shapefiles should be visible within the layers shapefile as seen in the image beneath.

QGIS Browser Menu
QGIS Layer Menu






Creating Area of Interest and Clipping Shapefiles

For practical use, we must begin clipping each shapefile as we are required to focus on a specific region within Ontario. For this tutorial we will be using Algonquin Park as our area of interest. Therefore, we must first select “Algonquin Park” from the “Provincial Park Regulated” shapefile and export the selected features. This will allow us to use this singular shapefile as the clipping method for the remaining three files (Road_Network, Hydro_Network and DEM). Please follow the steps listed below

  • Toggle the “select by features or single click” tool within the top bar menu
  • Click on Algonquin Park
  • Right-click on Provincial Park Regulated Tab
  • Click on Export -> Save Selected Feature As
  • Save this file within your working directory and name it “AlgonquinBoundaries” and ensure the “add saved file to map” button is toggle on.
  • You can now delete the original Provincial Park Regulated Shapefile and continue with AlgonquinBoundaries


Clipping Road Network and Water Network Shapefiles

Moving forward, the “AlgonquinBoundaries” shapefile will be used as your reference file and you will begin clipping the other files to these extents. To do this please follow the instructions listed below:

  • Under the “vector” tab within the top menu bar of QGIS, select these options: Vector -> Geoprocessing -> Clip.
  • This will open up a clipping menu and you will need to use the following parameters:
QGIS 3.10 Clipping Settings






















  • Run this algorithm and repeat the process for the road network shapefile as well (Substitute input layer for roads instead of water). This will result in two new layers being added to your document. Once these have both been completed, you can delete the original shapefiles titled “Ontario_Road_Network_ORN_Segment_With_Address” and “Ontario_Hydro_Network_OHN” as they will not be required moving forward.

Clipping DEM File by Mask

To clip a raster file, the process is similar however you must use a different tool within QGIS. To do this follow the steps below:

  • Select “Raster -> Extraction -> Clip Raster by Mask Layer.
  • Ensure you have the following parameters:
QGIS Clip Raster by Mask Layer Settings


































  • You will now have all of your layers covering the extent of Algonquin Park and you are almost ready for analysis.