Wednesday, November 16, 2022

How to do intersection in QGIS?


Intersection is a vector overlay operation done by polygon intersection operator. The result of this operator is the collection of all possible polygon intersections; the attribute table result is a join of the two input attribute tables.

Objective: The main objective of this tutorial is to see the houses that would be affected by road expansion project (from Buffer analysis) and to learn intersect in QGIS.

In the last lab we did buffering of road taking distance of ‘5m’. Today we will see the no. of houses that will be affected by this road expansion project using ‘Intersection’ geoprocessing tool. 

I hope you have reached till here. Make sure your both ‘building’ and ‘road’ data are in same coordinate system ‘WGS 84/44N’. If not do
Projection to convert them.

Using Intersection tool to know the houses affected.

Step1: Right click ‘44N_buildings’ -> open attribute table. 
Do the same for ‘RoadBuffer’
You will see something like this.



Step2: Go to Vector -> Geoprocessing tools -> Intersection

A window will be displayed like this.

Now adjust the following settings parameter
Step3: Keep Input layer as ‘44N_buildings’, Overlay layer as ‘RoadBuffer’, Save it to a file by clicking three dots icon in (Lab1.5/ Output) with ‘Intersect_RB’ and finally click Run.

Here we used ‘44N_buildings’ as input layer because it is the building data that we want to see being affected by ‘RoadBuffer’
 
If everything goes right you will see following output.

Step4: Right click ‘Intersect_RB’ -> open attribute table.
These are the list of houses that will be affected by the project.










Sunday, November 13, 2022

How to do Buffer Analysis in QGIS?


Buffer is a spatial analysis done in GIS. It is a kind of neighborhood function which uses geometric distance to define the neighborhood of one or more target locations then determine the area around them, within a certain distance.
It can be done on both vector and raster data. The one normally done with raster data is called proximity analysis in GIS. Here I'll be using vector data.

Objective: The main objective of this tutorial is to 
learn buffering in QGIS. Lets say this buffering is for a road expansion project.
Step1: Load the road data ‘RoadClipped_44N in Layers panel.

 
Step2: Go to Vector -> Geoprocessing Tools -> click on Buffer 


A window will be displayed like this.
 


Now adjust the following settings parameter
Step3: Keep Input layer as ‘RoadClipped_44N’, Distance: 5, Units: meters, Save it to a file by clicking three dots icon in (Lab1.4/ Output folder) and finally click Run
 

If everything goes right you will see following output.

 Step4: Load the ‘Building_44N’ data in layers panel.

Finally, we have got our buffer.
 You can zoom in zoom out and 
Want to see the video?

Sunday, November 6, 2022

How to do projection in QGIS?


Projection is the transformation of curved surface (latitude, longitude) of the earth to the flat/plane surface (XY). 
This allows to make a map with correct distance, area or direction. There are many different types of projection and which to use all depends on purpose of your analysis.

In this tutorial I'm going to show how projection is done in QGIS. 

For this, I will be using a boundary data of 'Siyari' VDC which is in WGS 84 (Geographic Coordinate system) and will convert it to WGS 84/ 44N (Projected Coordinate system).

Step1: Load the vector data ‘Siyari’ in Layers panel.


Step2: Double left click ‘Siyari’ layer -> Information -> under Coordinate Reference System you will see Name: EPSG:4326 - WGS 84 .


It means our data is in WGS 84 Geographic Coordinate System and we need to convert this to Projected Coordinate system. 

Converting data from Geographic Coordinate System to Projected Coordinate system

Step1: Click on Vector -> Data Management Tools -> Reproject Layer

A new window will appear where you have to  adjust some settings.

Step2: Keep Input layer as default-> click on earth icon in Target CRS


Step3: Search for 32644 in Filter menu -> click on WGS 84/ UTM zone 44 N -> click ok


Now your Target CRS will be seen as WGS 84/ UTM zone 44 N

