Tutorial: Stream and Catchment Delineation using GRASS tools
Site: | OpenCourseWare for GIS |
Course: | QGIS Advanced Tutorials |
Book: | Tutorial: Stream and Catchment Delineation using GRASS tools |
Printed by: | Guest user |
Date: | Thursday, 21 November 2024, 4:58 PM |
1. Introduction
The QGIS Processing Toolbox gives access to many useful GRASS algorithms.
In this tutorial we're going to use the GRASS tools to delineate the Rur river and its catchment.
After this tutorial you're able to:
- create a hydrologically correct DEM by filling the sinks
- calculate flow accumulation
- delineate streams using a flow accumulation threshold
- delineate a catchment of a specified outlet
2. Fill sinks in the DEM
The first step is to fill the sinks in the DEM. Sinks are artificial depressions that trap the water and prevent flow to the outlet.
1. Start QGIS Desktop with GRASS.
2. Add dem.tif to the Layers panel.
3. Open the Processing Toolbox panel: in the main menu go to Processing | Toolbox.
4. In the Processing Toolbox choose to GRASS | Raster (r.*) | r.fill.dir.
5. In the r.fill.dir dialogue choose the DEM layer as Elevation. Keep the default Output aspect direction format as grass. Save the Depressionless DEM as DEM_filled.tif (make sure to choose a GeoTiff) and uncheck the other output layers, because we don't need them.
6. Click Run. Close the dialogue after processing. Processing will take a while. Ignore the red warnings in the log.
More info about the algorithm can be found here.
7. Remove the DEM layer from the Layers panel so we only have the DEM_filled layer there to proceed with.
3. Calculate flow accumulation and flow direction
The next step is to calculate the accumulation of water over the filled DEM.
1. In the Processing Toolbox choose GRASS | Raster (r.*) | r.watershed.
The r.watershed tool has a lot of settings. Check the GRASS manual page for this tool to learn more about the settings of the algorithms.
2. In the r.watershed dialogue choose DEM_filled as Elevation. Set the Minimum size of exterior watershed basin to 500 pixels and check the box to Enable Single Flow Direction (D8) flow. Save the Number of cells that drain through each cell to accumulation.tif and save the Drainage direction to flowdir.tif. Uncheck the other outputs, we don't need them.
3. Click Run. Close the dialogue after processing. Ignore the warnings in red.
The flow direction layer is encoded using the GRASS definition: Drainage is 8 directions numbered counter-clockwise starting from 1 in north-east direction. The value 0 indicates that the cell is a depression area. Negative values indicate that surface runoff is leaving the boundaries of the current geographic region. The absolute value of these negative cells indicates the direction of flow. Therefore we need to convert the flowdir layer to absolute values.
4. In the main menu go to Raster | Raster Calculator.
5. In the Raster Calculator compose the following equation:
( "flowdir@1" < 0 ) * -1 * "flowdir@1" + ( "flowdir@1" >= 0 ) * "flowdir@1"
4. Determine the flow accumulation threshold for channels
"accumulation@1" > 50000
5. Delineate the streams
In the previous section we've determined the flow accumulation threshold for determining the streams. Here we're going to delineate the streams using that threshold value.
1. In the Processing Toolbox choose GRASS | Raster (r.*) | r.stream.extract.
2. In the r.stream.extract dialogue choose DEM_filled as Input map: elevation map and accumulation as Input map: accumulation map. Change Minimum flow accumulation for streams to 50000 cells (that's the value that we've determined in the previous sections). Save the Unique stream ids (vect) to streams.gpkg. We don't need the other outputs.
3. Under Advanced parameters change the v.out.ogr output type to line.
4. Click Run. Close the dialogue after processing. Ignore the red warnings in the log.
Note 1: this only works with the GeoPackage output format for the line vector. A shapefile will result in an empty layer.
Note 2: the Input map: accumulation map
is optional. If you don't provide this it will calculate the flow
accumulation again, but the result will be slightly different then what
we've calculated in the previous section.
For more info about r.stream.extract check the manual.
5. Style the streams vector layer.
Now we have delineated the streams we can determine the outlet point on the stream for which we want to delineate the catchment.
6. Delineate the catchment
The next step is to look for the outlet of the catchment at the delineated stream and then calculate the catchment of this outlet.
1. Follow the delineated stream downstream to find the approximate location where the Rur (Roer in Dutch) enters the Meuse (Maas in Dutch) river. Use the OSM Standard and streams vector layer to find this location.
2. In the Processing Toolbox go to GRASS | Raster (r.*) | r.water.outlet.
3. In the r.water.outlet dialogue choose flowdirabs as Name of input raster map. For the Coordinates of outlet point click and choose the point on the delineated stream. Zoom in close enough.
4. Save the Basin as catchment.tif.
5. Click Run. Close the dialogue after processing.
6. Click right on the catchment layer in the Layers panel and choose Zoom to layer.
Now we need to convert the catchment to a polygon.
7. In the Processing Toolbox choose GRASS | Raster (r.*) | r.to.vect.
8. In the r.to.vect dialogue choose catchment as Input raster layer and choose area as Feature type. Keep the rest as default. Save the Vectorized output as Rur_catchment.shp.
9. Click Run. Close the dialogue after processing.
10. Style the layers.