Practical Laboratory and Mini-Assignment
This session combines a guided step-by-step laboratory tutorial (Part A) with an independent mini-assignment (Part B). You will apply the terrain processing and hydrological routing skills learned throughout Module 4.
Part A: Guided Laboratory Workflow
This tutorial guides you through setting up a project workspace, conditioning a raw Digital Elevation Model, routing water, extracting stream channels, and delineating a watershed boundary.
1. Workspace Configuration
Before starting calculations, configure your QGIS project:
-
Create a standard directory tree in your local workspace:
data/raw/(for raw inputs).data/processed/(for intermediate and final outputs).
-
Open QGIS. Save a new project as
Day4_Hydrology_Analysis.qgz. -
Set the project CRS to WGS 84 / UTM Zone 45N (EPSG:32645).
-
Copy the local DEM
output_hh.tiffrom the docs/data/Natural_Earth_quick_start/DEM/ folder into your localdata/raw/folder and load it into QGIS.
2. DEM Reprojection & Conditioning
Ensure the DEM coordinates are in meters and remove sinks to establish continuous flow:
-
Reproject DEM: Go to Raster > Projections > Warp (Reproject).... Set Input to
output_hh.tif, Target CRS toEPSG:32645, Resampling to Bilinear, and save asdata/processed/output_hh_utm.tif. -
Fill Sinks: Go to Processing Toolbox > SAGA > Terrain Analysis - Hydrology > Fill Sinks (Wang & Liu).
- DEM:
data/processed/output_hh_utm.tif. - Minimum Slope (Degree):
0.01. - Filled DEM: Save as
data/processed/filled_dem.tif. - Click Run.
- DEM:
3. Flow Direction and Accumulation
Compute flow direction paths and cumulative upstream drainage areas:
-
Navigate to Processing Toolbox > SAGA > Terrain Analysis - Hydrology > Flow Accumulation (Top-Down).
-
Configure parameters:
- Elevation:
data/processed/filled_dem.tif. - Method: Select [0] Deterministic 8 (D8).
- Flow Accumulation: Save as
data/processed/flow_accumulation.tif. - Flow Directions: Save as
data/processed/flow_direction.tif.
- Elevation:
-
Click Run. Style
flow_accumulation.tifusing a logarithmic color scale to visualize stream paths.
4. Stream Network Extraction
Isolate cells representing major streams and convert them into vector lines:
-
Open Raster > Raster Calculator....
-
Apply an extraction threshold of 1000 cells (delineating pixels with at least \(1000\) pixels contributing drainage):
"flow_accumulation@1" >= 1000 -
Save output as
data/processed/stream_network_binary.tif. Click OK. -
Vectorize the stream grid: Navigate to Processing Toolbox > SAGA > Vector <-> Raster > Vectorising Grid Classes.
- Grid:
stream_network_binary.tif. - Class Selection: Set to each class or filter for class
1. - Save output as a vector layer
data/processed/vector_streams.gpkg.
- Grid:
5. Catchment Delineation
Delineate the watershed boundary draining to a selected outlet coordinate:
-
Navigate to Processing Toolbox > SAGA > Terrain Analysis - Hydrology > Upslope Area.
-
Configure parameters:
- Elevation:
data/processed/filled_dem.tif. - Flow Method: Select Deterministic 8 (D8).
- Target X / Target Y: Click the map tool button (
...) and click a point on your stream network representing the basin outlet. - Upslope Area: Save output as a raster
data/processed/basin_boundary_raster.tif.
- Elevation:
-
Click Run. Convert this to a vector layer: Go to Raster > Conversion > Polygonize (Raster to Vector).... Select
basin_boundary_raster.tifand save as a vector polygondata/processed/basin_boundary_polygon.gpkg. -
Style the polygon with a transparent fill and a thick black outline.
6. Soil Erosion Susceptibility (RUSLE)
Calculate the topographic LS factor and compile the annual soil loss grid:
-
Calculate SAGA LS Factor: Navigate to Processing Toolbox > SAGA > Terrain Analysis - Hydrology > LS Factor.
- Elevation:
data/processed/filled_dem.tif. - Flow Accumulation:
data/processed/flow_accumulation.tif. - Method: Select [0] Moore et al. (1991).
- LS Factor: Save output as
data/processed/ls_factor.tif. - Click Run.
- Elevation:
-
Compile Final Soil Loss: Open Raster > Raster Calculator....
- Multiply the local factor rasters (\(R, K, C, P\), assuming default constants if local grids are unavailable, e.g. \(R = 250\), \(K = 0.25\), \(C = 0.1\), \(P = 1.0\)):
250 * 0.25 * "ls_factor@1" * 0.1 * 1.0 - Save output as
data/processed/annual_soil_loss.tif. Click OK. - Style
annual_soil_loss.tifusing Singleband pseudocolor classified into 5 categories (\(0-5\) Slight, \(5-10\) Moderate, \(10-20\) High, \(20-40\) Very High, \(>40\) Severe).
- Multiply the local factor rasters (\(R, K, C, P\), assuming default constants if local grids are unavailable, e.g. \(R = 250\), \(K = 0.25\), \(C = 0.1\), \(P = 1.0\)):
7. Rainfall Interpolation and Catchment Zonal Statistics
Interpolate point weather station records and compute volumetric catchment rainfall:
-
IDW Interpolation: Navigate to Processing Toolbox > QGIS > Raster Analysis > IDW Interpolation.
- Vector Layer: Select a point gauge layer (e.g.
rain_gauges.shp). - Interpolation Attribute: Select the rainfall column (e.g.
precip_mm). - Extent: Select Use Extent from >
data/processed/basin_boundary_polygon.gpkg. - Pixel Size: Set to
30meters. - Interpolated: Save output as
data/processed/rainfall_idw.tif. Click Run.
- Vector Layer: Select a point gauge layer (e.g.
-
Calculate Zonal Statistics: Go to Processing Toolbox > Raster Analysis > Zonal Statistics.
- Input Raster:
data/processed/rainfall_idw.tif. - Vector Layer Containing Zones:
data/processed/basin_boundary_polygon.gpkg. - Output Column Prefix: Type
rain_. - Statistics to Calculate: Check Mean and Sum.
- Click Run.
- Input Raster:
-
Compute Volume in Field Calculator: Open the attribute table of your catchment polygon. Open the Field Calculator, create a new decimal field
precip_m3, and enter the volumetric equation:("rain_mean" / 1000) * $areaClick OK. This calculates the total cubic meters (\(m^3\)) of rainfall entering the basin.
8. Height Above Nearest Drainage (HAND) Mapping
Delineate relative topography above stream channels to locate low-lying flood inundation hazard zones:
-
Navigate to Processing Toolbox > SAGA > Terrain Analysis - Hydrology > Relative Heights.
- Elevation:
data/processed/filled_dem.tif. - Streams:
data/processed/stream_network_binary.tif. - Relative Heights: Save output as
data/processed/hand_model.tif. - Click Run.
- Elevation:
-
Style
hand_model.tifin the Layer Styling Panel using a classified color ramp. Highlight cells between \(0\text{ m}\) and \(2\text{ m}\) in red to map regions susceptible to local flood inundation.
9. Reservoir Stage-Volume Capacity Curve Analysis
Calculate reservoir storage capacities and surface areas at varying water levels:
-
Clip DEM to Reservoir Catchment: Delineate the upslope catchment draining through a planned dam axis. Use the Raster Calculator to clip the DEM to this catchment boundary. Save as
data/processed/reservoir_dem.tif. -
Calculate Volume at Target Stage: Go to Processing Toolbox > QGIS Raster Analysis > Raster Surface Volume.
- Input Layer:
data/processed/reservoir_dem.tif. - Base Threshold: Enter the target pool height elevation (e.g.
480meters). - Method: Select Count Only Below.
- Volume / Area Output: Save as a table
data/processed/stage_volume_480.html. - Click Run. Open the HTML report to extract pool area (\(m^2\)) and storage volume (\(m^3\)).
- Input Layer:
Part B: Mini-Assignment: Watershed Terrain Characterization
1. Objective
You will independently delineate a specific sub-watershed, calculate its topographic statistics, and compile a publication-quality map layout.
2. Required Tasks
Using the layers created in Part A, execute the following steps:
-
Delineate a Sub-basin:
- Identify a downstream confluence point on
vector_streams.gpkg. - Run SAGA Upslope Area using that coordinate to delineate the upstream catchment boundary.
- Convert the output raster to a vector polygon layer named
catchment_boundary.gpkg.
- Identify a downstream confluence point on
-
Calculate Topographic Statistics (Zonal Statistics):
- Run Zonal Statistics using
catchment_boundary.gpkgas the zone anddata/processed/output_hh_utm.tifas the input raster. Compute the Mean, Min, and Max elevations. - Generate a Slope grid (
slope_degrees.tif) via GDAL Slope. Run Zonal Statistics using the slope grid to find the catchment's Mean Slope in degrees (slope_mean). - Open the attribute table of
catchment_boundary.gpkgand calculate the total catchment surface area in square kilometers:$area / 1000000.
- Run Zonal Statistics using
-
Generate Stream Ordering:
- Open SAGA Stream Order. Select the filled DEM and your stream network. Set Method to Strahler and output
strahler_order.tif. - Run the SAGA Vectorising Grid Classes tool to convert the Strahler raster to vector lines named
ordered_streams.gpkg.
- Open SAGA Stream Order. Select the filled DEM and your stream network. Set Method to Strahler and output
-
Compose Print Layout Map:
- Create an A4 landscape Print Layout in QGIS.
- Render the styled layers in the map frame:
ordered_streams.gpkgstyled graduated by theORDERfield (tributaries at \(0.2\text{ mm}\), main channels at \(1.5\text{ mm}\)).catchment_boundary.gpkgstyled with an empty fill and a solid \(0.8\text{ mm}\) red border.- Slope raster styled semi-transparent pseudocolor overlaying a Hillshade layer.
- Add a text block table detailing:
- Total Drainage Area (\(km^2\)).
- Elevation Range (\(meters\)).
- Mean Slope (\(degrees\)).
- Include essential cartographic elements: Title, North Arrow, scale bar, legend, and UTM coordinate grid.
3. Submission Files
Export your print layout to PDF and compile a ZIP file containing:
-
Basin_Terrain_Characterization_Map.pdf. -
Watershed_Terrain_Data.gpkg(containingcatchment_boundaryandordered_streams). -
Your QGIS project file saved with Relative Paths.