Analyzing the Areas of Influence with Thiessen Polygons using QGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to another tutorial in this tutorial we are going to discuss everything you need to know when it comes to calculating the area of influence based on a set of points using the concept of these and polygons now these in polygons are actually generated from a set of sample points in a way that each polygon defines a specific area of influence which corresponds to each different point now these in polygons are also commonly known known as waranoid polygons so to demonstrate to you guys how you can use qgis to calculate this area of influence i'm actually going to use one example scenario over here you can see one watershed i have a set of rainfall stations as you can see over here station a station bc up until station f so first i'm going to show you how to calculate the area of influence now let's see if someone wanted to calculate the rainfall pertaining to this particular watershed using all of these stations now you can see that there are two stations inside the watershed this station c over here and station f over here but that doesn't necessarily mean that the rainfall of this particular watershed can be defined only based on the rainfall data of one particular station or in this case these two stations because there's a good chance that the actual rainfall of this part is more representative when it comes to the data of station a rather than data of station c now for example over here it's quite evident that the rainfall of this particular part this northern part of the watershed can be more accurately represented if we were to sort of account the rent which was recorded in station d rather than relying on the rainfall data of station c so that's where exactly these these and polygons or these voronoi polygons can come in handy so first what i'm going to show is i'm going to show you how to calculate the area of influence as well as the particular weight from each of these stations let's say for example if you have a time series of rainfall data for all of these stations you can multiply that time series accordingly based on that particular weight in order to come up with a more accurate representation of the rainfall of this particular watershed by making use of all the stations which are available over here and in the second part of the tutorial i'm going to make use of the same concept but for that i'm going to calculate for each specific watershed what would what would be the contribution from each of these stations now as you can see over here i have one two three four five six different watersheds now let's say if you were looking at this yellow color watershed and its name is sub catchment one over here you can see from from this legend over here so one would guess that there might be some contribution from station d a and station c if we were to assess the corresponding rainfall of this particular watershed but then someone could also argue saying that there could be some contribution from station g as well and similarly we cannot completely rule out the possibility of having some sort of a contribution from this station e f and b either that's why again we are going to you make use of this technique of tcn polygons to actually accurately define the corresponding contribution from each of these stations from which we will be able to very accurately say that 50 of the rainfall of this particular watershed can be represented from station c 25 from station a and 25 from station d something like that well that's just an example so that's exactly what we are going to find out actually through this from this tutorial all right so let's get started with the tutorial first i'm going to deactivate this sub catchments layer work with this watershed boundary layer and we actually do not really need the reverse layer so i'm going to deactivate that layer and to generate the thesin polygons all you have to do is go to processing and over here in the toolbox you can either search for tcn over here you can see that under the saga tools you can find one tool called tcn polygons and if you open over here you can see that you can specify the set of points and the frame size and it will actually generate the set of these and polygons for you or similarly you can even type voronoi polygons and over here under vector geometry you can see that we also have a tool to generate voronoi polygons which is basically the same thing as dcn polygons well for this example let's let's go ahead and use this voronoi polygons tool and right now if i open the attributes table of these rainfall stations you can see that we do not have much we just have this id column and the station name column so now what we have to do is we have to specify the set of input points in this case the points are actually the rainfall stations and we also can specify a percentage of a buffer region now to get started i'm going to keep this in zero and after we run the tool we'll see what happens yeah if i were to move this rainfall stations on top of this you can see that it actually generated the the thesis and polygons or the waranoid polygons but only at the spatial extent of the stations now as you can see over here it doesn't really cover our full area of interest in this case the full extent of the watershed so what i can do is i can actually specify a buffer let's say about 25 percent and if i run the tool again now you can see that it actually got extended beyond my study area as you can see over here so i will just go ahead and get rid of this first one eye polygon layer which we generated all right now how to interpret this voronoi polygons layer i'm going to get rid of the colors by specifying outline simple line let's make this one a bit more thick all right well now you can see that if we if we are talking about rainfall data this area of the watershed can be represented by the rainfall of this particular station and the special influence of the station b is only limited to this part of the of the watershed as you can see over here and station a d g e as you can see station e has very minor influence when we consider all of these points and and it goes without saying that the station c has the highest influence because it's sort of located in the central region of the watershed if i look at the attributes table of this voronoi polygons layer you can see that the polygon itself has now been named after that particular station which is also quite handy now let's say if you wanted to calculate how much of a percentage we would assign for each of these particular stations you don't actually have to do anything manually you can use gis tools to actually calculate that for you so in order to do that first i'm going to intersect these two layers so we can again go to the processing toolbox and search intersect and over here under vector polygon tools you can see there is one tool called intersect under saga gis tools so i'm going to specify the layer one to be the voronoi polygons layer and layer b to be the watershed boundary layer so i'm going to intersect these two so i so that i can run this and as you can see it generates this intersected layer now if i go to let's say turn off all the other layers yeah you can see that now it has sort of been cut according to that particular part which shows the contribution from each station to our area of interest in this case it's a watershed you can also have a look at the attributes table yeah as you can see the polygons now has been actually splitted even though it has the same station name let's say for example if we were to look at station b the influence of station b you can see that even though it might not be apparent it seems like the polygon has been splitted into three parts four parts in this case as you can see over here a small part over here so just to merge all of these polygons which corresponds to the same station together i can use the dissolve tool so i'm going to go over here and type dissolve and over here under saga tools you can see that there is one tool called polygon dissolve by attribute so i'm going to click on that and over here you can see that the layer that i would like to dissolve is this intersect layer and if i go ahead and open up the attributes table what i would like to do by dissolving is basically to sort of merge much these different pieces of polygons which has a common name now for example this polygon which corresponds to station a is actually just a single polygon but the polygon which corresponds to station b has now been scattered actually into four different pieces and i don't really need to spend time to let's say inspect each individual piece all i have to do is just merge these four pieces together just to make it one attribute rather than having four different individual attributes and similarly for station c and d we don't have actually any splits but for station e you can see that the station e polygon has now been splitted into six parts and again i'm not going to worry too much by spending time inspect where each of this polygon piece is i can simply use the dissolve tool to actually sort of dissolve all of these attributes into one attribute based on this particular name over here which is under the column station so that's what i'm going to do now so i'm going to deselect all the selections like this and over here i'm going to mention that i would like to do the dissolve operation based on the name of the station and that's it we can run the tool and see what happens yeah now you can see that over here we got a new layer called dissolved and if i open the attributes table now you will see that we actually just have one single attribute or one single element which corresponds to each particular station which is actually quite clean now i can maybe get rid of this intersect polygon because we don't need it anymore and maybe we can rename this to be decent polygons for the entire watershed by the way you can see that now one attribute has been selected if you want to deselect everything you can again go to attributes table and click on this one or you just make sure that you select that particular layer and you can hit ctrl shift and a which will basically deselect any selected attributes all right now in order to calculate the corresponding weight from each of these stations you can see that by the looks maybe i would assume that the weight from station c might be just around 45 to 50 percent and from station c station f could be about let's say 25 to 28 something like that so that's just my estimation but the way to mathematically calculate that would be by dividing the area of each of these polygons by the area of this entire polygon that'll actually give you the weight but if you want to convert it into a percentage you can just multiply that by 100 and we don't have to really do any of these manually we can use the gis tools of qgis to actually do the computation so to make things clear what i'm going to do is i'm going to create one column over here first and calculate the area of each of this piece just like this so for that you can go to this field calculator and i'm going to create a new field called area and the field type i'm going to actually return it to be a decimal number with maybe two decimal points and if you want to calculate the area the expression to calculate the area of each attribute is simply a dollar sign and after that you can type area and this will calculate the area in square meters but i would like to convert it into square kilometers because let's say the numbers can be too big if you were to work in square meters so i'm going to multiply this by 10 to the power -6 and when i click ok you can see that now the area was calculated and as we can see station c has the highest area which is about 335 square kilometers well the area of influence from station f is also quite significant about 200 square kilometers and the others get calculated accordingly as you can see over here i'm going to create another column called weight and i'm going to divide each of these values by the total area of my watershed and now let's see how we can do that so i'm going to name this column as weight and it's a decimal number maybe with two decimal points so as you can recall what we need to do is divide this number in this case i'm going to specify the name of the column within quotes like this yeah every time when you specify a name of column you need to specify that inside this chord so that it will understand that you're actually referring to this particular column of this attributes table and i'm going to divide that by the sum of this area column now if i remove this part you can see that if i take just the sum of this this particular column you can see a preview over here and that preview actually shows you what what is the value that will get calculated if you were to just execute this one and if you just leave it at this it's just going to calculate the sum of all of these different pieces together and it's going to result in a value of 686.4 square kilometers but of course we would like to divide this each individual attribute and that's why i'm going to divide this attribute so that for each row that you see over here it will divide this particular value by this total area and it then it will move into the next row and it will divide this particular value by this total area and so on all right so i can simply hit ok and now you can see that station c has a total weight of 0.49 which is 49 which basically says that as long as you're talking about this particular area of interest and this set of rainfall stations based on the computation of the voronoi polygons or these and polygons station c will have an influence of 49 and station f will have an influence of about 29 and as you can see over here the lowest influence is actually from station e which is only one percent for now for example if you were to do an actual calculation let's say that for a particular year as you can see on the screen we have these values which are in millimeters per year for each of these stations and if i were to calculate the rainfall on my area of interest based on the based on these individual stations the way i would do the calculation is just like this as you can see over here we multiply the corresponding rainfall value of station a by 0.06 and we add that to the product of the total rainfall of station b multiplied by 0.05 the rainfall value of station c multiplied by 0.49 the rainfall value of station d multiplied by 0.11 station e station f and then we sum up everything together which will result in this to be our total calculated rainfall over this particular area by considering the influence of all of these stations all right i guess you guys got the idea all right now let's move on to a bit more complex example i'm going to save all these edits and i will turn this one off for the time being and i'm going to turn on the sub catchments now let's try to do the same thing but this time we are going to calculate the influence for each subcatchpoint all right i'm going to follow the same workflow which means first i'm going to create the voronoi polygons again and my input layer is again going to be the rainfall stations as we can remember the buffer we specified about 25 percent if i recall correctly and it generates the warning polygons for us just like this now i'm going to intersect these two layers again well before that i would like to inspect what kind of attributes we have in this attributes table in the subcatchments layer we have these attributes shape length shape area the name of the sub catchment and also we have the area over here which is again in square kilometers now in case if we did not have this column you know exactly how to calculate we can go to the field calculator create a new column and just specify dollar sign area and it'll actually calculate the area based on its special extent for each of these different attributes in this case the attributes are actually sub catchments and if we inspect this one eye polygons layer you can see that we basically have the area of influence specified by these different polygons just like this so let's go ahead and intersect and i'm going to use this intersect tool of saga and my layer a is going to be the voronoi polygons and the layer b is going to be sub catchments yeah once the tool computes the intersect polygon i can maybe turn these two layers off and now you can see that each polygon has been splitted accordingly well if i retain this i think it'll be a bit more clear for you guys yeah just like this all right now you can see that this is this was a single sub catchment but based on this computation you can see that now this single sub catchment has been splitted into three parts if i take this identify features tool you can see that this itself is one single sub catchment you can see that this part of the sub catchment is influenced by station d and this part is influenced by station a and a majority of the sub catchment is influenced by station c and if you were to talk about this second sub catchment you can see that this upper part is influenced by station a and the rest of the subcatchment is actually influenced by station c so the contribution according to this calculation of these in polygons you can see that's just influenced by two stations the aerial influence of these two stations is actually sufficient enough to cover the the entire sub catchment and similarly if you go go over to this sub catchment you can see that we still have to make use of three for this you can see that small piece is represented from this station over here so it's going to be one yeah just two stations and over here it's just going to be station e station f and station c and finally for this type sub catchment it's going to be station f covering this majority of the sub catchment station b covering this part and station c is actually showing a little bit of an influence over here i'm going to deselect everything now now let's have a look at this attributes table of this intersect layer all right now if you double click on this name over here you can see that it gets sorted according to the name of the sub catchment you can see from this attributes table as well as from this graphical figure that this piece of the watershed is influenced by station c which you can see over here as well and this piece by station d and this part of the watershed by station a similarly you can see that if you were to select both of these parts of sub catchment 2 you can see that the entire catchment gets selected and similarly you can see that this lower part is influenced by station c and this north western part is influenced by station a and you can see that already we have one column called area over here now this area if you see if i check for all pieces of sub catchment 1 the value is same and if i check the pieces of sub catchment 2 you can see again the value is actually the same so where does this value come from well we intersected two layers we intersected the the voronoi polygons layer with the sub catchments layer and this value is actually coming from these attributes that we had in the sub catchments layer which is this value so it's quite crucial that you calculate the area before you actually proceed with the with the intersect operation so now all i have to do is divide the real area of each of these piece by this particular area and that will give me the corresponding weightage of each of these stations to this particular watershed as you can see over here so what i'm going to do is similarly i'm going to open up the field calculator i'm going to name this one as area of the area of each attribute let's keep it in decimal numbers with two decimal points precision and again if i wanted to calculate the area all i have to do is just put a dollar sign and type area and that will calculate the area the attributes area over here but i did a small mistake by actually not converting this into square kilometers well you don't have to worry much in case if you happen to do a mistake you can again go back to this field calculator and now rather than creating a new column you can actually update an existing column which happens to be this area of the attributes over here and now i'm going to retype whatever i need over here and i'm going to convert it on the spot to square kilometers by multiplying it by 10 to the power minus 6. now you can imagine that if we are talking about let's say this particular watershed if i divide this 113 by 195 it will give me a certain weight or a certain percentage which shows me the contribution of station t station c to this particular catchment and similarly the contributions or the weight from station a and station d accordingly if i were to actually divide this value by this value and that's quite simple as you can already imagine all we have to do is go over here to the field calculate create a new field called weight change this decimal number and now i'm i'm straight away going to divide one column by the other so as you can imagine all i have to do is just put the quotes like this and specify area at divided by area just like this and if i hit ok you can see that now it actually calculates the corresponding contribution now you can do a quick check just simply whip up your calculator and see that all these weights the the sum of all these weights for each sub catchment actually should be one so let's do a quick check if i if i were to consider the sub catchment one if i just add up 0.58 plus 0.04 plus 0.37 it should be well 0.99 we can attribute that to b1 and similarly if i check for subcatchment 2 over here it's going to be 0.81 plus 0.19 which is 1 and similarly for sub catchment 3 we can see that the 3 weights will add up to 0.76 plus 0.12 plus 0.11 yeah 0.99 we can attribute that to 1. so you can see that our computation is actually quite accurate now in the meantime i would like to also draw your attention to these some of these items which has actually a contribution of zero over here so you can basically ignore them if you really don't want to have the attribute you can even directly delete it as well but if you were to do the actual computation let's say we have a certain rainfall valley and you can see that the contribution for this particular piece of the polygon from station b to sub catchment five is basically going to be zero and the same case for this as well as you can see over here it's actually this small piece so that's why we get a very small value it could be something like 0.000 something but since we specified only two decimals it's actually going to show us that the contribution is just zero so before we wrap up this tutorial let's say if you wanted to calculate the rainfall which corresponds to sub catchment a the computation will be like this you have 58 contribution from station c 37 contribution from station d and just four percent contribution from station a and similarly you can do that for each sub catchment all right guys so that's about it for this tutorial i we covered quite a quite a bit of things but i hope you guys got the basic idea of how we can actually utilize this decent polygons or this warren oy polygons tool to our advantage to easily calculate the area of influence based on a set of sample points just like this and again i would like to stress the fact that this was just only an example which uses the contribution of rainfall from each of these stations to different sub-catchments but this concept can be applied in so many different other fields i'm going to leave the research up to you guys to do if you do have any questions don't forget to comment them down below and if you did enjoy the tutorial and if you do believe that the tutorial added some value to you guys show your support by hitting that like button and and do consider subscribing to this channel to see more interesting tutorials like this on a weekly basis i'll see you guys again in the next one
Info
Channel: GeoDelta Labs
Views: 16,177
Rating: undefined out of 5
Keywords: qgis, qgis3, thiessen polygons, voronoi polygons, thiessen, voronoi, area of influence, how to calculate thiessen polygons, how to calculate thiessen polygon weights, how to analyze area of influence based on points
Id: TS2YYLtdQSo
Channel Id: undefined
Length: 26min 14sec (1574 seconds)
Published: Sat Oct 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.