GNR 617
Image Interpretation Lab
Tutorial: Introduction to QGIS
Prof. Y. S. Rao
TAs:
Narayanarao
Sekhar Vaka
Download and install QGIS
Download and install QGIS with default settings.
Download QGIS:
https://qgis.org/en/site/forusers/download.html
For older versions and source code:
https://qgis.org/downloads/
For plugins visit:
https://plugins.qgis.org/plugins/
MRS Lab, CSRE, IIT Bombay 2
QGIS Interface
Main menu
Tool boxes
File browser panel
Layer panel
Map canvas
Status bar
MRS Lab, CSRE, IIT Bombay 3
Setting up environment
• For this tutorial we need two plugins: Map
swipe tool and Quick map Tool.
• Goto→ Plugins→ Manage and install plugins
→ All plugins→ search for QuickMapSerives
→ Install.
• After successful installation it will be added
to web→QuickMapServices
• Follow the same installation procedure for
Map Swipe Tool plugin.
MRS Lab, CSRE, IIT Bombay 4
Importing raster data
• Unzip the data product (landsat-8) , 1
you may not import direct zip
format.
• Goto Open Data manager → select
Raster → browse for file→ click
add (only once)
• Shortcut ( ctrl + shift +R)
• You can select multiple files at once 2
by holding ctrl key. 3
• Alternatively drag and drop the See
next
data slide
4
MRS Lab, CSRE, IIT Bombay 5
Selecting 2,3,4,5 (blue, green, red and near IR) bands
2
3
Press add button MRS Lab, CSRE, IIT Bombay 4 6
Default last band i.e.
Band 5 (near IR) id
Bands displayed
are
loaded
MRS Lab, CSRE, IIT Bombay 7
Making a colour composite (TCC, FCC)
• Import required raster
bands into QGIS
• In this tutorial (band-
2,3,4,5 for landsat-8)
• Goto Raster→
Miscellaneous→ Build
Virtual Raster
MRS Lab, CSRE, IIT Bombay 8
Setting parameters for R,G,B
• Input layers parameter→ browse
for imported layers
• Rearrange them in 4,3,2 order (top Drag band 4 to up,
next band 3 and then 2
to bottom)
• This can be done by press and hold
mouse pointer on respective layer.
• Toggle the tick box on (only for Tick
4,3,2) mark
• Press ok
MRS Lab, CSRE, IIT Bombay 9
Setting parameters
• Input layers parameter now show
3 elements selected.
• Set Nodata value = 0 (to avoid
black colour around the actual
data)
• Leave rest as default.
• Press run.
• By default it will save to a
temporary file (parameter-virtual )
MRS Lab, CSRE, IIT Bombay 10
FCC
• Follow same procedure ads
in previous slides with a
band combination of 5,4,3
(top to bottom direction).
• Upon completion, it will be
added to layers panel with
name virtual
TCC FCC
Use wheel of mouse for
zoom in and zoom out
MRS Lab, CSRE, IIT Bombay 11
Making a subset of raster data
• Goto Raster→ Extraction→ Clip Raster
by Extent.
• Input layer=any desired layer (to be
clipped)
• Clipping Extent = Use Canvas Extent (You
can explore other options also)
How make Canvas extent Zoom IIT
Bombay
area. Use
wheel of
mouse. It
is
consider
as canvas
MRS Lab, CSRE, IIT Bombay 12
Press run
MRS Lab, CSRE, IIT Bombay 13
Canvas
extent
To save the data to disk: right click on the Clipped layer→ export→save as → provide file path and name→ save.
MRS Lab, CSRE, IIT Bombay 14
Adding basemap
• Goto main menu Web→
QuickMapServices→ OSM→ OSM
Standard
• OSM standard layer will be added to
layers panel
MRS Lab, CSRE, IIT Bombay 15
Adding Google Maps to QGIS
You can google search how to add
Adding google satellite basemap
• Goto Browser panel→XYZ Tiles→ right click
→ New connection
• Name=any custom name (Gmap_satellite)
• URL =
https://mt1.google.com/vt/lyrs=r&x={x}&y={y Copy and
}&z={z} paste
• Add by double click on the added XYZ Tile
(Here: Gmap_satellite)
MRS Lab, CSRE, IIT Bombay 16
Overlay on Google map
MRS Lab, CSRE, IIT Bombay 17
Adding Google Satellite Map
https://www.youtube.com/watch?v=M_
w8IEADIo0&feature=emb_rel_err
https://gis.stackexchange.com/ques
tions/20191/adding-basemaps-
from-google-or-bing-in-qgis
Adding google satellite basemap xyz
• Goto Browser panel→XYZ Tiles→ right click
→ New connection
• Name=any custom name (Gmap_satellite)
• URL =
https://mt1.google.com/vt/lyrs=s&x={x}&y={y Copy and
}&z={z} paste
• Add by double click on the added XYZ Tile
(Here: Gmap_satellite)
MRS Lab, CSRE, IIT Bombay 18
Overlay on Google Earth map
MRS Lab, CSRE, IIT Bombay 19
Using MapSwipe plugin
• Select the layer to be swiped
(usually upper most layer)
• Goto MapSwipe Tool
• Start exploring the differences of
both the layers
• You can use either horizontal or
vertical swipe depending on
mouse pointer movement.
MRS Lab, CSRE, IIT Bombay 20