0% found this document useful (0 votes)
97 views

Week 10

QGIS is an open-source geographic information system software. This document discusses importing vector, tabular, and raster data into QGIS and inspecting datasets using identify features, attribute tables, and metadata. It also covers selecting features, exporting data, zooming, and panning in QGIS. The next session will discuss georeferencing a raster image.

Uploaded by

babita_gadbail21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views

Week 10

QGIS is an open-source geographic information system software. This document discusses importing vector, tabular, and raster data into QGIS and inspecting datasets using identify features, attribute tables, and metadata. It also covers selecting features, exporting data, zooming, and panning in QGIS. The next session will discuss georeferencing a raster image.

Uploaded by

babita_gadbail21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 124

E L

P T
Geographic Information Systems

N
Dr. Bharath Haridas Aithal
Ranbir and Chitra Gupta School of Infrastructure Design and Management, 
IIT KHARAGPUR

Module 10: GIS As a Software
Lecture 46: Introduction to QGIS and Data Import
Hands on By: Chandan M C
E L
P T
 Understanding QGIS Interface
 Importing vector, tabular and raster data to QGIS

N
 Properties, identifying feature and attribute table
 Metadata and properties viewing
 Selection of features
 Zoom in/out, zoom to extents/selected features, pan
 Data Export
E L
Introduction
 Quantum GIS (QGIS) is a GIS software with collection of several tools

T
for managing geographical data, 3‐D analysis, statistical analysis
 QGIS is Free and Open Source software

P
 It is an official project of OSGEO (Open Source Geospatial
Foundation)

N
 QGIS Version 3.4 and 2.18, Long term release (most stable) is used for
the entire practical demonstration purpose of this course
 QGIS 3.4 can be downloaded from official repository
https://qgis.org/en/site/forusers/download.html
E L
Q‐GIS Interface
1. Menu Bar
1

T
2 2. Toolbars
3 3. Panels

P
4. Map View
5. Status Bar

N
4

5
E L
Q‐GIS Interface

P T
1. Menu bar

N
2. Tool bar

Additional tools can be selected by right click in toolbar space
E L
Q‐GIS Interface 3. Panel bar

T
Browser panel helps in 
browsing files from 
system

NP Layers panel helps in 
switching layers
E L
Q‐GIS Interface
4. Map display
Map display helps in visualizing various layers

P T
N
5. Status bar
E L
Importing Vector Data
 Menu bar > Layer > Add Layer > Add Vector Layer

P T
N
E L
Importing Vector Data
 Add Vector Layer > Add .shp file from local directory

P T
N
Browse here from local directory 
E L
Vector Data File Extensions: 
 Shapefiles are most commonly used for storing the geometric location and attribute

T
information
 Other extensions: Google Keyhole markup language (.kml), Openstreet maps (.osm), GPS exchange

P
format (.gpx), Geographic JavaScript Object Notation (.GeoJSON)

 A shapefile has specific file extensions that should be stored in the same project

N
workspace. They are:
Extension Description
.dbf Database file, stores attribute information
.prj Stores coordinate reference system
.shp Main file storing feature geometry
.shx Stores index of feature geometry
E L
Vector Data Properties and Information

P T
N
E L
Vector Data Properties and Information
 Right click on vector layer from the layer panel

P T
N
E L
Vector Data Properties and Information
 Right click on vector layer from the layer panel

P T
N
E L
Vector Data Selection
 Selecting data

P T
N
E L
Vector Data Identification
 Identifying features

P T
N
E L
Importing Tabular Data

P T
N
 Note: Data should be saved in CSV (comma separated value)
format
E L
Importing Tabular Data

P T
N
 Note: X field = Longitude values, Y field = Latitude values
E L
Importing Raster Data
 Menu bar > Layer > Add Layer > Add Raster Layer

P T
N
E L
Raster Data File Extensions: 
 Georeferenced tagged image file format (.geotiff or .tif) are most commonly used

T
file formats for raster data (especially satellite data)
 Other storage formats are:

P
Extension Description
.jpg or .jpeg Joint Photographic Experts Group (JPEG) – compressed image file format

