Tutorial: Burn stream network into DEM

Site: OpenCourseWare for GIS
Course: QGIS Advanced Tutorials
Book: Tutorial: Burn stream network into DEM
Printed by: Guest user
Date: Saturday, 20 April 2024, 7:48 AM

1. Introduction

When we delineate a catchment, we need the stream network to identify the outlet. The automatically delineated channels, however, can deviate a lot from the channels we see on a map or satellite image.

When we have a river GIS layer available we can improve the catchment delineation by burning the stream network into the DEM.

After this tutorial you'll be able to:

  • Download a river from OpenStreetMap using the QuickOSM plugin
  • Preprocess a river vector before burning it into a DEM
  • Burn a river into a DEM
The data for this tutorial is a DEM of the Rur catchment area. It has been derived from the SRTM 1-Arc Second product, which has been mosaicked, reprojected and clipped.

animation burn


2. Download river line vectors from OpenStreetMap

In this section we're going to download all river line vectors in the study area from OpenStreetMap.

1. Start QGIS Desktop with GRASS.

2. Add the provided dem.tif layer to the Layers panel.

3. Style the DEM layer, using a colour ramp and blending with hillshade.

New project DEM

The next step is to install the QuickOSM plugin.


4. In the main menu go to Plugins | Manage and Install Plugins...

5. Search for QuickOSM and click Install Plugin and Close the dialogue.

Now we're going to download river data from OpenStreetMap.

6. In the main menu go to Vector | QuickOSM | QuickOSM...

7. In the QuickOSM dialogue choose for Key waterway and for Value river. For Layer Extent choose DEM. Expand Advanced and make sure that only line features are selected. The dialogue should look like the picture below.

QuickOSM dialogue

8. Click Run query. Close the window when the message "Successful query, 1 layer(s) has loaded." appears.

Now you have all rivers in the study area.

In the next section we're going to select the Rur river and export it to a new layer.


3. Select and export a specific river

In the previous section we've downloaded all river line vectors in the study area from OpenStreetMap. In this section we're going to select the Rur river and export it to a new layer.

1. Click right on waterway_river and choose Open Attribute Table.

Inspect the data in the attribute table. You'll see that the name of the river is in the name field. We're going to select rivers with the name Rur and Roer. Rur is the German name and Roer is the Dutch name, so we need both to get the whole river.

2. In the attribute table click the Select features using an expression icon .

3. Type the following expression: "name"  = 'Rur' or "name" = 'Roer'

This will select all features with the name Rur or the name Roer.

4. Click Select Features and Close the dialogue.

Now you'll see these rivers selected in the map canvas (yellow) and in the attribute table (blue).

Selected river

5. Click right on waterway_river in the Layers panel and choose Export | Save Selected Features As...

6. In the Save Vector Layer As... dialogue save the layer as in the ESRI Shapefile Format with Layer name Rur_river.shp. Change the projection to the one of the project (EPSG: 32632) and click OK.

7. Remove waterway_river from the Layers panel.

Now we need to clean up a bit the river layer. Some sections are not part of the main river.

8. Toggle to editing mode by clicking in the editing toolbar.

9. Select the wrong parts using and press the <Delete> button. Make sure you remove all.

10. Toggle off editing by clicking again and click Save.

The river still consists of many segments. The final step to get a correct river layer is to dissolve the features.

11. In the main menu choose Vector | Geoprocessing Tools | Dissolve...

12. In the Dissolve dialogue choose Rur_river as Input layer, keep the defaults and save the output to the Rur_river_dissolved.shp.

13. Click Run. Close the dialogue after processing.

14. Remove the data_longitudinal_profile Rur_river layer from the Layers panel.

15. Style the Rur_river_dissolved layer. Make it dark blue.

Rur river dissolved

Now we have the complete Rur river, we can burn it into the DEM in the next section.

4. Burn the river into the DEM

Now we have the Rur river vector, we can burn it into the DEM.

1. Open the Processing Toolbox. In the main menu go to Processing | Toolbox.

2. In the Processing Toolbox choose GRASS | Raster (r.*) | r.carve

3. In the r.carve dialogue choose the dem layer as Elevation and the Rur_river_dissolved layer as Vector layer containing stream(s). Change Stream width to 60 meters, which is 2 pixels in our case. Change Additional stream depth to 2 meters, so it will be 3 meters in total. You can play with Stream width and depth to improve the result. Check the box before No flat areas allowed in flow direction. Save the Modified elevation as burndem.tif. Uncheck the Adjusted stream points layer, we don't need that.

4. Click Run. Close the dialogue after processing.

Let's style and compare the result.

5. Copy the style from the dem layer to the burndem layer.

6. Duplicate the burndem layer and style it with the hillshade renderer.

7. Create Map themes for burndem with corresponding hillshade and another one for dem with corresponding hillshade.

8. In the main menu choose View | New Map View.

9. Dock the new map view to the right side of the screen and choose the DEM Map theme for the main map canvas and DEM burned for the right map view (Map 1).

Compare burn

10. Make sure that both views are linked and the colours are stretched for the updated canvas.

Now you can clearly see the effect of burning the river network into the DEM.

With this you can proceed with the catchment delineation steps. The first step now is to fill the sinks, because we have only fixed the river, but there might be other depressions.