On using QGIS

[back]

Troubleshooting on macOS

Because macOS sucks. Avoid if you can.

The long term release of {QGIS} (3.10.11 LTR) doesn’t work properly on my operating system (macOS Catalina 10.15.7). The main broken functionality is the raster toolbox, which is missing a certain library. There are workarounds for this issue, that recommend copying the missing library from the macOS system library to QGIS’s lib folder. However, this workaround seems to break the SAGA GIS tools also in this version. These bugs seem to be fixed in the latest release (3.16).

Extracting river network from a DEM

  1. Load the DEM into QGIS
  2. The coordinate system needs to be projected to UTM
  3. Use fill sinks (wang & liu) from the SAGA GIS toolbox
  4. This returns a DEM with smoothed topography
  5. Use Strahler order from the SAGA GIS toolbox on the filled DEM to calculate river networks
  6. Filter out low order streams to clean up the layer, using the Raster Calculator on the river network layer as StrahlerOrder@1 >= (threshold)
  7. Use Channel network and drainage basins from the SAGA GIS toolbox on the filled DEM to create a shp-file
  8. Set the Threshold to the value (threshold) used to clean up the river network

These steps are shown in {this youtube video}.

Extracting watershed boundaries from a DEM

  1. Extract the river network
  2. Create a point layer and place a point on a river network cell at the outlet of the watershed you try to delineate
  3. Extract the x- and y-coordinate of the point, using the Features table of the point layer with the Field Calculator
  4. Use Upslope Area from the SAGA GIS toolbox, using the extracted x- and y-coordinates as Target X coordinate and Target Y coordinate, respectively, and [0] Deterministic 8 as Method
  5. Use the Polygonize tool from Raster’s Conversion to convert this layer as a shp-file
  6. We can use this shape file to clip the DEM and the river network

Extracting longitude and latitude from DEM

Longitude is the angular distance of a place east or west of the 0 meridian at Greenwich, England. Latitude is the angular distance of a place north or south of the earth’s equator.

  1. Load DEM into QGIS
  2. Project reference coordinate system to UTM
  3. Add shapefile layer
  4. Create a point object at the relevant locations you
  5. Edit the shapefile layer and open the calculator
  6. Under geometry, you will find the operators $x and $y, which correspond to longitude and latitude, respectively.