Deriving River Network & Catchments from a DEM using QGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to another QGIS tutorial now in this tutorial we are going to show you how to derive a river network and the corresponding catchment area to that river network using a DM with the help of QGIS now initially you can see that we have a DM like this and at the end of this exercise you will learn how to derive the river network which looks like this and the corresponding catchment area which looks like this so after you do the derivation you will be able to find out how much is the contributing drainage area to this particular outlet as you can see over here and you will be able to generate the river Network and the catchment area in the form of shapefiles so without further ado let's go ahead and get started with the tutorial alright so to get started first we will try to browse to the folder where we have saved our de m and from there first let's try to drag it and drop it into our working space over here and before doing anything I just want to first have a look at the current coordinate system the current projection of this DM you can just right click over here and go to properties first and under information you can see over here the CRS is WGS 1984 geographic coordinate system now just keep in mind that it's absolutely essential that you first reproject your DM into a projected coordinate system before you proceed with the tutorial and also if you would like to have a quick look at the current location of your DM with respect to another base map what you can do is you can go to web quick map services and go to OSF and osm standard which will open up the standard open street map for you now in case if you do not find this under the web option the quick map service is actually an additional plugin which you can install by going to plugins and then go to manage and install plugins and from there you can simply search for quick map services and first get it installed and after you install that you can actually you will be able to simply add this OpenStreetMap to your working space as a base map so relative to the OpenStreetMap you can see that my DM is actually somewhere in the middle of Malaysia and now what I'm going to do is I'm going to actually transfer the existing coordinate system of this DM from being a geographic coordinate system to a projected coordinate system now to do that you can simply go to Ross and goto projections and from here we have one option called reproject yeah so the input layer is going to be my DM first and from here the target CR is the target coordinate reference system you can actually set it to be your target coordinate reference system now in your case if your study area is different in your own respective cases your study area might be different so just first find out what is the appropriate coordinate reference system for your case for my case I'm actually going to select this G DM 2000 Pahang grid which is actually one of the code projected coordinate systems used for Malaysia so first I'm going to run yeah and then I can close this and we have the reprojected DM now I can even go to this current CRS option over here and from here change the coordinate reference system of the current data frame to be a Pahang to be G DM 2000 like this and over here you can even get sort of a graphical weave of where you have placed most of your data and also for which geographical extents each coordinate system is actually going to be appropriate for so I'm going to select G DM 2000 again and select apply and ok so now both my data frame and the DM are in projected coordinate system now I can actually go ahead and get rid of this DM which we will not need anymore and I'm going to maybe rename this as reprojected DM all right now the first thing that I'm going to do is I'm going to fill the sinks of this DM now in the original DM there might be some sort of distortions with the presence of sinks so what we're going to do is we're actually going to sort of correct the DM by filling those things using one of the tools which comes under saga now the tools the name of the tool is filled so you can actually simply just search fill over here again if you do not have this processing toolbox you can just go to a processing over here and activate the toolbox from here and then it'll appear and from here under ssagaji is you can select this second options fill sinks wrong and live and the input for that process is going to be my reprojected DM as can see over here and these are the outputs which will be generated by this tool now for the time being I'm going to unpick this watershed basins and also the flow directions because I'm going to actually take the things step by step so let's only focus about this filthy impart for the time being and over here either you can actually produce this as a temporary file you or you can just provide the specific path to which the actual file will be saved otherwise now for my case I'm actually just going to open I open this up and save the file this one I'm just going to name it as fill all right after that we can run the tool and it might take a couple of seconds for it to actually run the algorithm all right once the process is completed you can close this and now we you can see that we have a filled DM now if you look at these elevation values the elevation of the previous diem was ranging from negative five up to twenty one sixty five but you can see that some sort of a correction has been now applied by which the lowest elevation now is actually one meters above the mean sea level and the highest elevation is 2101 as opposed to 2165 which is what it was before all right so we won't actually be needing this reprojected diem anymore so I'm just going to deactivate that because from here onwards we will be only working with the field diem because now we consider this diem to be sort of the corrected diem now since our objectives are to generate the stream network the river network as well as the catchment boundary now let's focus first on creating the stream network now if you would like to sort of get an idea about the existing stream network which can be derived based on this DM what you can do is first you can go to this processing - tool box and type stralla order now if you're not so sure about what stralla order means it's actually something like this as you can see just imagine that this to be some sort of a river network and you can see the blue color River lines are sort of the starting River lines from the mountaintops and if you assume those to be the smaller streams you can see that at locations where - small streams meets each other it leads to the generation of a stream which has a higher order as you can see over here when two streams of order one meter creates another stream of an order which is one unit higher than the previous order so as you can see when one and one meets it actually creates it creates a new stream with the order number two and the same goes for stream with the order number two as well as you can see over here when two streams of order number two meet it leads to the generation of or creation of a stream of order number three and one more thing to note is that if a stream with a lower number meets stream with a higher order there won't be a change in the streams order it actually retains the higher order of the streams so this trial order tool which you can find on the terrain analysis toolbox of saga can actually do the same thing for you if you can provide the DM as one of the inputs so that's what we are going to do now we'll open the tool first and as the elevation roster we are going to provide the field DM and the stralla order I'm going to save this one too to a file called stralla order and we can run the tool all right now after you after that you can go ahead and close this and even the field DM for the time being I'm just going to deactivate so what you see over here is actually a very dense network of streams with different strata orders now if you look at the legend over here I mean the the distribution of numbers you can see that the lowest number is 1 and the highest number is 9 so the stralla order varies from 1 to 9 which means trial order 9 can be generally regarded as streams which are actually larger in size or larger in in terms of the flow accumulations the streams with stralla or 1 can be regarded as minus stream so very small streams now we can actually do a better visualization of the shallower of the streams than this we can go to properties of the layer the straw or a layer and we can go to the symbology tab and from here select single band pseudo color as the render type and now from here you can see that we have two classes now what I'm going to do is I will try to select a color ramp which will be a sort of more reflective of the color of a Rio which is blue and instead of using the continuous mode I'm going to split these two equal intervals like this and from here you can see by default it gets split it into five classes we're by the lowest Strahl orders gets categorized in this light sort of blue shade and the streams with highest all order it's categorized in this dark blue now since we have the relatives ranging from one to nine I'm going to split the number of classes also also to be nine now this is not necessary but I think it's just a quick and easy way of sort of distributing the colors evenly starting from one to nine and after that if you press apply now you can start seeing very clearly which are the streams of of higher order which can sort of be attributed to be large rivers in a physical sense also what you can do is you can just maybe zoom into one of those larger rivers or one of those rivers with the highest rolla order and if you deactivate this trial order layer you can see that it sort of reflects this it's real River over here this one major river over here called River July you can see that it sort of reflects that River quite accurately along with other tributaries as well you can see that as a whole this includes an entire network of rivers ranging from various - streams all the way up to largest larger rivers as well now if you want to sort of isolate only the larger rivers something that you can do is you can go to Rasta calculator and you can assign the stralla orders to be larger than a certain value so I'm going to first specify the values of Strahl order which means the values starting from one to nine I would like to create a different roster a different strong order roster which might which will have values greater than or equal to let's say five now where is this five come from I'm actually looking at the color distribution over here or the straw or the distribution of over here and I'm just picking something let's say from the middle even right now I have no clue how this is going to look like so what we can do is first define an output layer and I will name this as stralla order five just for the time being and I can press ok to create the river network which has a straw order of greater than or equal to five now you can see that it's sort of isolates the major rivers isn't it if you would like to still sort of just get rid of those this minor branches what you can do is you can create another raster and this time you can space if I the straw Lord is to be a bit higher so that it'll sort of get rid of those - rather order those minor branches with the lowest Rolla or this let's say this time we will set the value to be about six instead of five and I'm going to name this file as stralla or the six yeah now we can export the file and now you can see that compared to the previous one in this new file which has a straw out of six or greater than six you can see that it actually sort of isolates only the major rivers and at the same time you can see that now the values are defined just by two numbers it's either 0 or 1 so 1 refers to the streams or the cells because just keep in mind that this is still still a raster you can see you can see the pixels over here so what I can do is I can actually select I can try to put these values which are represented by 0 to be transparent you can go to the properties and select single band pseudo color over here sorry now I think we can go to select unique unique values from here and then you can classify and as you can see we have two classes classes with relative number 0 and valuev number 1 so for 1 which is actually the real stream Network I'm going to define the colors by my color which is sort of a shade of a blue something like this and for 0 for the timing I'm going to leave this color as it is and if I apply you can see that now the river network actually changes into a color which is represented by blue over here and now I can go to transparency over here and what I can do is apart from this default no data value I can also actually add at a certain no data value if now if I put one over here actually this whole river network will be become transparent so we don't want to do that we want to make the outside areas transparent so that's why I'm going to put the value of 0 over here and if I apply now and click OK and if I deactivate this trial order you can now see that we actually managed to sort of derive the stream network in the form of raster still and if you now soo-min you can see that it more or less follow the main river but in these lowlands you can see that the DM is actually less accurate somehow it still follows the major river but when you go to this highlands because the elevation variation of the DM in this highlands are quite obvious so that the derivation of the stream network is also quite accurate as you can see morally follows exactly almost precisely the the real river line in these cases as you can see over here but not so much in this lowlands but that's alright for the time being I'm just going to accept this method of course if you would like to have a much accurate delineation you might have to work with a DM which is which has a higher accuracy like either ifs are or or later DM this is the level of accuracy that SRT mDM's can provide so so I'm still going to actually proceed with this now let's see how we can export this into sort of a polyline now even to do that you can still use one of the tools of saga which you can get by simply searching channel over here and you can see the channel network and drainage basins alright from here we have to provide a couple of things to start with we can provide the elevation now the elevation is still going to be my field DM and over here has a threshold specify the same threshold that we provided over here for the stralla order so that's going to be six as outputs it actually generates a couple of things but we do not want to have the flow direction nor the flow connectivity or drainage basins but we do want to have the channel so I'm just going to leave that and deactivate the other things over here as well yeah it's supposed to be this one and over here I'm going to specify the file name the file name to be river network and as you can see the file type is already a shape file dot SHP file alright now let's go ahead and run this alright once the process is completed we can close this and now if I turn off all the layers and over here and even I can switch off these channels layer and as you can see we're now inside my fault there's a shape file called ribbon Network I'm just going to drag it and drop it over here and now this is a shape file so we can do all the stylings that we would normally do with shape files such as changing the color of the line and also maybe increasing the thickness yeah I'm just going to sit yeah about 0.46 should be fine yeah now you can see that this is more or less the the river network so this is a file which you can quite easily pass to somebody else now before we finalize let go ahead and derive one of the watersheds corresponding to this network of rivers as well now from here you can identify clearly that this now this July River is actually one of the biggest rivers so I'm just going to select the corresponding drainage area or the watershed which contributes to a particular location along this river I do have one area of interest for example let's say I would like to know you can see over here there's one bridge crossing now I would like to know what is the contributing drainage area to the point of the river at this particular bridge crossing and based on that I would like to demarcate the the corresponding catchment as well so for the time being let's keep in mind that this is how this is the sort of outlet that we are going to select for derivation of the catchment so let's go to the part of deriving the particular catchment for a specific outlet location now in order to do that first we need to know the coordinates of our outlet location however you might be wondering right now this is the real Rio network which the DM identifies to be the river but but this open street layers measures the part of the river in reality so this is something that we have to sort of accept and move on because this inaccuracies due to the due to the resolution of the DM so what we can do is ideally I would like to have this River line sort of exactly on top of this River July over here but since we do not have that what I'm going to do is I'm going to create one point on top at the place at the crossing of this river line and and the and the road over here now just keep in mind that if you create your point over here you won't be able to derive the watershed because you actually have to create your pour point or the or the outlet location on top of the River cell now if I again turn on this trolley order over here you can see that the closest cell correspond with corresponds to this bridge location is actually over here so I'm going to create one point so in order to create one point you can go to layer and create a new shapefile layer and I'm going to name this one as outlet well the objective of creating this new point is sort of to extract the XY coordinates coordinate reference system you can select gdm 2000 from here and click OK now you see that we have one new shapefile called outlet so now I can right-click on that shapefile and go to and toggle the editing mode and then we can go to this add point feature and I can simply click over this cell and add a point and I'm going to name put the ideas let's say one yeah that's about it so now I can just click over here and save my edits and now you can see that we have a new shapefile with a point at this particular location so I'm going to let's say have a look at the attributes table now ideally I would like to actually extract the X&Y coordinates into two different columns so you can simply do that by going to the field calculator over here and I'm going to create create a new field by the name x coordinate let's say we shorten the name to be X chord and over here you can go to geometry and you can find this X this dollar sign X as you can see over here it returns the x coordinate of the of the current feature so I'm going to double click on this one well the output field type maybe it's better to change it to decimal number so that it'll contain a couple of decimal points as well well 3 in this case all right now click OK now you can see that it actually extracted the x coordinate for us and similarly we can extract the y coordinate as well you can go to the field calculator and put the field name as Y chord and go to geometry dollar sign Y and click OK all right now you can see that we have the x coordinate and the y coordinate and we can click on this toggle editing mode again to save our changes now to actually derive the contributing drainage area or in this case we also can call that as the catchment area we can go to one of the tools called upslope area which also comes under the Tanner terrain and this is a toolbox of saga so we can double-click on this and leave the target area since it's an optional input and the target x-coordinate and the y-coordinate I'm going to open this outlet again the attributes table of the outlet and what I'm going to do is I'm going to simply copy this cell content and paste it over here similarly I can copy the y-coordinate and paste it over here as well just control V over here and the elevation again we have to select the field diem and the rest of the items we can leave it as default and the upslope area I can here for the time being I'm actually just going to let it save to a temporary file and we can run this yeah now if you close you can see that it actually managed to delineate the contributing catchment like this if I move the river Network on top of this since we have the river network shapefile you can see that this particular catchment is basically created by this river network over here so if you're unfamiliar with the concept of a catchment or a watershed so let's say just imagine that the certain amount of rainfall that's happening over here all the rain that's actually falling on on the white area will be flowing into this particular region and all the rain that's actually flowing outside of this white area will be flowing to other other particular catchments as well so that's how that's how basically the the concept of the catchment works so it's basically catching all the all the rainfall that falls on this white color area basically drains within this particular area into this outlet over here which we specified so I guess we have almost completed most of the things that we need to do now just keep in mind that this is still a raster so we can convert this rusty into a polygon as well so the way to do that would be you can go to raster and conversion from here you can select raster to vector and my input layer now is going to be the upslope area yeah the rest we can leave as it is and just that we can save this since this is going to be a permanent file we can save this to be dot SHP a shapefile and the file name is going to be catchment area or the catchment boundary alright now we can run yeah once you run this I can now go and go ahead and deactivate all these other unnecessary parts and maybe move this outlet to be the top layer so that it's kind of clear for you guys where the outlet exactly is and now if I open this well gets let's get rid of this one and so as you can see over here when I navigate to the place where I save the file you can see that we have a new shapefile called catchment boundary as well I can simply drag it and drop it over here and if I go to the attributes table of that catchment boundary you see that we have two attributes we have one by add en value of 100 and the other one which is sort of the outside area so what I can do is I can simply turn on the editing mode and I can select this outside area and simply hit delete so that that will sort of delete those unwanted parts of our catchment of our shapefile and then I can save the edits so that sort of isolates all the relevant areas to us I'm going to move this River Network again on top of this now to make this visualization a bit more clear what I can do is I can click this River network by the corresponding boundary of my catchment area now I can do that simply by typing click over here and I can go to polygon clipping option under the ssagaji stores as well and I would like to clip my River network by the boundary of my catchment and I can simply run this alright now if I turn on this River Network and yeah I forgot to specify a name for this you can see that now it has actually being clipped to the boundary of my watershed and let's do a couple of changes first let maybe let's export this into a proper shapefile ESRI shape file and this coordinate reference system is correct and I'm going to save it at the same location yeah this one I'm going to name it as maybe River Network clipped dot SHP the rest we can leave them as it is and I will get rid of this previous layer yeah and maybe I can do a bit of styling change the color again to be blue and increase the size to be 0.46 now as you can see we managed to derive the catchment area as well as the the river network which corresponds to this particular outlet now if you would like to maybe get rid of the fill color you can do that as well you can say outline and maybe only increase the thickness of the outline so I guess that's about it for this tutorial if you do have any questions regarding the process that we followed for this tutorial do comment them down below and now you can see that we can actually pass these layers on to someone else as separate shapefile layers for the catchment which corresponds to the catchment area boundary as well as the ribbon it work within our derived catchment as well so I guess this could come quite handy especially in studies related to hydrology so before we wrap up the tutorial I would like to again remind you guys if you haven't subscribed to our channel please do so if you do find these tutorials quite valuable then don't forget to subscribe as well and I'll see you guys soon in the next tutorial
Info
Channel: GeoDelta Labs
Views: 47,620
Rating: 4.9755101 out of 5
Keywords: qgis, catchment, demarcation, delineation, strahler, order, catchment delineation, SAGA, upslope area, ArcGIS, hydrology, hydraulic, pour point, outlet, openstreetmaps
Id: xwiHQlmEEjw
Channel Id: undefined
Length: 25min 53sec (1553 seconds)
Published: Thu Jun 25 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.