QGISHydro Webinar 4: Stream & Catchment Delineation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay welcome everybody at this 4th cutest hydro webinar and really glad that you are here and found the subscription button apparently and so yeah we had about 110 people subscribed and I think some more will will enter we're currently with 42 people in the meeting please keep your mics get your camera off until we are at the Geo beers if you have any question please put it in the chat also use the chat to introduce yourself your name your country or organization anything else you want to share and feel free to ask the questions I'm going to switch to to the presentation so hope you can see my screen we're in the fourth you just hide your webinar and yeah we really hope that you are surviving in these kovat crisis times and we really hope that you find these things useful and hope that you you enjoy learning new things or extend your knowledge on on Chilly's so I'm a hunter from the crust and I'm a physical geographer background I studied physical geography at the Utrecht University there I also learned a lot about GIS and did my PhD there on the integration of satellite imagery in Seoul moisture modeling using data assimilation techniques I started using Python there and the PC rest of Python framework one of the first testers of it it's a great tool for metals Abraha that we covered last time it's now integrated as a Python library and hopefully in the future we'll get all those tools and linkages then I was a researcher at the Flemish Institute for technological research in Flanders northern part of Belgium where I was working for the environmental modeling unit and we were very happy to to switch to open source there are a lot and we even had a nice working group on Python and shared the knowledge with each other and I was working there on water quality models land-use change models and in the unit we also works on air quality which seems to be improved in the last weeks for some reasons since 2012 I work at IIT Delft Institute for water education it's one of the the largest educational institutes on water in the worlds where we have students from all over the world doing masters and I'm a lecturer there an ecological modeling but most of the times I'm working on GIS and remote sensing and then Python and I'm also a board member of the Dark Ages user group this was established at the end of last year and it's great to have now a community in the Netherlands and yeah we'll also keep them posted to your life to do some things online also these days my main interests are open source GIS and modeling and like Kurt I'm QG certified instructor which means that for every course that you follow with me you can get the hugest official cutest certification which donates per certificate 20 euro to QGIS so they can improve the software and yeah you have an official certificate and our organization likes it to support of course rqg so I'm very happy that IG Delft likes to support GG's now we also have a big group on remote sensing for hydrology also one of my interests for water accounting and what of collectivity very important tools a lot of open data that we process to get water balance parameters in my project work I work a lot on spatial data infrastructures or SDI and I'm advocating a lot for open data which will be the topic of next webinar because those are integrates nicely with which QGIS and we have some very nice examples to show you and yeah as I say every week you always think that we are a bunch of nerds behind the desk well we are in the corona times but normally we also like fieldwork and it's very important to know how data collection goes on in the field and how to process that data and understand the data that comes from the field so these things go together quite nicely if you want to contact me then you can send me an email or connect to me on LinkedIn look at Twitter or an Instagram and watch the videos on my youtube channel they're all about QGIS etc so get the word to worker minke hi everyone great to be here today I run bird's-eye view which is my own consulting business in Albuquerque New Mexico USA I also have teamed up with several Corps cutest developers and trainers and we call ourselves the Q cooperative and our goal is to provide Q 2 support services so if people need custom plugins or new features in q2 district ug server you can contact us there I also run a program called community health maps which I'll talk a little about at the end of the webinar after Hans is done and I do a whole mix of things I do a little spatial analysis some cartography and some teaching so I wear lots of hats as they say and I've written six different books on QGIS at this point which is hard to believe that the most recent to discover QGIS 3x which is a big 400 page workbook which is a really thorough treatment of Q gist with 32 lab exercises in it and then this book which is the topic of this webinar q just for hydrological applications both of those with locate press and I'm also as Hans mentioned acute acute a certified instructor and generally a strong advocate for open source geospatial in general i'ma help revive the QGIS us user group a couple years ago so I'm a member of that so if there's Americans in here that want to join that you can hit me up and get on the mailing list if you're interested I'm also a NAS Geoje artery member and my contact informations at the bottom I have an email at bird's eye view and an email at the Q cooperative annum on LinkedIn and geo Menke on Twitter so looking forward to the webinar and I'll be helping on chat if you have questions as we go through this I'll try to keep up with all the questions as they appear great thanks Kurt so this is a series of seven free webinars and they follow each chapter of the book uses for hydrological applications published it located press and you can find a link to the book page at the publisher bottom of the screen it's easy if you want to do these webinars to have the book next to you and to follow all the steps or to exercise after the webinar the first one it was about preparing data from hardcopy Maps then we went into importing tabular data into pages and the third one the last one was about spatial analysis with map algebra and today we're going to dive into stream and catchment delineation that's like the masterpiece for hydrologists and I'm eager to show you how how that works next time we're going to talk about open data is already set and then in the sixth webinar we are going to calculate the percentage of land cover per sub catchment and some other great tools of Kita's well I will be demonstrated and then we will have the final webinar on that design where Kurt will show us all the tips and tricks of styling power of qgs so I'm also really looking forward to that one and I'm very happy to have you all here so from time to time I have to admit people in the waiting room from the waiting room in that's the the only disadvantage of this set up but just have to deal with that I just fear to open it up for all so for today's topics treatment catchment delineation I'll just talk you bit through the workflow the full lecture is also online in one of my videos so I'm not going to give a lecture on the theory you can you can watch that of course I'm gonna mention the use of things during the practice so it all starts with downloading DM tiles you have to mosaic them together which means merging to reproject the tiles because you cannot not do DM analysis with the geographic coordinate system with latitude longitude coordinates then we're going to subset the DM because all these tiles might not cover only your area but much more and these algorithms that we use use quite a lot of calculation power for laptops and no computers then sometimes you need to interpolate voids these are missing data in your VM sometimes happen in our case it doesn't but I'll show you where to find that and then we're gonna fill the things these are depressions in your DM artifacts that we need to get rid of for hydrological analysis because all the water in a catchment needs to flow out to the outlet then we're gonna burn in the stream network if we have a stream network in our case we're not going to do that but I have a video about that that just ensures that your water will follow the existing stream network when you're going to delineate the catchment calculate the flow direction and then we derived the streams they find outlet on those derive strange because we're making a model and then derive the catchment and then whatever you need to do with your delineated streams and catchment convert it to the data set for your hydrological model or make a nice map that so we're gonna do in the in the seventh webinar so that's the workflow we're going to follow today and yeah a set a final map will be made in the second webinar but today we'll also show a few of those things based a bit on the time and here on the right side it's also what I'm gonna demonstrate is a nice tool that we developed with Lutra consulting during the last HEC fest in my ahkahuna it's a tool to convert a flow direction that we get out of the saga a tool into a mesh and use the mesh styling options to get these nice arrows to show the flow of water over your terrain that's really nice okay let's go to the practice so I'm gonna switch to curious so we're here in GG's and it all starts with downloading your vm tiles and one way of doing that but my guys didn't always work but I'll still mention it I have a video where you see it working that is the SRTM downloader plug-in which simply download all the srtm tiles in your map canvas so the area that you're zoomed in it very useful and it uses the the credentials that you also have at the earthexplorer websites so I'm going to show the other method in earth Explorer so birth Explorer is from USGS and that's a place to find a lot of useful data and there are different ways of using the tool I made a little video about that on how to find a certain area the simplest way is just to zoom in on your area this is very nice agricultural area by the way to hear the nice satellite image and you can say use map and it simply uses the boundary of your canvas and you can use that then as the search area that's one way another way is to upload a KML or a shapefile and if you want to use a shapefile then you can upload the same bounding box and that will then give you the area as shape file as you know it's not just one file therefore we also promote a lot of geo package but you can't upload here a geo package but so you need to zip your shapefile before you can upload it to this side then you go to datasets and for DMS you just use your digital elevation you go to SRTM and you check the box SRTM one arcsecond global for the 30-meter data set that has been available for the whole world since 2014 but the data is being collected around year 2000 with spatial can also check those other options when you download data is always very important to look at the metadata so if you click the information button you get a lot of information about the data ok I prepared this of course we're not going to download here a lot of styles so we'll take too much time and we need our time I also created a favorite already I've demonstrated in last webinar how to do that so this is from the book chapter and we see here the four tiles to go to layer properties and I get some information about these tiles see the projection it's the geographic projection let's do longitude and give minimum a maximum value of the layer and that's available for all these tiles and I'm simply going to drag them into the map canvas and there we are so that's another way of downloading it you can use the srtm downloaded plug-in then it will download the tiles for this canvas it's just a different file format but that doesn't change the workflow it's the AG HGT files and yes this one will add the from Earth Explorer you get the Geo Tiff's so it's good to see where we are so the quick map services plug-in always is nice to use to see on the street map and we're doing this classic at least for my students classic catchment of the war it's very nice for education because it has some nice issues that we're going to talk about these spots here and then the first step in our workflow is to mosaic all these tiles so we do that under the restaurant menu and there are different ways of doing it but here the most efficient way if you have tiles of big files is used to build virtual roster tool because then we don't really create a big beautiful ready but we use a virtual layer I have to select all these layers except the OpenStreetMap and click OK you don't change this because they're all the same we have to uncheck this box that's very important we use this for remote sensing images put each layer into a band in this case we want it in the space to be merged so very important then the only thing we need to do here is to save the file and go to the right chapter here chapter 4 this workflow is also very sensitive to file names and folder names so make sure you use underscores I know space no strange character is very important so I'm going to save this as the mosaic then I run the tool and that's pretty fast because it's virtually mosaics it and there it is and I always like to keep the layers panel clean so I'm gonna remove those layers so we can't choose the wrong ones and the next step that we need to do is to well there are two things that we need we need to reproject to a metric projection because the zet units of the DM are in meters well the geographic coordinate system is in latitude longitude in degrees and the other thing we need to do is to clip it to our study area which is much smaller I can show the the bounding box yeah that's the bounding box and we're gonna work in UTM zone 32 north on wgs84 projection you can always see those previews and choose the right one for your task this is a this is a trans boundary DM so therefore I don't use a national grid but I use UTM DM is a combination is a term for digital elevation model which can be a digital terrain model or a digital surface model and a digital terrain model is just elevations of the terrain in a digital surface model we also have two objects on the terrain so when you see this very high-resolution elevation that's a digital surface model often but in our case we we have a rest of meters and we are interested in the general flow of water and therefore we can consider this more as a DTM where over the 30 meter pixels the elevation is averaged out so there are different ways of flipping the the raster and we projecting I'm gonna merge this in one easy step so that's the different the difference with the instructions in the book so what you can do is you go to the DM layer you click right and use the export function and you save s and there I can give it a following and there I'm gonna call this DM clip and we project it because I'm gonna do it in one step you see that I use intuitive file name so it's called can fall back on on the steps that's important because enjoy guys you don't have undue generally only for things that work in memory but each time you save something so if you give it a good name then you can find it back where you went wrong to trace back here I'm going to use the coordinate reference system of the project which is the same as the bounding box if you hover your mouse over the layers not dwell in this window you can see the projection I'm going to calculate it from the bounding box the extent and I'm gonna fix the resolution to 30 meters the SRTM one arcsecond product has a spatial resolution of one arcsecond which is approximately 30 meters on the equator so degrees minutes seconds and the second system one degree is hundred and eleven kilometres on the equator or one second is about thirty meters on the equator so choose that and for the rest I can keep it as default except the last one no data values I'm gonna add here with plus an out of range value it's a bit of convention to use - nine nine nine nine and that's all what I need why do I need to know data fell you can see that the bounding box is rectangular but the DM is in another projection and it skewed so rest rest can only be square in the end after we projection so I have to fill up other parts with with no data I'm gonna click ok processing and it's below the bounding box and if I switch off DM then we see here that is clipped and if I hover my mouse over it I can see it's in correct projection I can also see the file name so there went as well then I removed the mosaic we don't need it anymore so here the next step is for hydrological purposes is to to make this hydrologically correct because there are a lot of depressions in but you can also have is that there is voice those are areas that have no data values we don't have it in this case but I'm still going to show you that so I'm going to open the processing tool box and if you have voids which are no data then you can spot them by putting a very dark grey skill or some styling on your DM and the part that you can see through are the node data values are also other ways to check that so I'm going to search here for no data and there's this function fill no data and then you choose the DM you can play with these parameters and they will do it I have a video on that in this case we do something else it's called filling the sinks and that's a typical hydrological thing that you need to do there are artificial depressions in R audience and the water gets stuck in it it doesn't flow to the outlet the other thing is that it also removes the real depression so if they are important in your studies then you need to put them in a gap and then a very efficient algorithm mr. phil sings wrong on you and algorithm so make sure that you choose the right D and if I throw away the ones that I don't need give it output name gonna save it to a file and I call is the film and if you can also output flow directions at this point I'll do that in a later stage and also the watershed basins not needed at this moment I'm just interested in in the filling of the sinks then I run the algorithm takes a bit you need good computers for this 16 gigabyte memory is recommended and then still it can take some time if it doesn't work you simply do it again can happen it's probably memory issues but this parts also very sensitive to to spaces I don't have that in this case and when I rehearse this it also gave the error normally it doesn't of course I'm multitasking quite a bit now with other software so hope resources are otherwise I'll take the one that I prepared already see it's getting a bit slow always a good moment to get a coffee when you push the button to calculate this seems to be working out yeah there it is our patience is rewarded so this is the filled DM and if we compare it with the original one and then we can see that the bits are filled and it's most clear at this point here where we see on the other Street map that there's a big open pit mine really huge and I have a video where I demonstrate how to use the profile tool which is very useful I can quickly show that to you so there's the profile tool you can install and that's to simply make profiles in cages and here click on it and I'm going to add layers click add layer here so at the other one the original one change the color let's make the filled line green ok then I can simply draw a transect here and you see the red line was the original pit that we have in our DM and it's now filled up so double-click you end the line you can also open a vector file you can save it as a PNG lots of options here you can see it traces live where you are on the profile so very useful tools you can have you can modify the x and y in cetera it's a really cool tool but that's what the fill things algorithm does then it's also nice to style the layers a little bit always good to see that a few times so I'm gonna style this filled one go to the layer styling panel and I'm going to choose a single bump pseudo color and you see default you should not keep this it uses red to blue where blue are the highest areas which looks like lakes that's not intuitive but if you click right on the color ramp you can here create coloring and I can choose here CPT city and then you get a lot of nice presets that can help you so there are some nice preset option for typography there are some nice choices here and I'm just going to use this format elevation and now we have the elevation one and I'm going to show you a few more little tricks in depth before we continue I'm gonna duplicate that you have learned that also in a previous webinar and this one I'm going to rename because I'm gonna use this for the hillshade and you don't need to calculate hillshade there's a nice renderer for hillshade so I choose here Hill here hillshade and you can even change the rotation or the orientation of the Sun and this is what it produces now if we combine it with a DM and then use the other nice trick to use blending mode and choose multiply we can then get this very nice effect so that's it's nice not a nice trick is you have to play a bit because the southern part of this catchment is as having valleys and Hills but the northern part is quite flat so if you want to see contrast there there's this trick here to use a current canvas and it will then if we move it to then update it for for that part of the canvas if you use updated campus it updates it every time and you see here it stretches the colors and if we wouldn't do that it will use it for the whole restaurant that's not working that's funny probably do something wrong here normally it works anyways this used to work probably not in a live demo so try that yourself umm I'm gonna continue with the procedure we have now a style BM soon and the next step is to calculate the so-called strata orders there are two ways to delineate your streams there's to look at flow accumulation but I have another video on that to use the grass tools here I'm going to use strata orders which is more intuitive way a nice way to do that saga has a nice tool for that so make sure you use the filled DM and you simply save it as a styler order to file stroller safe I run it it is indeed a bit slower because I think the resources of recording the webinar and the pro point open it should work so the Strela order is a method to to order your streams it starts with the smallest upstream pixels and then it starts when they come together you add the order if they're from the same order and if they're from different order you don't increase the the order there's a nice video explaining that to my youtube channel I'm gonna start it so as we discussed last time for these rosters it's very important that you realize if it's discrete continuous or boolean well strata orders or yeah what are they they are discrete between a certain order so it's an ordinal scale as we say so I'm gonna style it and for discrete trusters and also for ordinal we use the pallet at unique values option and because we have here water I choose blues for the ramp and then I click classify it classifies now the stralla orders from low order to high order with higher blue intensity as I want it goes from starla order one to a maximum of 11 some people think there's a maximum value that's that's not always that's not a standard so it just orders it until it gets to the max so there's not always ten orders or eleven orders just simply depends on the extent of your area and the record necessary so we have not Estrada or there's another trick is to choose a threshold value for which orders and higher than that order we consider as streams and you do that a bit with trial and error calibration and therefore I'm going to use the raster calculator like we learned last time I'm going to create boolean maps so I'm going to calculate first stralla order large or equal then let's say five I'm gonna save it I'll call it strata five to make sure that I remember which one has which threshold value this equation remember it means if the pixels in stroller have a value 5 or larger then the result will be one for those pixel boolean true else it will be false William zero so calculate that's pretty quick and then I need to style it so boolean as we learned last time is like a discrete layer we use pelleted unique values i click classify and it finds that we have these two values in it and I wondered as blue because it's water and I don't want to see the zeros so I'm going to go to transparency and I adhere to 0 as an external data value and I'm going to hide the DMS and the exercise now for the calibration is to compare if this trial order larger than 5 is representing well the rivers on this map and the best way is to go from upstream to downstream because these algorithms work better in the natural condition but we see that this is far too many much more than we would expect so we need to increase the order a bit so I'm going to do another one I'm just gonna do two for this webinar and also normally try many and to search for the best one so I'm going to do larger eco than 8 save this I'll call it stroller 8.50 yep made it tighter there and I run it and there it is and I can copy the style and it doesn't Transparency have to manually do that so to adhere the zero value there it is so the difference between eight and five is quite high so you see here this is with five six seven headed to it and is only eight and what we can observe is that in the natural area as it follows quite well the screens even where these reservoirs lakes are human late then in urbanized area as you can find these kind of things where the the river has been confined and channelized that follows it less and here in his mind and that's of course because the filling algorithm we see that the river just cuts through the mind to reach in the antique outlet because the water in the algorithms are forced to to the outlet to the lowest point in the DM which is around Vermont where the rule Reverend gets into the most okay that's then also the the next step what we need to do is to to delineate those streams and we use therefore or another tool channel network and drainage basins tool also from saga and that one needs your elevation so make sure you choose the filled one and it uses this threshold value of strata so let's use here eight again in this case I want to suit the flow direction so I'm going to save that and I am NOT interested in the flow connectivity the strata order we already had the drainage basins are here twice and what you need to find out is that this one is Ruster you only find out when you're gonna save it and the other one is factories polygons see that's a beverage here twice so I'm gonna output not this one I'm going to output the channels so it's basically convert your strata eight or higher to two to your streams call this channels it will be nice vector file I'm also going to output the drainage basins these are all the beta basins in the DM that it can find just based on on the flow on the flow direction just call these basins and I don't want the junctions to switch it off they're all calculated once you switch off or not output it to the screen and our safe and temporary files so I'm going to run it there we go takes a beta to run multiple parameters and then I hope to the things that we requested gives quite some feedback while you run it you can see if think I'll go right and there it is I'm going to close it it was another lesson last time don't believe legends that automatically come out of your GIS software so we're going to do a little bit of styling and let's start with our channels zoom layer so here you see the basins layer in brown that's just a default color and it simply divides our DM in basins in catchments or watersheds and we can already see here the Ruhr catchments but we're going to step further what we want is for a specific outlet to delineate the detachment so I'm going to hide that one and then here are her channels and going to style that and before you style it's always wise to look at the attribute table you can learn a lot from that so what is two outputs is several attributes several fields we have here order and order cell and the length of each segment and order cell is the strata order that was taken from the rester so I said larger equal than 8 so it will have 8 until 11 this order we classified them so it becomes 1 9 2 etc and that's the strata order that you want to visualize on your map end-user so that's the one we are going to use and we use their categorised graduated styling and we are going to use the order column and put the position here on zero because it's a discrete integer numbers and I'm going to not use the color method but the size method so that they're gonna play with the thickness and we're going to use here size from 0.3 to 1.0 and then I can I want to change also the color to blue can also use RGB value nice one from the book so 15 and 66 and 220 you go back and then I click classify and we still need to use the amount of strata orders that we have so I can play it with the amount of classes so I have 8 until 11 8 9 10 11 so for classes to put a 2 right class boundary this one should be 3 and they weren't sure before we have to for classes and different sizes that it already looks nice then we can also style our flow Direction map that's an interesting one and the third direction that there was something I always wish to have a good styling for because you can't simply assign a random ramp to that or a gradient linear gradient and court was was very helpful in book 2 to completely write out that part that I think nobody did before and the key is that we have here are the compass directions and something I want to tell you if if you work with these kind of tools to always Google how your software works with it so different software uses different encoding for flow direction so if you want to look for something you start your search with QGIS and you see I already wrote it flow Direction legend and normally you end up then at the sec exchange website and I asked this question some years ago and yeah then somebody who's not very helpful says check to read the freaking documentation as if I didn't do that but it's not well documented you can't find it so fortunately there was somebody very helpful there Christine and this person told me that it's for saga it's encoded in this way so 0 north and then clockwise and for grass it's like this and ArcGIS does 1 2 4 8 etc PC Russ refuses to arrows on your numeric pad so it's really important that you know how the flow Direction is encoded and use it to compress directions and so we need to style this but not with the normal gradient ramp so I'm going to these are discrete values so we use pelleted to unique values and I'm going to use here a spectral ramp just as a starting point ok classify and there you find the values 0 to 7 and 255 255 is is for flat areas like minus 1 in ArcGIS and now I want to modify this this ramp in such a way that we get a circular ramp so I'm going to click here and then we can edit the ramp I'm going to first remove by the way the 255 and add that in later so now I can modify the ramp and you see here four different five different stops or this goes clockwise more east south west and back to north and I can here change the color of the first one to the last one to make it circle so if I click here on the color I can use here the the color picker and I can sample then the color have to click it of course and then that one will be assigned here to the first one so we've said that and also the idea to make it intuitive is to have warmer colors towards where the Sun gets on the on the hills and that's on when they are exposed to the styles or flow directions to the south aspect and flow direction very similar algorithms almost the same actually so I'm going to use the colors that were recommended by by Kurt so we're going to use for south yellow so I'm going to click this and then I can put here the yellow in now it's completely yellow then for East I'm going to use green and that's simple simply far on zero green on 255 0 and then we use for West we use magenta there we have 214 60 and 170 and this gives us a nice ramp that is circular so okay then it's applied and I need to add in back the value 255 which is a flat so you can type the compass directions here I'm not going to do that for the sake of the time and you can play around this with this too to make it better you can blend this with other layers and this makes it a bit more intuitive but there's something different that you can do and it's also what I want to show at this point is to use the crayfish plug-in to a style this raster and see already that my computer is quite busy so I'm going to make a subset first so you can also see that I'm going to make this flow direction map a bit smaller cluster by extent and I'm going to use select the extent on the canvas and I'm going to to select an area just here and which is here no data value just to be sure and I'm gonna save it to safe run okay now have a smaller version here and I'm going to use that one with the crayfish plugin so here in the plugins crayfish has has been made by a nutria consulting to deal with mesh layers and when I saw how nice it was dealing with visualizing these meshes with different arrows I thought that it would be nice to effort for the flow direction during the hex fest in a coruña the name of this reduced version by the way we made it together in a few days so you can find it then in the processing toolbox the crayfish plugin is here with a tool and we're interesting is conversion to saga flow to grip let me double click on it and here's our Clips file and it saves it to a mesh format a grid file and I'm going to call this flow there grip I'm going to run it changed it to a different format and it don't automatically open so what I'm going to do is get it from the browser panel need to refresh it and there you see with this symbol that it is a this one is the mesh layer I'm going to drag it there it takes a little bit to load and then it offers us all these mesh styling options there's a nice video also showing this there is we need to tweak it a bit so I'm going to style it so when I click here the layers panel adapts to the to the mesh option because it recognized this is a mesh and I want to switch on the arrows I don't want to show the contours and I want to show the factors in a nice way so I still need to do a few things here so I'm going to zoom in on the area to just have a look I'm going to hide here all the layers except would be good to have the DM under it and you see that the density of the arrows is a bit too too high so we need to modify this first I want to put it to a fixed length and you can play with these these values this is the length is far too high as Britain on 10 and it starts adjusting now here we see the arrows we can still make this a bit smaller 0.1 and put this one 20 maybe five here now it becomes more visible as arrows in the flow direction but a better way to display it is to use these factors fixed on a grid there and that's really a nice tool and you can change the spacing of the grids that's also very dependent on your zoom level so if you put in wider part and on a coarser level it's clearer so that's a very nice way of visualizing the flow direction you have to play with this is in a live demo bit hard to to fix all these things but you can already see the effects and if I channels therein then you see that the water flows generally to to the channels what it should do very nice this okay then we are not there yet because we need to delineate our channel our catchment based on an outlet so I'm going to zoom to the lair and back the OpenStreetMap layer he sees the the blending is on because I don't have the hill shade now underneath it's also not so important and also going to remove the DM so because of the urbanization and a modification of the area our outlet is not where the roar exactly and there's the Meuse river and we made a model the DM has been modified to make this model where the stream is so I need to move the outlet to the delineator stream otherwise it doesn't delineate the catchment I'm going to use this tool which is called upslope that's basically the tool that delineate the catchment and it needs to X and the y coordinates and in the first webinar you've seen that we use the coordinate capture tool so this case you've also used that we get this coordinate capture panel and I can choose start capture and then I'm going to choose a nice point here on the delineated River it needs to be really in a 30 meter pixel another way is to digitize a point and snap it to the line but here this is also a sufficient as long as you're zoomed in well I'm going to copy remember the first coordinate set is in your graphic coordinate system and the second one is in the projection of your project on the Safari projection copy this and the second coordinate here we are and make sure the fill DM is selected I'm going to use the d8 methods which looks in the 3x3 window to the steepest slope downward embolus that's the flow direction these ones are more complicated algorithms that take into account more directions and they work better if you have diverging slopes but here we use the simplest solution let's first try you can experiment with the others for your study areas then I'm gonna save the file as mustard run it and then it should delineate all the upstream area pixels but in raster format and then the next steps what we are going to do is to make it into a vector layer so we have a boundary polygon there's a little surprise for you also after this webinar I'm going to open up a nice video on automating this procedure using the graphical modeler so keep an eye on that on that you can partially automate this and it's here so I'm gonna looks a bit strange but I'm gonna zoom to the layer and there you see that it has been delineated for sample the values inside the catchment this gets filled tell you 100 and outside gets value 0 it's good to remember and but this is not very useful also not to present or to make nice maps so I'm going to convert this to polygons and here under arrest are conversion we can choose polygons eyes use the catch raster and eat the DM that will be the name of the field in the output polygon vector file I'm going to save it I'll stick to the to the shapefile just in this case I'm going to call this catch this D this eight connectedness means that it should also look for pixels that are connected in the in the diagonal to to fit the lines of the defector if you uncheck that then it's the for rule where it's only horizontally and vertically connected so you can also play with that there we go and here we see see the boundary polygon and I'm going to inspect the I'll get to those questions later that come in otherwise we don't get through it's easy to get back to those questions in the end what you see here and that's important is that there are several features which value hundred so if you select them you can see which they are and many don't show up but they are there I'll show you why that happens and this is your catchment and this happens if I click here on zoom to selection also a nice tool then we see that there's one pixel here in a little loop and that's a geometrical problem caused by polygon izing arrestor this is an artifact of organizing wrestlers so in our attribute table we need to get rid of those those three don't we change our boundary so what I'm going to do is I'm going to select only the one that is our catchment I'm going to listen to the full layer and go back to the attribute table and I switch to editing and there's this nice tool to invert the selection and I'm going to throw away everything that stand out the catchment so we only preserve value hundred and then I save it and there it is so now just a few steps to be done is to do style this and what we can do is just a simple fill with an outline simple line I'll leave it to her to show in the in the seventh webinar the the shaper Phil I think I think that's better in the sake of time also and to answer your question and also this this one is not really about styling I'm so simple lying and then make it a red boundary make it a bit thicker so here we have our catchment boundary the rivers with the strata orders and we can have our DM blend it with the hill shade and yeah that's a that's a nice map and we can still clip the streams there's also something I want to show because that can cause an error which you can also fix and it's also important to know so factor clip and I'm going to click the existing big channels to smaller one fitting to the catchment polygon always make sure in the same projection if you click things like save them and call this one it didn't give an error that's good and we have those other channels here so I'm going to copy the style and paste it then to to this one and going to remove this and then we have two channels just inside we can also fit the raster either might expect some errors which we are going to fix so extraction click raster by mask layer input layer is then our filled DM or if you want to use the original that's also possible because it's for visualization you want to maybe use the real one then the mask layer is the catchment polygon same projection you're not going to chase anything of this change - no data value I'm not going to change anything there and then I saved clip one and there's a cold p.m. please run it and it worked so it's a bit robust in this case sometimes you get a geometry error unfortunately it didn't show up but if it shows up then in the book we have a solution of calculating a buffer of zero but a very nice other way of doing it is go to the processing toolbox it's related to that issue with these these single cell polygons because you can clip only with with a full polygon of course with a good geometry so in the tool box there's this nice tool called fix geometries and there you can fix it for the catch from polygon which is causing your problem so I see many of my students fixing the channels the channels are not the problem it's a polygon and then then it normally works I click this I can also then copy the style of the fill to DM and paste it to the clipped one switch off this one and there it is and then a little thing to show is the 3d viewer because we have a DM here so I'm going to zoom into a certain area here I can also show you to get a bit rid of these pixels it's a cost by resampling lack of resampling in the in the filtrate layer normally so we use nearest neighbor if we do resampling for calculations but for smooth visualization so it's better to use the linear or cubic and we see that it's smooth down a bit yeah that's for resilient and then especially at distance it looks so nice now if I run a few this in the 3d viewer I go here to view new 3d map view I'm not going to go to the edge of my the performance of my laptop in this live demo you can see it in my videos just make a little bit bigger what's important is to set the source of the elevation that your DM sorry DM and there I choose the in this case the fill DM can use the kit 1 and is even smaller it's this one the last one to do there Eclipse area is not super montaigne so I accelerated three times you can play with these things to get a better quality I'm just gonna start it and it takes everything from the 2d view in the 3d view it starts rendering and then I can turn it and fly through it it's still a rendering as you see and yeah that's a very nice stuff that you can use the 3d viewer you can get these these white things out of the way first of all it needs to render the full thing but also to play with those variables if you have a google satellite or of the street map on top of it you can see it and even those arrows I'm not gonna challenge the system now to do that but so you've seen that in my posts today how to do that so that's what I wanted to show you so I'm gonna switch back to to the plenary where we can handle some questions before we continue stop sharing this so of course yeah so there's a good question here from piotrek asks can I set the maximum catchment area I'd like to divide an urban area into many similar or many smaller catchments for example one to two kilometers each and then cut the raster with them and I guess this is possible in arc hydro tool in arcmap where you can kind of specify a maximum size for a catchment area and and I was thinking you could do this by adjusting this trailer threshold blood or no if you have a yeah that's one way but it's an easier way or more comparable to our title is to use the other approach with grass because dare you play with flow accumulation to determine these things so you simply choose another level stroke of flow accumulation it's also the example in my theoretical video that if you change that value then you can tune the site attachment because when less low accumulates it's a smaller catchment so these thresholds you can play with sir can be possible other questions that came in for the plenary there was a little discussion about the fixed geometry errors and one thing I was wanted to explain because it may be easier to explain than type in the chat box is that tool box has this mode called edit in-place now there's a little kind of folder looking button in tool box with a little pencil icon on it if you press that it filters the tools and toolbox to those tools that can be run in place on a layer and one of those is fixed geometries so it's really nice because if you have a layer that you have geometry errors and you can just put the toolbox into edit in-place mode run fixed geometries on it and it will just fix the errors without having to create a new copy of the layer just fixes them in place that's a great suggestion for things you don't want to keep like Michael so this virtual layer that I used in the beginning scratch layer is also very useful just to try out things or only use it as a temporary in boot here's another data source question is SRTM 30 by 30 the best high-resolution de em data that's free online or is there a higher resolution available well free and online are the boundary conditions SRTM has been for a long time the best there are some newer ones but with a lot of restrictions only for educational use like the the ISA one or DLR one free you have to fill in forms and yeah it's not really what we call open data but if you do some effort you can get it there's also NASA has been combining different data sources I've seen posts of that it still might plan to make a bit of a summary or have an intern figuring these things out but there are some more data sources out that combined aster GTM in parts where SRTM is is performing less yeah so keep an eye on it things will improve but generally for these kind of applications where we are needed DTM for general flow in a catchment this is really a good deal and many students they write in their reports like the DM is outdated well outdated t and that takes geological time on this skill that we look at her it's not about humans changing some part of a pixel we can't see that in these DMS the mind of course is an exception and that's also something we are going to look at in the next chapter that moves DIF - moving through time we're going to compare satellite images and other sources to see them but generally 30 meters diem was like luxury ten years ago where we had 90 meter or the detail one of one kilometer and that was also even sufficient for these kind of exercises so I know for engineers that's always a difficult thing you want to have the the Maxon resolution and but resolution is also not the same security a statistician I was teach to my students will say you know larger pixels are better because the errors averaged out so never confuse accuracy with which spatial resolution it's not it's a different dimension right now there's a question I'm trying to answer about the different methods available in QGIS for filling sinks and so I was just mentioning that there's several different saga algorithms out there for filling sinks today Han showed the Wang and Liu tool there's also a grass tool our our fill dirt our filter and yeah the difference is they will work a bit differently but the nice thing about open source is that you get different tools so I always say use them and compare and see what gives the best results I wanna use well documented the scientific paper and it's very efficient if you have a very large data set then you see already with a lot of things on my laptop it takes a lot of time for this catchment but there's the one in UX Excel that's recommended if you have many many tiles of SRTM for example so you know you just have to try them and figure out from from literature how they work and see which one works best for your conditions if areas are very flat you also need to work with the parameters in in the algorithm like the the minimum slope in the Navara new algorithm the Hansa do you know the difference between the three different saga Phil cinq Alex no now I always recommend to start with the with the rom a new one because that's considered as the most efficient and well documented best one the issue with with the saga tools that sometimes very hard to to figure out how they work you have to really reverse engineer a lot of things unless you can read the code which is sometimes also not super clear on the specifics I often get that question for cringing there's some some persons talking on my youtube channel and making remarks about it and it's like okay now I'm really challenged so I'm gonna figure it out but yeah it's too hard you don't know what every parameter means so you have to try and try it yourself and figured figure out it like I do that's that's important try it yeah there's a question here too about how many times you should use fill sinks and it seems to me that you should only have to do that once but only once if you want more advanced fill sink algorithm then definitely you have to look at PC rester works in Python and there you can put all kinds of thresholds how much volume of water need to be added the overflow the area etc and it's just like four or five parameters and especially at this lower area that's interesting because do you want such a mind to be filled up if you still want to monitor what happens with the hydrography I have a video on that of course that you can watch but that's something that I really wish that those tools are integrated in huge is also from the PC restaurant I believe so you can use those and they are very well documented yeah so that's another thing there's this webinar but Hans does have a whole YouTube channel with a playlist for hydrological models and so he has a he has a YouTube video on we're running through the workflow he just did with grass tools he has you know one that goes through just the way the book does it with sagar tools like he just showed and he has one on the theory behind all of this so there's a lot up there that you can use to take a deeper dive and the whole procedure in vitamin d sure stir so yeah more explanation all these tools I would put I always put cards in these YouTube videos of the webinar so you can simply click to it to find those videos that we mentioned here any more questions from the audience where do we continue oh is it possible to export the coordinates of the streams and equities XYZ text format oh yeah absolutely there are there are tools for exporting you know pulling the vertices out of lines you could also first use the point sampling tool to get the elevation of vertices from those so you'd have XY and z coordinates for them so it's certainly possible to do that yeah not a nice tool for hydrological modeling or analysis q chainage tool where many of people many people ask me is it possible to sample on their own the river every hundred meters of something so cute change tool can do that and then you have a vertex on every hundred meter and then you can use that in the in the point sampling tool to get the elevation and it can make a nice profile along the river for example these are also nice tools to use and this can be where some of the expression engine and key just can be really handy because you can there's a dollar X dollar Y functions for populating attribute columns with the x and y coordinates for example and there's also a point sampling function I forget what it's called off the top of my head but there's a function in there that allows you to basically calculate an attribute column and a point layer by samp getting the sample you know sampling you know the value from a raster layer so there's some nice functions in there you can use to do some of that kind of work as well lots of options anymore we can also discuss our for the Geo beer so it's a later so that's all I see on here ok let's continue in a few slides and then you guys must be super thirsty either at breakfast lunch or dinner or beer beer o'clock like I am so I'm going to switch to back to the presentation so what we always do at the end of the webinars is give you some information where you can find additional materials if you were already mentioned so don't go this time to watch in detail you you can find it on the website the webinar and also has a tap on OpenCourseWare website the locate press link guide you to that so keep an eye on that there will be also the videos posted and you'll find more free course materials over there so Gianna's OpenCourseWare does work is the main link to get there and I have a YouTube channel escort already mentioned with nice playlists also a lot of theory but also practice you can also register for a short course on qgi cheetah institute for water education Curtis being if I does a guest lecture in the past few years and it has been great fun we didn't map at thorns and I have a good time together with G is really nice full full time course where you also get the certificate and we also offer online courses and we are working on one on this book complete online course with all the chapters and with questions quizzes and exams in it so also keep an eye on those developments I give the word two word of course oh yeah so just a couple of shameless plug slides here I just wanted to quickly mention this Community Health Maps resource I'll be posting more and more content to this it's been a successful program that basically shows public health workers how to implement open source GIS workflows so a very approachable material and there's already a series of lab exercises up there I'm also going to be working on getting a two day course I've developed on vector-borne disease surveillance with Q just post it up there so people can go through that and this came out a couple weeks ago but I'm a podcast addict myself I love podcasts and so if you like podcasts first off this is a one of my favorite geospatial podcast it's called the map scaping podcast and the creator daniel O'Donoghue interviewed me about QG the cutest project a couple weeks ago so if you want to give this a listen its episode 50 and the link is at the bottom of the slide down there so yeah hope you enjoy that if you give it a listen yeah that was a great podcast nice like them too okay next week we are going to talk about open data is also one of my favorite topics and yeah now we have delineated this catchment how are we gonna populate or add useful data for our studies and to understand the catchment next week also Kurt will talk a bit about the community because open data also relates to community with QGIS also relates to community and it's a very nice community so yeah do you want to say raise something about it I think the community is one of the things that I keeps me coming back to cutis more and more is just it there's a it's a really welcoming place and I think one of the important things about an open-source project like you just is that if there's something you don't like if you find a mistake in the documentation for example you can change that and so all of this is something you have you can kind of take the initiative on and contribute to and work on so I kind of encourage everyone to get more involved in the project as you can even if that's you know you can have your own local QGIS user group you can you know take a deeper dive and and start contributing to the documentation or to the the code for the project writing plugins all of that there's a lot of different ways you can do that and I'll talk about some of that next week okay great yes so then that brings us to to the most important point of the webinar I'm joking the Geo beers so you're allowed to unmute yourselves or switch on your screen and I want to thank you for for joining and let's get on with with the discussion over over some beer or coffee breakfast lunch whatever we're wearing on the globe who are at the moment in which time zone so it's tradition I'm going to open my my beer here
Info
Channel: Hans van der Kwast
Views: 21,393
Rating: 4.96875 out of 5
Keywords: QGIS, catchment delineation, watershed, graphical modeler, processing toolbox, SAGA, hydrology
Id: 2Ub0c7Ss-T4
Channel Id: undefined
Length: 71min 51sec (4311 seconds)
Published: Sat Apr 11 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.