Making and using buffers in QGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the other common problem we have when we're looking at GIS is to ask the question about how many of a certain item are within a certain distance of another item so the example I'm going to show you here we have the crosses and the Blues doesn't matter what they are but basically we have the blue dots versus the crosses and I want to know how many crosses are within a given distance of each of the blue dots so first of all let's look at magnification at this little area here there we go so you can see the problem is quite tricky when it is look like that so the first part of the solution of this problem is how far to draw buffers around each of the blue dots at a given distance so that is done under vector Geographic tool buffers right here so you click this and up will come what you want now the blue dots can you see the blue dots are called hospital with dent so we pick hospital with end we want it doesn't draw circles it draws line segments around it but if you make enough line segments it will estimate to be a circle and then you want it within a particular radius now because of the way this is set up and let me just go back and show you if you right-click and you look at the properties of each of these layers we'll get this in here and we'll have a look here do you notice these are in wgs84 coordinate reference system and remember that was just one way that we convert a sphere into a flat map because these are in wgs84 they measure in degrees not in kilometers or miles let's just check that they're all the same we'll just check the other one because that's the other issue you need to make sure that all layers are in the same coordinate reference system otherwise it won't work so this is wgs84 which is in degrees now just for a tip at the equator a degree equals 111 kilometres obviously at each of the polls a degree equals zero meters so you just have to be careful this is actually from Malaysia which is right next to the equator so for the sake of the argument we can use the old one to a hundred rule to give us we'll get back to where we were to give us the buffer distance so if it's 100 kilometers we want a one kilometer buffer 0.01 0.01 would be a one kilometer buffer we'll make it precise because it's a hundred and eleven by dissolving the buffers if two buffers bang into each other they will then be merged together so we always hit dissolve and then we give it a file name I'm going to call it the same as my little test one just replace that it's cool and here we go let it go there we go you can see now it's drawn the buffers underneath so you can now see the buffers have been applied now remember our rule from before the buffers are actually sort of over the top of everything so we just want to move them down through the list here so is move them down here so yes now we have the buffers below what we can now do is actually do the counts so counting is really easy it's we've used the technique before if you go to a spatial query you can go spatial query select source features from this whole bunch of red crosses you can see that the red crosses you can check over here there they are that are R now I won't show you the option until you choose the buffers that are within the buffers so do you get it we are going to select all the red crosses that are within the 1 kilo meter buffer we just press apply here we go there we go how do we know we've done it well which said we've selected 374 so if you'll just want the statistical ant so you can just write that number down and call it quits but if you actually want to see them here they are here you notice they've been highlighted as yellow and either inside the buffer of gone yellow so what we do now is we can actually save those yellow as a specific subset so we can present them separately if you right-click on them on the data item that summer yellow and you go save as you want a shape file you can browse to give it a name and I'm just going to call it something I put a little testing directory this is my real data so I want to mess with that we'll call it the within one killer meter save save only the selected features that's the critical one always forget to press it but make sure you click that and add them to the map so we go OK like that and there they all are you can see they've now turned a red dots you can turn off the buffers you can turn off the other ones and now you are looking at purely the ones that are within one kilometer you can export that data if you want to then import it into Excel to look at what those actually mean if you go save as again against them remember CSV is if you save them as a CSV they are directly imported into Excel so here we go we'll do the same again within one kilo meter underscore CSV it's going to save as CSV we don't want to add it to the map this time we are done we go ok and they will now all be sitting there as that data set so that's how we do buffers remember it's under vector processing tools buffers remember the two key elements to the story are make sure that all layers are in the same coordinate reference system and if you're using W i SAT for its degrees and remember the little tip 111 kilometers equal Z at the equator
Info
Channel: MarcsResearch
Views: 64,578
Rating: 4.8914728 out of 5
Keywords: QGIS, Buffers, Geographic, Spatial, Dental, Health
Id: yZxATonCKFQ
Channel Id: undefined
Length: 6min 33sec (393 seconds)
Published: Sat Apr 02 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.