 Hello, this is Hans van der Kwas senior lecturer at IHG Delft Institute for Water Education. In previous videos I've demonstrated how to delineate a catchment and its streams, assuming that you only have a digital elevation model. For more data-rich areas or areas where OpenStreakMap has a good coverage, good hydrological coverage, you can also burn in the river network to improve the results. That's what I'm going to demonstrate in this video. We're going to use the r.carve algorithm from GRAS, therefore it's important that you start QGIS with GRAS. Let's first mosaic the SRTM tiles that we've downloaded from the USGS website or with the SRTM download plugin. So with this tool we're going to build a virtual raster because we don't need the full geotiff, we just need a virtual file because we're only using it temporarily. We're going to save it here to dm-mosaic. So this step is similar to the normal delineation method where we don't have streams. And let's remove the data that we don't need anymore. The next step is to subset the dm and to reproject and we're going to do that in one step by using export, save as and here we give the output file name. Let's call it dm-reprojected subset, it's a geotiff and we change the projection here. I use it from the recently used list but you can also select it based on the upsg code and I calculate the boundaries from the layer bounding box that I loaded and I set the spatial resolution to 30 meters and click OK. And there it is, we remove the mosaic and we're going to set the on-the-fly reprojection of the project to the one of this layer and we do that by clicking right, set CRS from the layer to the project and we zoom to the layer. Now we're going to have a look if there's data on rivers available on OpenStreetMap. We use the quick map services plugin and use the OSM standard and everything that we see on this map can be downloaded later with the quick OSM plugin and we see that the rural river is also defined here on the map, which means it's downloadable for us and we can use that to burn that into the dm. So now we go to vector, quick OSM if you don't have it, install the quick OSM plugin, we choose the overpass API and we can choose here's a key waterway and it's value river. There's another video where I explain more how to use this and we will use a layer extent and we use there the dm reprojected subset. Make sure you only choose the lines because we want the rivers as lines, not as points or polygons, doesn't make much sense and then we run the query and when we close dialogue we can see that all these rivers from OpenStreetMap have loaded. Now let's inspect the attribute table where it loads and we see a column with name and now the trick is to use that name column to filter out the mainstream of the roar. So I go to the select by expression dialogue and say name equals and if I push there the all unique values button it gives me all the options and I see there already roar which is the Dutch spelling and then I click select features and those features are selected and also use RUR which is the German spelling of the roar river and I click then on the drop down and you can say add to current selection and now those are also selected those features. Close the dialogue and I can at the bottom of the attribute table say show selected features, there I see the 26 river segments with those names roar and RUR. Next step is to save those selected features because we only want the mainstream of the roar and to use that for burning in the river network and I save it as roar underscore OSM, change the projection to the one of this project and now the selected segments are saved as roar underscore OSM or we can remove our temporary waterway river layer. Let's style this a little bit using a blue line for a hydrology and we'll remove the DEM in the background and let's see if this resembles then the roar from open street map and there we can see it and if we pan to the outlet then we can also see that it follows the mainstream of the roar into the mouse river or the mouse in touch. Now we need to do a few corrections of this open street map layer, it needs to be continuous and it needs to be one line so the best thing to do is to switch off the DEM and go follow the river and here we see already that there's two parts of it. I go to editing mode and I'm gonna check on the open street map background which one is which and I'm going to remove one of those that is less relevant. I'm gonna remove in this case that one I used the selection tool and when I click the delete button it's deleted and I do that for several other points too. Here we see another problem part of the segment is missing so we use the node tool to select the nodes and we see that we can connect those nodes but first we need to switch on the snapping toolbar we click right on the toolbars and switch on the snapping toolbar click the magnet and now we can select with the node tool this node and the red line makes clear to which point we drag it and the magnet will make sure that it connects to the node where we want to go. There it is and then we can save the edits and do a final check. Now let's toggle off the editing mode and all these different segments are separate features and we need to dissolve this first although it's a wise thing to do. So we use the dissolve function from the vector geo processing menu and we dissolve all the features so the roar river will be just one feature one line that we can use later. Let's call it roar dissolved and we run the algorithm it's pretty fast. Let's first uncheck this let's check the attribute table. We see that it's one feature now. Let's copy the style from roar OSM to roar dissolve to make it more visible. Now it's time to burn this river in the DEM so we start the processing toolbox and under grass we find r.carve. When we hover we see a little explanation and it's exactly what we need so we're going to use this dialogue and make sure you choose the DEM and you use the roar dissolved layer and you can set here the stream width in meters. Let's use 2 pixels so that's 60 meters and we use a depth here of 2 meters additional. So it will subtract 1 meter and we will have 2 extra. You have to play a bit with these numbers to get the optimal result. In this case this setting gives nice results and we only need the modified elevation. I'm going to save it as a TIFF and we call it DEM burned and then we can click run. Give some warning and errors but that's not so important for the result. So let's use the styling panel to style this DEM. Go to single band pseudo color because it's a continuous raster layer and we choose the CPT city for some presets on elevation, topography, elevation. There it is because we're very zoomed in. I'm going to change this min max settings to the current canvas so it stretches those colors because what I want to demonstrate is the effect of the burning on the elevation values. We see already the river in the DEM values and I'm going to copy this same legend here, the same style to the original raster. I'm also going to uncheck the raw dissolved and here you see the effect. You see that the river is now lower than in the original DEM. Let's also check what happened at the outlet. We use updated canvas so every time we update the extent it will update the stretching and there we also see that the river is visible. The next step is to use the fill algorithm which makes sure that also the other pixels will be draining towards the river that we have burned in. So we use the Wang and Liu fill sinks algorithm from the processing toolbox. Let them filled and save it and we only need the filled DEM as an output so we uncheck the other boxes then we run the algorithm. Click close when it's done. Let's copy the style so we can see the result soon to the layer and the next step is to calculate the strahler orders. We can check how the streams are developed now. Save the strahler run the algorithm. Click close when it's done. Let's style this layer. It's a palleted unique values. Click classify and use a ramp of blues so the more blue for the higher orders which are closer to the stream and let's use the raster calculator to determine which strahler order responds with the stream and we choose larger or equal to 8. This calibration is explained in another video because normally you compare it with the OpenStreetMap backdrop and then choose the right level. Let's remove the underlying strahler layer and visualize this one. Let's style it using palleted unique values again because it's a Boolean so it only has 0 and 1 as we can see. We remove the zeros we make the ones blue and we remove the underlying layer so we can compare it with the OpenStreetMap. We zoom in. We can see that now this strahler order river follows the river on the OpenStreetMap which makes sense because we use that river to burn in the river network. It's not everywhere the case but it follows it mostly but the FilSync algorithm of course has changed it a bit. So the next step is to delineate the catchment by using the outflow point and we use the upslope function from the processing toolbox from Saga and we're going to use the coordinate capture tool. If you don't see that you can activate it. We start capture and we get the outlet. We can get it here. Make sure you're within pixel and then we copy the coordinates and make sure that for elevation you choose the DEM filled and we leave for now the other things as default and we save it to raw catchment burn Saga. As that then we run it. We close the dialogue and we see the catchment of that outlet. The next step is to convert this raster file to a vector by polygonizing it. Save it as a shapefile and call it raw catchment burn Saga because later I'm going to compare it with the other results from the other videos. There it is the vector layer. It has the catchment plus the boundary and we need to now select everything except the inner part of the catchment. That is the catchment so with this button we can invert the selection toggle to editing and click the delete button and when I toggle off and save it I now have the catchment polygon. I remove the raster and I can style the catchment boundary using a simple outline. There it is. So for comparison I've now added in black the results from Saga without burning, in green with grass and in blue the result of this exercise where we burned the rivers from OSM OpenStreetMap into the DEM. We see that our stream in blue nicely follows the OpenStreetMap and that much coarser is the one in black. The grass one is a bit finer but they also both deviate quite a bit from the original stream. But if you don't have any OpenStreetMap data then you have to model this using stream delineation as explained in previous videos. What's the effect on the catchment boundary? We see that the catchment in other cases end up in a different place than the real outlet and we see that there are some changes on the borders. So you've learned how to use additional information if that's available, a river layer to improve the results of the catchment delineation.