Professional Documents
Culture Documents
Delineating Watershed Basins From A DEM: Calculate The Flow Accumulation Grid
Delineating Watershed Basins From A DEM: Calculate The Flow Accumulation Grid
In the “Simplified Interface” the algorithms are classified according to functionality, in the
“Advanced Interface” they are grouped according to the provider.
1
“Just like the manual of a word processor doesn’t teach you how to write a novel or a poem, or a CAD tutorial doesn’t
show you how to calculate the size of a beam for a building, this guide will not teach you spatial analysis. Instead, it
will show you how to use the QGIS processing framework, a powerful tool for performing spatial analysis, but it is up
to you to learn the required concepts that are needed to understand that type of analysis. Without them, there is no point
on using the framework and its algorithms, although you might be tempted to try.” Victor Olaya, from the QGIS
Training Manual, Chapter 17.
2
Normally, the temporary files are located under C: \users\<your username>\AppData\Local\Temp\processing, and are
automatically removed when you close your QGIS session.
0 0 0 0 0
0 3 2 2 0
0 0 0 1
11
0 0 1 0
15
0 2 5 1
24
The “Catchment area” layer corresponds to the flow accumulation grid <I printed it here in
negative to save ink…>. From the flow accumulation grid we can derive the drainage channels, by
setting an accumulation threshold to initiate the construction of the segments.
Press OK, a blue object will appear in the right panel. You can move, delete or edit it.
Now, in the left panel, from the tag “Algorithms”, find and launch the “Fill sinks” algorithm. Until
now, we have only one variable (“DEM”) of the right type (Raster layer) in our model, so the “Fill
sinks” algorithm will automatically use it as the default input file. So, just press “OK”.
The algorithm will show up in the right panel, in white, showing a connection line with the DEM
variable. If you click on the “+” sign above the algorithm, you will see a list of all possible input
variables of the algorithm; the “+” sign below will show a list of all possible output files.
Let’s add the “Catchment area (flow tracing)” algorithm.
Choose the filled DEM as input, and leave all the other defaults. The algorithm will show up in the
left panel, showing a connection line with the “Fill sinks” algorithm, showing that the output of the
“Fill sinks” is the input for “Catchment area”.
Easy, isn’t it?
Ok, go on adding the other steps of the procedure, i.e. “Channel network”, “Watersheds basins” and
“Vectorising grid classes”. Just remember to:
add another input variable to the model (the flow accumulation threshold, needed by the
“Channel network” algorithm: call it “Threshold” and assign it the default value of 400,000);
save the result of the last algorithm by providing an output file name (in my example, I named it
“Basins”);
pay attention in selecting the right input files for each algorithm.
Once you have finished, enter a Model name (in my example, “DEM_to_Basins”) and a Group name
(“My_Models”), and save it in the proposed default QGIS location. Test it by clicking on the “Run
Model” icon.
You can try to arrange the different boxes in order to improve the clearness and the readability of
the model. My figure below is not a great example…
Our model will now show in the Processing Toolbox, and we can run it by simply double-clicking.