Hydrological & Terrain Analysis using WhiteboxTools

From CUOSGwiki
Jump to navigationJump to search

Introduction

This tutorial demonstrates how to perform hydrological and terrain analysis within QGIS. The workflow begins with downloading a DEM dataset, installing WhiteboxTools, and configuring QGIS to recognize the WhiteboxTools functions. Subsequent steps includes DEM preprocessing, flow direction and flow accumulation modelling, deriving slope and the creation of a Topographic Wetness Index (TWI) map.

Data & Software Requirements

  • 30 m DEM of the Kananaskis region
  • QGIS
  • WhiteboxTools Open Core

Step 0: Installing WhiteboxTools

Download WhiteboxTools

To download WhiteboxTools, head on over to the WhiteboxTools Download Page and download the WhiteboxTools Open Core. After downloading, extract the .zip file and place the folder somewhere easy to find. For example, you may store it in: C:\Program Files\WhiteboxTools\

Configuring WhiteboxTools in QGIS

In QGIS, open Plugins Manage and Install Plugins. In the search bar, type "WhiteboxTools" and the plugin should appear in the list. Select it and click "Install Plugin".

QGIS Plugins.png


To configure the path to the WhiteboxTools executable, open Settings Options Processing. In the dialogue window, open Providers WhiteboxTools, and under "WhiteboxTools executable", browse to the folder where you extracted the files and select the file named "whitebox_tools" which is found inside the WBT folder.

WhiteboxTools Executable in QGIS.png


Once configured, WhiteboxTools tools will appear in the QGIS Processing Toolbox.

Step 0.5: Downloading the DEM

The digital elevation model (DEM) used in this tutorial is the Copernicus GLO-30 Digital Elevation Model, downloaded through the OpenTopography portal.

Feel free to use your own DEM, but if you wish to follow the tutorial with the exact dataset shown here, go to the Copernicus GLO-30 Digital Elevation Model.

On the OpenTopography page, scroll down to the "Coordinates" section, check off "Manually enter selection coordinates", and enter the following:

Xmin = -115.44776916503906

Ymin = 50.68473994828557

Xmax = -115.0165557861328

Ymin = 51.03926216055825

Before submitting the request, ensure the output format is set to "GeoTiff".

Step 1: Importing the DEM into QGIS & Preparing Your Workspace

Once your DEM has been downloaded, the first step is to load it into QGIS.

1. Add the DEM to QGIS

Add the DEM to QGIS by going to Layer Add Layer Add Raster Layer. Navigate to your downloaded DEM in the dialogue window and click "Add".

The DEM should now appear as a grayscale raster in the QGIS map window. It should look something like this:

[insert image of raster]

2. Rename the DEM layer for clarity

Meaningful layer names is crucial for an organized workflow, especially in hydrological and/or terrain analysis where many output rasters are generated. Renaming the DEM ensures all subsequent outputs are easy to identify and prevents confusion when selecting inputs for WhiteboxTools tools.

To rename the layer, right click the DEM in the Layers panel and click on "Rename Layer". Choose a meaning full name, such as: "kananaskis_rawDEM".

Before moving on to the next step, ensure you have saved your QGIS project.