Step4: Save it as ‘Siyari_44N’ to your desired location by clicking three dots icon in ‘Reprojected’ menu -> click Run


If everything goes fine you will get following output.

 


Now if you see its Coordinate Reference System. Now it has been changed to WGS 84/ UTM zone 44 N.

Finally, a new projected data has been obtained.

Wanna Watch video?


Friday, October 21, 2022

How to do Proximity analysis in QGIS?




Proximity is a neighbourhood function of GIS. It is similar to buffer analysis that we do for Vector but if it’s done for Raster then it is called proximity in GIS. 

In this article I’m going to show how it’s done in QGIS.

Since, there will be distance measurement make sure you u
se Projected coordinate system which has unit meters instead of Geographic coordinate system. Here I will be using WGS84 44N.

Follow the following steps:
Step 1: Loading data
Load your raster data ‘Raster_road’ in QGIS simply by dragging it to layer panel.

Step 2: Processing Toolbox
Go to Processing toolbox search for ‘Proximity’ under Raster analysis of GDAL section you will get ‘Proximity (raster distance)’ double left click it to get below interface.


Step 3: Parameters settings
Give input layer ‘Raster_road’, distance units ‘Georeferenced coordinates’, Max distance to generate ‘1500’, No data value to use as ‘Not Set’ and save it to as file ‘Proximity_road’ and run it.


Here we used Georeferenced unit as distance units so that output raster will have cell values representing no. of units in the current Coordinate Reference System(CRS), with each cell from Raster_road.
On successful run you will get following output.


Step 4: Symbology
Double left click ‘Proximity_road’ layer -> Symbology -> Make max value as ‘1500’(since we want range of buffer to 1500 only) -> click apply


Finally, you will see following output.


So, that’s all from us for today.

Happy analysis!


Saturday, October 15, 2022

How to convert vector to raster in QGIS?


Converting a vector to a raster is a very common process in GIS. In this tutorial I’m going to show how it’s done in QGIS in detail.
Follow the following steps:

Step1: Load your desired vectors in layer panel like shown below. Here I will rasterize ‘clipped_building’ vector.

Step2: Processsing Toolbox panel

Go to Processing Toolbox panel -> search ‘vector to raster’, -> under Vector conversion of GDAL section you will get Rasterize(vector to raster).


Step3: Choosing parameters

In input layer select vector that you want to rasterize, choose 1 as fixed value to burn, Georeference units as output raster size units, 15 as Width/Horizontal and Vertical/Height, Output extent as butwal_44N, Assign no data value as Not set. At last save it to a file as ‘Rasterized’.



Remember values you choose depends on for what purpose you are going to use the raster.

If everything is fine you will see output like this.


Definitions

Burn in value: pixel value that represents data(if set to 1 then your data will be white and rest all black).

No data value: invisible region outside the main data.

Vertical/Horizontal resolution: Determines no. of cells/pixels your raster will be formed. If you will give high resolution value then no of cells will be reduced and output raster resolution will be reduced and vice-versa for Georeferenced units.

Output raster size units:

Pixel units: Suppose if you set Vertical/Height resolution and  Horizontal/Width resolution as 5 then output raster will have pixels of 5 rows and 5 columns imagining raster as a matrix. This decides spatial resolution of raster.

Georeferenced units: Suppose if you set Vertical/Height resolution and  Horizontal/Width resolution as 5 then spatial resolution of each pixel will be 5*5(meaning height and width is 5) and it decides rows and columns of raster matrix.

Output extent: border of raster.

So, that’s all for today we will meet soon in next article.

References:

https://gis.stackexchange.com/questions/379889/qgis-3-16-rasterize-vector-to-raster-parameters

Pirotti, P. F. (n.d.). Multi Criteria Analysis ( MCA ) with GIS Find the best land for growing Mangoes in Madagascar using MCA !

https://www.qgistutorials.com/en/docs/3/multi_criteria_overlay.html