N
.img ERDAS Imagine IMG files ‐ proprietary file format developed by Hexagon 
Geospatial
.bil Band Interleaved for Line (BIL) stores pixel information based on rows for all 
bands in an image
.bip Band interleaved by pixel (BIP) assigns pixel values for each band by rows
.bsq Band sequential format (BSQ) stores separate bands by row
E L
Vector Data Exporting:
 Vector data (.shp) can be exported and saved in any other file formats

T
 Right click on vector layer from the layer panel > Export > Save Features As..

NP
E L
Vector Data Exporting:

Select Vector format type. Ex. Shp, kml etc. 

T
Browse to which folder the file needs to be saved
Layer name (Optional)

P
Select Coordinate reference system 
(Ex. UTM, LatLong etc. )

N
E L
Raster Data Exporting:
 Raster data (.img or .tif) can be exported and saved in any other file formats

T
 Right click on raster layer from the layer panel > Export > Save As..

NP
E L
Raster Data Exporting:

T
Select Raster format type. Ex. GeoTIFF, img etc. 
Browse to which folder the file needs to be saved
Layer name (Optional)

P
Select Coordinate reference system 
(Ex. UTM, LatLong etc. )

N
E L
Summary

 Understanding QGIS Interface

T
 Importing vector, tabular and raster data to QGIS
 Inspecting dataset with identify feature and attribute table

P
 Metadata and properties viewing
 Selection of features

N
 Data export
 Zoom in/out, zoom to extents/selected features, pan
 In the next session, we shall discuss about Georeferencing a raster image!
E L
P T
N
E L
P T
Geographic Information Systems

N
Dr. Bharath Haridas Aithal
Ranbir and Chitra Gupta School of Infrastructure Design and Management 
IIT KHARAGPUR

Module 10: GIS As a Software
Lecture 47 : QGIS Plugins
Hands on By: Prakash P S
E L
P T
 QGIS Plug‐ins 

N
 Downloading and installing plug‐ins
 Important plug‐ins in QGIS
 OpenStreetMap (OSM)
E L
QGIS Plugins

 QGIS plugins add additional functionality to

T
the QGIS application.
 Plugins can be installed directly from the QGIS

P
Plugin Manager within the QGIS application
 Plugins are given by QGIS developers or other

N
users to expand the existing functionalities of
the application
E L
QGIS Plugins

 Core plugins: They are part of standard QGIS installations. They require to be

T
enables after installation of QGIS software
 External plugins: They are available under QGIS Plugins repository, here each

P
plugins needs to be installed by the users before using them
 Experimental plugins: They are plugins developed and under experimental

N
stage. These plugins are marked as experimental plugins under Plugin
Manager in QIS
E L
Downloading QGIS Plugins – Proxy setting
Proxy settings (Optional)

T
• Click on settings > Options>Network
• Select Use proxy for web access
• Set the proxy if exists 

NP
E L
Downloading QGIS Plugins
To download plugins in QGIS

T
• Click on Plugin > 
Manage and install plugin
• Type the required plugin name

P
• Click on Install plugin

N
E L
Downloading QGIS Plugins ‐ QuickMapServices

P T
N
E L
Downloading QGIS Plugins – Spatial Query

P T
N
E L
Downloading QGIS Plugins – Spatial Query

P T
N
E L
Downloading QGIS Plugins – OpenLayers

P T
N
E L
Downloading OpenStreetMap (OSM) data
To download spatial data from OSM

T
• Open a boundary shapefile
• Click on Vector > OpenStreetMap>
>Download data

NP
E L
Downloading OpenStreetMap (OSM) data
…To download spatial data from OSM

T
• Select From layer
• Choose the layer opened
• Give name to output file

P
• Click on OK

N
E L
Downloading OpenStreetMap (OSM) data
…To download spatial data from OSM

T
• Click on vector>OpenStreetMap
>Import topology from XML
• Choose input XML file

P
• Click on OK

N
E L
Opening OpenStreetMap (OSM) data – Ex: Polylines
…To download spatial data from OSM

T
• Click on vector>OpenStreetMap
>Export topology to SpatiaLite
• Choose input DB file

P
• Choose point/line/polygon
• Click on Load from DB
• Select the Tags required
• Click on OK

N
E L
OpenStreetMap (OSM) data – Ex: Polylines

P T
N
E L
OpenStreetMap (OSM) as base layer
To add OSM as base layer

T
• Make sure that OSM plugin is 
installed in your system
• Add a vector/raster map 

P
• Click on Web>OpenSteetMap>
>OpenSteetMap

N
E L
OpenStreetMap (OSM) as base layer

P T
N
E L
Summary

T
 QGIS Plug‐ins 
 Downloading and installing plug‐ins

P
 Important plug‐ins in QGIS
 OpenStreetMap (OSM)

N
E L
P T
N
E L
P T
Geographic Information Systems

N
Dr. Bharath Haridas Aithal
Ranbir and Chitra Gupta School of Infrastructure Design and Management, 
IIT KHARAGPUR

Module 10: GIS As a Software
Lecture 48 : Georeferencing an Image
Hands on By: Chandan M C
E L
P T
 Downloading Topographic Map from Survey of India Portal
 Importing a Jpeg (plain) Image to QGIS

N
 Georeferencer Plugin
 Exploring Georeferencer Tool and Window
 Georeferencing an Image
 Transformation Settings
E L
Introduction
 Georeferencing is the process of assigning real‐world coordinates to

T
raster image using sample coordinates or ground control points
(GCPs)

P
 Coordinates can be obtained by any of these methods:
1. Field surveys ‐ collecting coordinates with a GPS device for few easily identifiable

N
features in the image or map (Such as road intersection, railway‐road intersection,
edge of a lake, permanent structure edges etc.)
2. Google Earth – virtual collection of point coordinates
3. Obtaining coordinate information form the image itself (Ex. Topographic map)

 Image is warped and made to fit within the chosen coordinate system
E L
Topographic Map

 It is also called as 

T
TOPOSHEET

P
 Scales available‐ 1:25000, 
1:50000, 1:250000

N
 Prepared by the Survey of 
India
E L
Getting a Topographic Map
 Survey of India portal

T
 Free topographic maps of scale 1:50000
 http://soinakshe.uk.gov.in/

NP
Step 1: Click on Get Started
Step 2
Enter your Aadhar number, OTP will be 
sent to your registered mobile. 
Login via OTP
E L
Getting a Topographic Map

Step 3: Provide user 

T
details and submit

NP
E L
Getting a Topographic Map
Step 4: Dashboard.

T
Select your area of 
interest from either of the 

P
two options:

N
1. Search by Sheet No.
2. Geographical search
E L
Getting a Topographic Map

P T
N
Step 5: Geographical Search
Provide details of State and District
Click on Privacy policy and download Sheet number 56K/7
E L
Getting a Topographic Map

Step 6: The data will be 

T
downloaded as pdf format file
 Use last eight digits of your 

P
Aadhar number to open pdf 
 Convert pdf to image (jpeg)

N
 The final image looks similar to 
this 
 Now, it is ready for 
Toposheet No: 56K/7
Georeferencing in QGIS OSM No: E44M7
Region: Hyderabad
E L
Importing .jpeg (plain) Image to QGIS
 Menu bar > Layer > Add Layer > Add Raster Layer

P T
N
E L
Raster Data File Extensions: 
 Georeferenced tagged image file format (.geotiff or .tif) are most commonly used

T
file formats for raster data (especially satellite data)
 Other storage formats are:

P
Extension Description
.jpg or .jpeg Joint Photographic Experts Group (JPEG) – compressed image file format

N
.img ERDAS Imagine IMG files ‐ proprietary file format developed by Hexagon 
Geospatial
.bil Band Interleaved for Line (BIL) stores pixel information based on rows for all 
bands in an image
.bip Band interleaved by pixel (BIP) assigns pixel values for each band by rows
.bsq Band sequential format (BSQ) stores separate bands by row
E L
Importing .jpeg (plain) Image to QGIS
 Browse to location where

T
topographic map is stored
(.jpeg)

P
 Since it is a plain image,
cancel coordinate reference

N
system selector window
 Press OK in add raster tab
 Now, the raster will be
added to map display area
E L
Coordinate Reference System (CRS)
 EPSG  European Petroleum Survey Group

T
 EPSG code for Lat Long System  4326
 EPSG code for UTM system  32643 (for zone number 43)

P
 Finding UTM zone: Mysore Longitude = 76°
= 76/6

N
= 12.4
≅ 13

30 zones to west of GPM, there for = 30 + 13


= 43 UTM zone of Mysore
E L
Georeferencer Plugin
 Georeferencing in QGIS is done via

T
the Georeferencer GDAL plugin
 This is a core plugin ‐ meaning it is

P
already part of your QGIS
installation

N
 To enable it, Go to Plugins >
Manage and Install Plugins and
enable the Georeferencer GDAL
plugin
E L
Georeferencing an Image
 The plugin is installed in the Raster menu

T
 Click on Raster > Georeferencer to open the plugin

NP
E L
Georeferencer Tool and Window
Menu bar
 The plugin window is divided Tool bar

T
into 2 sections
 The top section where the image

P
Image display section
will be displayed and the bottom
section where a table showing

N
GCPs will appear

GCP Table
E L
Georeferencing an Image
 Menubar > File > Open Raster

T
 Browse to the directory (where
topographic map is stored (.jpeg) in

P
local drive) and click Open

N
E L
Georeferencing an Image

 In the next screen, a raster’s

T
coordinate reference system (CRS)
dialogue box will appear

P
 The source image is a plain JPEG file
and doesn’t have any coordinate

N
reference system attached to it
 Click on Cancel
 Image will be loaded in Map display
area
E L
Georeferencing an Image

 The intersections of the grid

T
lines will serve as the ground‐
truth

P
 Observe all the corners and
intersections of toposheet using

N
zoom in tool and make a note of
lat‐long values

Top left corner:
Lat: 17° 30’ N
Long: 78° 15’ E
E L
Georeferencing an Image

 Start adding the Ground Control

T
Points (GCP) Point #1

 Points shall be added

P
• At intersections
• Add points in clockwise direction

N
(minimum 4 at all corners) with
Degree minute second format
• Example: East 78° 15’ 00”
North 17° 30’ 00”

Warning: Do not add points randomly, add either in clockwise or anti‐clockwise direction only
E L
Georeferencing an Image

 Zoom to pixel level, identify the

T
exact intersection and add
point

P
 In the pop‐up window, enter
the coordinates

N
 Remember that X=longitude
and Y=latitude
 Click OK
E L
Georeferencing an Image

 GCP table now has a row with details of first GCP

P T
N
E L
Georeferencing an Image
 Similarly, add more GCPs
uniformly covering the

T
entire image
 More the points, more

P
accurate the image is
registered to the target

N
coordinates
E L
Georeferencing an Image
 Once added the minimum number of points required for the transform,

T
observe the GCPs now have a non‐zero Source (X, Y); Destination(X, Y);
dX,dY and Residual error values

P
 If a particular GCP has high error values, that means a human‐error in
entering the coordinate values. Editing/Altering GCP include:

N
1. Move GCPs using “move GCP point” tool
2. Delete that GCP and capture it again
3. Edit the coordinate values in the GCP Table by clicking the cell in either Dest. X or
Dest. Y columns
Note: The residual (pixels) should be preferably less than or near to one
E L
Georeferencing an Image
Before editing

P T
N
After editing
E L
Georeferencing an Image
 Once you are satisfied

T
with the GCPs, go to
Menubar > Settings >

P
Transformation Settings
 This will start the

N
process of warping the
image using the GCPs
and creating the target
raster
E L
Georeferencing an Image – Transformation Settings

Select Transformation type*

T
Select Resampling method (Keep Nearest Neighbour)
Select CRS as EPSG: 4326 – WGS 84 (Lat Long system)

P
Give a new output raster file name in desired folder 
Ex. Topo_56K_7_modified.tif

N
*Transformation Type Min. no. of points required
Linear 4
Polynomial 1 5
Polynomial 2 8
Polynomial 3 10

Click on OK after all settings 
E L
Georeferencing an Image
 After Transformation settings, click on start Georeferencing

T
 File > Start Georeferencing

P
OR

N
E L
Georeferencing an Image
 Once Georeferencing is done,

T
close the tab
 Open georeferenced image in

P
QGIS main display (by adding it
as a raster into the layer panel)

N
E L
Georeferenced Image

T
 Observe the coordinates

NP
E L
Summary

 Downloading Topographic Map from Survey of India Portal – Aadhar Card 

T
details
 Importing a Jpeg (plain) Image to QGIS

P
 Georeferencer Plugin – raster plugin
 Exploring Georeferencer Tool and Window – Map display Area and GCP table

N
 Georeferencing an Image
 Transformation Settings – Linear, Polynomial etc.
 In the next session, we shall look at the demonstration of creating vector –
Points, lines and polygons
E L
P T
N
E L
P T
Geographic Information Systems

N
Dr. Bharath Haridas Aithal
Ranbir and Chitra Gupta School of Infrastructure Design and Management, 
IIT KHARAGPUR

Module 10: GIS As a Software
Lecture 49: Creating Vector Features
Hands on By: Chandan M C
E L
P T
 Creating Vector Features
 Points

N
 Lines 
 Polygons
 Feature Editing
 Adding attributes – Coordinates, Length and Area calculation
E L
Creating Vector Features – Base Layers
 For this exercise, we demonstrate creating three types of vector data

T
• Point – Ex. Places, hotels, police stations etc.
• Line – Ex. Road, river, electric line etc.

P
• Polygon – Ex. Lake, Forest etc.
 Before creating vector features, It is suggested to add a base layer to the

N
QGIS interface
 These require geo‐referenced base layer
E L
Creating Vector Features – Base Layers
 Such base Georeferenced data could be in the form File name: Topo_56K_7_modified

T
of
1. Topo sheets or Topographic maps (.tif)

P
2. Cadastral maps (village maps)
3. QGIS Quick Map Services (Plugin installation will be

N
taught in later lectures)
4. Remote sensed images
eg., Google earth images, IRS data, LANDSAT data
 In this exercise, we can refer to Georeferenced
image (as base layer) created previous session
E L
Creating Vector Features ‐ Points
 Menubar > Layer > Create Layer > New Shapefile Layer..

P T
N
E L
Creating Vector Features ‐ Points
 New Shapefile Layer dialogue box

T
Browse to local directory and give a new shapefile name
(In this case Hyderabad_Places.shp)

Geometry type = Points

P
Select CRS as EPSG: 4326 – WGS 84 (Lat Long system)
• Collection of fields grouped under New
attribute

N
• By default, a new layer has only one
attribute, the id field (which can be seen in
the Attributes list) below
• However, in order to create new data, it is
Default attribute recommended to add attributes
• For this data, let us add Place Name and
Address

Click on OK after all settings 
E L
Creating Vector Features ‐ Points
 Now, the point layer has been

T
added to layers panel
 Right click on points layer and

P
select Toggle Editing option to
start adding points

N
E L
Creating Vector Features ‐ Points
 Click on Add Point Feature from the editor

T
tool panel
 Zoom to various locations of Hyderabad

P
and start marking points, using cross hair
 After digitizing all points right click on

N
points layer
 Select toggle editing option again to stop
editing and click on Save
E L
Creating Vector Features ‐ Points
 Right click on points layer, Select Open Attribute Table to

T
view attribute information. Inspect elements in tool bar

NP
E L
Adding Coordinates to Attribute Table
 To add coordinates (Lat and long) to the attribute

T
table, select Open Field Calculator (Abacus
symbol) form attribute table toolbar

P
 Field Calculator allows to create a new field
(column) with mathematical expressions or

N
functions
E L
Adding Coordinates to Attribute Table
Provide all the details as shown and in the
expression tab select $y for latitude under

T
row_number > geometry dropdown. Press OK to
add

NP
E L
Adding Coordinates to Attribute Table
Repeat the same step for Longitude and press OK

P T
N
E L
Adding Coordinates to Attribute Table
 Now, Latitude and Longitude has been updated for all points in the attribute table

T
 Close attribute table, right click on point layer > toggle editing > Save

NP
E L
Creating Vector Features ‐ Lines
 Line feature creation is similar to point layer creation
 Menubar > Layer > Create Layer > New Shapefile Layer..

T
Browse to local directory and give a new shapefile name
(In this case Hyderabad_Roads.shp)

P
Geometry type = Lines
Select CRS as EPSG: 4326 – WGS 84 (Lat Long system)
• For this data, let us add Road name and Road

N
type as attributes

Click on OK after all settings 
E L
Creating Vector Features ‐ Lines
 Now, the line layer

T
(Hyderabad_Roads) has been
added to layers panel

P
 Right click on roads layer and
select Toggle Editing option to

N
start adding roads
E L
Creating Vector Features ‐ Lines
 Click on Add Line Feature from the editor

T
tool panel
 Zoom to various locations of Hyderabad

P
and start marking roads, using cross hair
 After digitizing each line, right click to end

N
and give attribute information
 Select toggle editing option again to stop
editing and click on Save
E L
Creating Vector Features ‐ Lines
 Right click on roads layer, Select Open Attribute Table to view

T
attribute information. Inspect elements in tool bar

NP
E L
Calculating Road Length and Adding to Attribute Table
 To calculate road length, select Open Field Calculator 

T
(Abacus symbol) form attribute table toolbar
Provide all the details as shown and in the
expression tab select $length under

P
row_number > geometry dropdown. Press OK
to add

N
Alternatively, Type 
length in search 
box
E L
Road Length as a Attribute
 Now, Road length (meters) has been updated for all roads in
the attribute table

T
 Close attribute table, right click on roads layer > toggle editing >
Save

P
4

N
1
2

3
E L
Creating Vector Features ‐ Polygons
 Polygon feature creation is similar to line layer creation
 Menubar > Layer > Create Layer > New Shapefile Layer..

T
Browse to local directory and give a new shapefile name
(In this case Hyderabad_Lakes.shp)

P
Geometry type = Polygon
Select CRS as EPSG: 4326 – WGS 84 (Lat Long system)

N
• For this data, let us add Lake name and
Address as attributes

Click on OK after all settings 
E L
Creating Vector Features ‐ Polygons
 Now, the polygon layer

T
(Hyderabad_Lakes) has been
added to layers panel

P
 Right click on Lakes layer and
select Toggle Editing option to

N
start adding Lakes
E L
Creating Vector Features ‐ Polygons
 Click on Add Polygon from the editor tool

T
panel
 Zoom to various lakes of Hyderabad and

P
start digitizing by left click
 After digitizing each polygon, right click to

N
end and give attribute information
 Select toggle editing option again to stop
editing and click on Save
E L
Creating Vector Features ‐ Polygons
 Right click on lakes layer, Select Open Attribute Table to view

T
attribute information. Inspect elements in tool bar

NP
E L
Calculating Area and Adding to Attribute Table
 To calculate lake area, select Open Field Calculator 

T
(Abacus symbol) form attribute table toolbar
Provide all the details as shown and in the
expression tab select $area under row_number

P
> geometry dropdown. Press OK to add

N
Alternatively, Type 
area in search box
E L
Area as a Attribute
 Now, Lake area (sq.meters) has been updated for all lakes in the
attribute table

T
 Close attribute table, right click on polygon layer > toggle
editing > Save

P
3

N
2

1
E L
Summary

 Creating Vector Features – Base map is necessary

T
 Points
 Lines 

P
 Polygons
 Feature Editing ‐ Toggle Editing

N
 Adding attributes – Name, address, description etc.
 Adding Coordinates (points only), Length and Area calculation
 In the next session, we shall discuss about Vector Functions and Querying
E L
P T
N
E L
P T
Geographic Information Systems

N
Dr. Bharath Haridas Aithal
Ranbir and Chitra Gupta School of Infrastructure Design and Management, 
IIT KHARAGPUR

Module 10: GIS As a Software
Lecture 50 : Vector Functions and Querying
Hands on By: Chandan M C
E L
P T
 Vector functions
 Dissolve

N
 Join Tables
 Split and Merge Vector
 Clip/Extraction/Overlay
 Buffer and Spatial query 
E L
Vector Functions ‐ Disssolve
 Import vector file (bbmpwards_UTM.shp) to QGIS

T
 Inspect the attribute table. It has information about Bangalore ward wise data of ward
name, number, population, density etc.

NP *BBMP 
Bruhat Bengaluru Mahanagara
Palike
Bangalore city wards data
E L
Vector Functions ‐ Dissolve
 This command converts

T
multiple vector boundaries into
a single vector boundary

P
(outer)
 Right click on the vector file and

N
click Open attribute table
 Click Toggle Editing
 Click Open Field Calculator
E L
Vector Functions ‐ Dissolve
 This command converts

T
multiple vector boundaries into
a single vector boundary

P
(outer)
 Right click on the vector file and

N
click Open attribute table
 Click Toggle Editing
 Click Open Field Calculator
E L
Vector Functions ‐ Dissolve
 A new column has been

T
created in the attribute
table with value 1

P
 Close the attribute table
and save edits

N
E L
Vector Functions ‐ Dissolve
 Menubar > Vector > Geoprocessing tools > Dissolve

P T
Select <Dissolve> from attribute list

N
Click on the radio button, Select 
option Save to file  and give a 
new shapefile name.
In this case bbmp_dissolved.shp
E L
Vector Functions ‐ Dissolve
 Dissolved output of BBMP wards looks as below (Single boundary)

P T
N
E L
Vector Functions – Join Tables
 To join a tabular information to a shape file, the table must be saved in .csv file

T
Tabular data (Tabular‐data2.csv)

NP Attribute data of existing 
shapefile (Rainfall‐4326.shp)
E L
Vector Functions – Join Tables
 Add tabular data to QGIS using Layer >

T
Add layer > Add vector layer..
 Right click on Shapefile > Properties >

P
Joins

N Note: To perform join operation,  join field and 
target field should have at least one common 
attribute. In this case, it is id or Raingauge
E L
Vector Functions – Join Tables
 Right click on Rainfall shapefile > Open

T
attribute table to view joined attributes

NP Joined attributes from tabular data
E L
Vector Functions ‐ Split
 Add polygon data to be split to QGIS

T
using Layer > Add layer > Add vector
layer..

P
 In this case, Hyderabad_lakes.shp
 Right click on layer > Toggle editing

N
 From the Advanced Digitizing Toolbar
select Split Features option
 Start digitizing the lake which needs to
be splitted into two parts
 Right click > Toggle editing > save edits
E L
Vector Functions ‐ Merge
 Add vector layer ‐ Industries of Chennai

T
layers to QGIS
 To merge two vector layers, go to Vector

P
Toolbar > Data Management Tools >
Merge Vector Layers..

N
E L
Vector Functions ‐ Merge
 Input layers > Select Industries‐1.shp and Industries‐2.shp

T
 Specify destination CRS (Same as source in this case)
 Specify output location and file name (Industry_merged.shp in this case) and Run the algorithm

NP Note: To perform merge, both 
layers have to be in same 
projection system
E L
Vector Functions ‐ Clip
 Add Mysore district (Dist.shp) and district

T
roads (Dist_roads.shp) shapefile to QGIS
 Dist_roads have to be clipped according to

P
boundary
 Menubar > Vector > Geoprocessing Tools >

N
Clip..
 This operation is also known as Overlay or
Extraction
E L
Vector Functions ‐ Clip
 Input layer will be Dist_roads (Lines)

T
 Overlay layer Dist (Polygon)
 Select destination folder location and

P
file name to save Clipped layer
 (In this case Dist_roads‐clip.shp), the

N
output will be roads (lines) clipped
according to district boundary
(polygon)

Note: To perform clip, both layers have to be in same 
projection system
E L
Spatial Query
 Add Bus stops and Industries layers to QGIS

T
 The spatial query task is to select industries
within 500m of the bus stops

P
 First we need to create buffer around bus
stops

N
 Menubar > Vector > Geoprocessing Tools >
Buffer..
E L
Spatial Query
 Select Input layer as Busstops‐1.shp

T
 Set Distance = 500 meters
 Select destination folder location and file

P
name to save buffer output layer
 In this case, it is Busstops‐buffer.shp

N
 Run the algorithm
 Output
E L
Spatial Query
 Menubar >Processing > Processing toolbox > Search for Extract by location
 Queried locations with industries < 500m from the bus stops are seen with

T
symbol

NP
E L
Summary
 Vector functions

T
Vector Functions Examples
Dissolve  BBMP wards into single polygon

P
Join Tables  joining .csv with rainfall data
Split and Merge Vector  splitting lake and merging industries layer
Clip/Extraction/Overlay  Roads within district boundary

N
Buffer and Spatial query Industries < 500m from the bus stops 

 In the next session, we shall discuss about raster functions 
E L
P T
N

You might also like