7. Fill Sinks and Calculate Flow Direction

7.3. Calculate the Flow Direction

The next step is to fill the sinks (artificial depressions in the DEM) and calculate the flow direction raster. PCRaster does both in one step with the lddcreate tool. Check the documentation for the details.

1. In the Processing Toolbox go to Hydrological and material transport operations | lddcreate

2. In the Lddcreate dialogue choose dem as DEM layer. Keep all other defaults so it will fill the sinks completely. Save the results to flowdirection.map.


3. Click Run. This can take a few minutes before the result appears in the map canvas. Click Close to close the dialogue.

In the next step we'll style the flow direction map.


A flow direction layer indicates the direction of flow for each pixel. Direction can be expressed as compass direction, however we can not store text in a raster. Compass direction can also be expressed by degrees on a circle where north is 0 degrees, east is 90 degrees, etc. To store 360 degrees we would need more than 8 bits (0-255), which would increase the file size. In addition the D8 method uses discrete directions to the surrounding pixels. Therefore GIS software recodes the 8 directions. Each software, however, does it in their own way. The PCRaster lddcreate algorithm used in the QGIS Processing Toolbox uses the values of the numeric keypad for the directions.