loader image
Ir para o conteúdo principal
Requisitos de conclusão

4. Using junctions

To more precisely derive all subcatchments, we can try to find the junctions where tributaries join. Where tributaries join, the Strahler order downstream is different than upstream. Therefore we can use the Strahler orders in combination with the downstream tool to find the junctions. The downstream tool gets the value of the neighbouring downstream cell. Let's apply this.

1.In the Processing Toolbox, double click the downstream tool.

2. In the dialog, choose flowdirection as Flow direction layer, channelsstrahler as Raster layer and name the result downstream.map.

3. Click Run and click Close after processing.

4. In the Layers panel, copy the style from the channelsstrahler layer to the downstream layer.

5. Zoom in on junctions and compare the two layer.

Now we want to have only the cells of the junctions. Therefore we need to use a comparison operator.

6. In the Processing Toolbox, double click on the comparison operators tool.

7. In the dialog, use channelsstrahler as the first Input raster, != as Comparison operator and downstream as the second Input raster. Save the Output Boolean raster as junctions.map.

So basically, we've formulated an expression that IF the cell value of the channelsstrahler layer is not equal to the corresponding cell value of the downstream layer, the result raster should have boolean 1 (True), else it should have boolean 0 (False). In that way all junctions will have boolean 1.

8. Click Run and click Close after processing.

9. Style the junctions layer with the Paletted/Unique values renderer and check the result.

Now the problem is that all junctions have the same value. In order to use them in the subcatchment tool, they need to have a unique ID with the nominal data type. Let's fix that.

10. In the Processing Toolbox, double click on the uniqueid tool.

11. In the dialog, choose junctions as Input boolean layer and save the Output unique id raster to uniqueid.map.

12. Click Run and click Close after processing.

The output is unfortunately in the scalar data type and needs to be converted to the nominal data type before we can use it to derive the subcatchments.

13. In the Processing Toolbox, double click on the convert layer data type tool.

14. In the dialog, choose the uniqueid layer as Input raster layer, Nominal as Output data type and save the Output raster layer as outlet_junctions.map.

15. Click Run and click Close after processing.

16. Style the result with the Paletted/Unique values renderer and check the result.

It is no problem that the non-junction river pixels have value zero, because the subcatchment tool will only consider non zero cells as outlets.

17. Go to the subcatchment tool and use the outlet_junctions layer as Outlet layer. Save the result as subcatchment_junctions.map.

18. Click Run and click Close after processing.

19. Style the result with the Paletted/Unique values renderer.

The result should look like this: