Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection in QGIS. Vector analysis is one of the important part of GIS. There are many vector analysis operation which we can discuss on another article theoretically. Here you will learn how to perform vector analyssis with QGIS too. Suppose, you want to select and find some places which are within some distance from main road or near to some landmark places for analyzing the location. All this can be done by GIS Geo-processing Vector Analysis operation. Finding schools which are near to main road within a distance of 1km or finding a hospital or police station within a distance of 1km are some of very basic example of Vector Analysis Operation. Here, we will see a small demo of how to use some vector analysis tool like Distance, Near by, Buffer, Intersection in QGIS.
Let us download some osm free available data for performing operation. We have downloaded some data from a Very well known university. The downloaded comes is in WGS 84 CRS or Pseudo Mercator CRS. To calculate distance in meters the data must be in projected coordinate system. For our region it is WGS 84/ UTM zone 43N. You can choose CRS according to your area.
Converting CRS – For Easy calculation:
If your data is already in CRS projection, then you may proceed to see the below article and perform some vector analysis operation. Now we will first change the CRS of our project in QGIS tool. Go to Project click project properties.
Select CRS and find out the CRS which suits your region. Notice the coordinate displaying on the screen.
Our layers are not in projected CRS. So now right click the layer and click save as.
Save the file in shapfile format and change the CRS of the layer to projected CRS and click load in to canvas when done. Click OK. If you don’t see the layer in canvas. Then right click on the layer and click zoom to layer. Now turn on the “On the fly projection”. And now you will see the layer disappears. Again right click on the layer and click zoom to layer. You will see the layer appears with other layers on the map. Remove the layer with WGS 84 CRS. Now do the same with all the layers. Which are not in projected CRS.
Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection in QGIS
Lets Select Schools from the polygon Layer:
- Go to properties. You can also open the properties dialogue box by double clicking on the layer. Select general tab and click query builder.
2. Double click on the field which you want to select and then select the operator i.e =, >, < , LIKE, != etc as per the requirement and then click sample to find out the values in that field, as can be seen in the image provided below.
3. Click ok in query builder and then select ok in general tab. You will see only the features you have selected according to query.
You can rename the layer, export and import the projected layer again or make a copy of the layer and clear the query by going back to query builder to get the original layer.
500 meter Buffer operation Around Schools :
- Now we will create a 500m buffer around schools. QGIS will automatically calculate the result in meters because we have changed the projection to CRS system and the basic unit in projected CRS is meters.
- Now click vector and click Geoprocessing tool and click buffer.
We have selected ‘Dissolve buffer results option‘ to dissolve overlapping buffer zones. Now Click ok, and close window after completion of the process.
which provides result as the provided below image in QGIS canvas.
Similarly, we can create buffer on the roads also, as shown in another example below.
Intersection – Vector Analysis in QGIS:
Lets compute the intersection area of the above two buffers i.e one buffer for schools and other over the roads. Lets start intersecting:
- Click on the vector and then geoprocessing tool and then select intersect.
2. Click ok and then close the window after completion of the process. You can see the result showing intersection between two layers.
Find some point which are falling within the buffer boundary:
Now let us find some point which are falling within the buffer boundary of the schools. We are not selecting specific values here for this case. But you can do if needed.
- Go to vector, click research tool and click on select by location.
2. Observe the options here. You can choose any number of options according to your analysis. Click ok.
Similarly you can perform operation like, finding distance, search near by etc. Hope this article would be helpful for you to make some understanding about vector analysis. Obviously, you need to perform over the tool to become more familiar with vector analysis operation. If you find any difficulties or have any suggestion, do comment below.
Check :
Is their any limitation for buffer size input in QGIS?
Vector analysis is one of the most important part in GIS. Thanks for the post.