GIS
GIS
QGIS, formerly known as Quantum GIS (until 2013), is a powerful, free, and open-source
desktop Geographic Information System (GIS) application that works across multiple
platforms. It is designed to facilitate the viewing, editing, and analysis of geospatial data.
As a versatile GIS tool, QGIS allows users to manage spatial information, create detailed
maps, and export them. The software supports both raster and vector data types, with
vector data represented through points, lines, or polygons. QGIS also enables the
coverages, personal geodatabases, DXF files, MapInfo formats, and PostGIS databases.
It also integrates well with web services like Web Map Service (WMS) and Web Feature
4
QGIS supports shape files, coverages, personal geodatabases, dxf, MapInfo,
PostGIS, and other formats. Web services, including Web Map Service and Web
Feature Service, are also supported to allow use of data from external sources.
Function:
Layers
QGIS can display multiple layers containing different sources or depictions of sources.
Preparing maps
In order to prepare printed map with QGIS, Print Layout is used. It can be used for
5
EXPERIMENT 1
TASKS:
6
4. Create a dataset using Google Earth Pro.
1. What is QGIS?
Geographic information systems (GIS) are used in a wide range of academic and
applied fields. Simply put, GIS allows you to combine tabular data (e.g.
spreadsheet sheet) with geographic boundaries (e.g. maps). QGIS (or Quantum
Mac OS X, and Linux. If you have used ArcGIS before, QGIS is very similar, except
7
COMPONENTS OF THE INTERFACE
8
2. Toolbars: Buttons that provide one click access to many of the features
and functions found in the Main Menu. Toolbars are movable and can be
docked or free floating. You can also customize what toolbars to show
3. Browser Panel: Shows a listing of files on your computer. You can drag
and drop GIS files into the Layers Panel (4) to view them.
4. Layers Panel: Shows a listing of map layers and data files that are in
your current project. Layers can be turned off and on, change drawing
5. Map Display Panel: Shows a geographic display of GIS layers in the Layers panel.
6. Status Bar: Shows the current scale of the map display, coordinates of
the current mouse cursor position, and the coordinate reference system
(CRS) of the project. For now, we won’t worry too much about this bar.
9
A. Coordinate Reference Systems
A CRS ensures that the map data aligns correctly with real-world geographic
10
latitude and longitude that specifies the angle between any point
and the equator, and the angle between any point and the prime
meridian. A GCS defines where the data is located on the earth’s surface.
and vertical position. A PCS tells the data how to draw on flat Surface, like
11
Bringing in a shapefile and layers. PROCEDURE:
3. Go to browser panel.
4. Search for shape file that is saved in particular folder with extension (.shp)
browser panel
12
Fig 1.4 Shapefile in map display panel.
13
5. Go to toolbar and select option Select feature .
6. Now select the particular area on the map. The colour of selected feature will
change.
7. Now go to LAYER panel and select the file and right click on the mouse.
14
clicking at browser option.
10. Now choose coordinate system in CRS by clicking on world button: Type
coordinate system.
15
Fig 1.6 Selecting coordinate system for a selected feature in Coordinate
16
Fig 1.7 Information of the feature in layer properties dialogue box.
17
WORK: Re-project the entire world map layer into World_Mercator projection system
RESULT:
Conclusion:
18
feature, whichever you want.
19
B. DIGITISING MAP DATA
PROCEDURE:
1. Open new Project and import new PNG file from Browser Panel by double
clicking it.
and click on layer> Create Layer> New Shapefile Layer. A dialogue box
will appear.
3. Type the file name and Choose GEOMETRY TYPE: POINT, POLYGON or LINE
5. Fill the Name in NEW FIELD (Ex. POINT). Then Click on ADD TO FIELD LIST
20
Fig 1.9 New shapefile layer dialogue box.
8. Mark the Point on the map and Fill ID NO. and POINT name (eg. IT BUILDING).
9. To save the POINT click on TOGGLE EDITING again and dialogue box
21
3. LINE/POLYGON: Keep choosing the points continuously and right
22
OUTPUT:
23
Fig 1.12 Line
24
CONCLUSION: Coordinates from a map, image or other sources of data are
converted into a digital format. The Converted data can be stored as POINT, LINE
Point geometries are made up of a single vertex (X,Y and optionally Z).
line.
enclosed area. The first and last vertices are always in the same place.
25
Most GIS applications do not allow you to mix more than one geometry
application.
Vector data can be used for spatial analysis in a GIS application, for
26
C. Creating dataset Using Google Earth Pro
PROCEDURE:
4. Fill the NAME in the dialogue box and place the PIN at desired place. Click OK
6. Fill the NAME in the dialogue box and select the points of particular area u
27
7. Go to PLACES PANEL and choose the PIN file and right click> Save place
as, to save it. Save the file in .kml extension. Similarly save Polygon file
(.kml)
10. Go to MAIN MENU bar and click on LAYERS> ADD VECTOR LAYER.
11. Data source manager dialogue box will appear and then browse the .kml
file that u have saved and double click on ADD. Layers will be shown in
layer panel.
12. Go to BROWSER PANEL and click on XYZ TILES> OPEN STREET MAP.
Similarly u can right click XYZ TILES>new connection and add URL to add
more layers.
28
OUTPUT:
Fig 1.14 Import of Google earth pro file (.kml) in QGIS software.
CONCLUSION: Using GOOGLE EARTH PRO we can get the exact location,
longitude &
29
latitude of the particular area and we can plot those layers to QGIS software to
30
EXPERIMENT 2
OBJECTIVE: To stack images from various bands and prepare a map using remote
sensing data.
PROCEDURE:
2. Import the image file into the Browser Panel by double-clicking it.
31
Fig 2.1 Image file (.png) in Map display panel.
1. Go to LAYER PANEL and right click on the layer and click on the properties.
2. Click on SYMBOLOGY.
32
Fig 2.2 Layer property dialogue box- Symbology of the image file.
4. Now set;
5. Now set;
33
BLUE BAND to NOT SET.
6. Now set;
7. Now set;
34
OUTPUT:
(GREEN).
35
36
Fig 2.6 EFFECT OF RED, GREEN & BLUE BAND WHEN: RED BAND SET TO BAND
3 (BLUE), GREEN BAND SET TO BAND 2 (GREEN) & BLUE BAND SET TO BAND 1
(RED)
CONCLUSION:
37
By manipulating the bands, you can analyze specific characteristics of the map. Each
band highlights different features, allowing for a better understanding of the area being
studied.
38
SOFTWARE EXPERIMENTS ON
QGIS
39
EXPERIMENT-3
(SCP)
Objective:
multispectral images.
Overview:
materials or land cover types in the image based on spectral signatures. The goal is to
Study Area:
PROCEDURE:
1. Start QGIS and the SCP. Open the tab Download products clicking the
40
2. In the tab Download products click the button to display the OpenStreetMap tiles.
3. Search for specific image acquired on 7 July 2020 because it is cloud free.
4. Choose the area coordinates clicking the button , then left click in the map
for the UL point and right click in the map for the LR point.
• to: 2020-07-07
41
FIG 3. 1: OPEN STREET MAP VIEW OF Madurai (Tamil Nadu, India).
42
6. Now click the button Find and after a few seconds the image will be
that is useful for assessing the quality of the image and the cloud cover.
7. Now click the button to load the preview in the map. We can also select
the tab Download options and check only the Sentinel-2 bands (2, 3, 4, 5, 6, 7,
8, 8A, 11, 12 and the ancillary data. Uncheck the option Preprocess images.
43
8. To start the image download, click the button RUN and select a
directory where bands are saved. After the download, all the bands are
2.
44
FIG 3.4: VARIOUS BANDS UPLOADED IN LAYER PANEL.
45
CLIP THE DATA:
9. Open the tab Band set clicking the button in the SCP menu or the SCP dock.
Click the button to refresh the layer list, and select the bands: 2, 3, 4, 5, 6,
7, 8, 8A, 11, and 12; then click to add selected rasters to the Band set 1.
10. In Preprocessing open the tab Clip multiple raster’s. We are going to clip the
11. Click the button and select an area such as the following image (left click
in the map for the UL point and right click in the map for the LR point).
12. Click the button RUN and select a directory where clipped bands are saved.
New files will be created with the file name prefix defined in Output name
46
prefix. When the process is completed, clipped rasters are loaded and
displayed.
47
PREPROCESS THE DATA:
13. In order to convert bands to reflectance, open the Preprocessing clicking the
14. Click the button Directory containing Sentinel-2 bands and select the
in the table Metadata. Ignore Select metadata file because this conversion
require the DOS1 Correction; if it was a Level 1C image we should enable the
for the entire image (before clipping the image) in order to improve the calculation
For the purpose of this experiment, uncheck the option Create Band set and
use Band set tools because we are going to define this in the following step Define
15. Click the button RUN and select the directory where converted bands are
saved. After a few minutes, converted bands are loaded and displayed (file
48
Classification process settings, a sound is played when the process is finished.
We can remove all the bands loaded in QGIS layers except the ones whose name begin
with RT_.
49
Define the Band set and create the Training Input File
16. Open the tab Band set clicking the button in the SCP menu.
17. In Band set definition click the button to clear all the bands from active
18. Click the refresh button to refresh the layer list, and select all the converted
bands; then click to add selected rasters to the Band set. In the table Band set
definition order the band names in ascending order (click to sort bands by
name automatically).
19. Finally, select Sentinel-2 from the list Wavelength quick settings, in order to
set automatically the Center wavelength of each band and the Wavelength unit
20. We can display a Color Composite of bands: Near-Infrared, Red, and Green: in
the Working toolbar, click the list RGB= and select the item 7-3-2
(corresponding to the band numbers in Band set. You can see that image
colors in the map change according to the selected bands, and vegetation is
highlighted in red (if the item 3-2-1 was selected, natural colors would be
displayed).
TIP : If a Band set is defined, a temporary virtual raster (named Virtual Band Set
50
order to speed up the visualization, you can show only the virtual raster and hide
51
FIG 3.9: Color composite RGB=7-3-2.
21. In the SCP dock select the tab Training input and click the button to create
the Training input (define a name such as training.scp). The path of the file is
displayed and a vector is added to QGIS layers with the same name as the
Training input (in order to prevent data loss, you should not edit this layer using
QGIS functions).
We are going to create ROIs defining the Classes and Macroclasses. Each ROI is
identified by a Class ID (i.e. C ID), and each ROI is assigned to a land cover class
through a Macroclass ID (i.e. MC ID). We are going to use the Macroclass IDs
defined as follows.
52
Macroclass name & Macroclass ID: Water-1, Built-up-2, Vegetation-
22. In the map zoom over the dark blue area in the lower left corner of the image
which is a water body. To manually create a ROI inside the dark area, click the
button in the Working toolbar. Left click on the map to define the ROI
vertices and right click to define the last vertex closing the polygon. An orange
TIP : You can draw temporary polygons (the previous one will be overridden) until
the shape covers the intended area. If the shape of the temporary polygon is good
23. Open the Training input to define the Classes and Macroclasses. In the ROI &
Signature list set MC ID = 1 and MC Name = Water; also set C ID = 1 and C Name
= Lake.
53
24. Now click to save the ROI in the Training input. After a few seconds, the ROI
is listed in the ROI & Signature list and the spectral signature is calculated
(because Signature is checked). As you can see, the C ID in ROI & Signature list
map and the temporary ROI is removed. Also, in the ROI & Signature list you
can notice that the Type is RS, meaning that the ROI spectral signature was
25. Now we are going to create a second ROI for the built-up class using the
automatic region growing algorithm. Zoom in the upper region of the image. In
Working toolbar set the Dist value to 0.05 . Click the button in the Working
toolbar and click over the light blue area of the map. After a while the orange
54
semi-transparent polygon is displayed over the image.
TIP : Dist value should be set according to the range of pixel values; in general,
55
In the ROI & Signature list set MC ID = 2 and MC Name = Built-up ; also set C ID =
After clicking the button in the Working toolbar you should notice that the
cursor in the map displays a value changing over the image. This is the NDVI
value of the pixel beneath the cursor (NDVI is displayed because the function
Display is checked in ROI options). The NDVI value can be useful for
identifying spectrally pure pixels, in fact vegetation has higher NDVI values
than soil.
26. For instance, move the mouse over a vegetation area and left click to create
a ROI when you see a local maximum value. This way, the created ROI and the
vegetation.
Create a ROI for the class Vegetation (red pixels in color composite RGB=7-
3-2) and a ROI for the class Soil (bare soil or low vegetation) (yellow pixels
56
FIG 3.12: A TEMPORARY ROI FOR VEGETATION AND SOIL, CREATED MANUALLY.
One can simply assess spectral signature similarity by displaying a signature plot.
In order to display the signature plot, in the ROI & Signature list (page 24) highlight
27. Click the button in SCP Dock where ROI’s are listed. The Spectral Signature
28. Move and zoom inside the Plot to see if signatures are similar (i.e. very close).
Double click the color in the Plot Signature list to change the line color in the
plot.
57
FIG 3.13: SPECTRAL PLOT.
Before running a classification (or a preview), set the color of land cover classes
29. In the ROI & Signature list, double click the color (in the column Color) of each
ROI to choose a representative color of each class. Also, we need to set the
58
30. Now we need to select the classification algorithm. In this experiment we are
31. Open the tool Classification to set the use of classes or macroclasses. Check
Use C ID and in Algorithm select the Spectral Angle Mapping. The input
band set is 1 because it is the number of the band set containing the image
TIP : Change frequently the Color Composite in order to clearly identify the
materials at the ground; use the mouse wheel on the list RGB= of the Working
toolbar for changing the color composite rapidly; also use the buttons and
59
FIG 3.14: DEFINITION OF CLASS COLOURS.
60
FIG 3.15: SETTING THE ALGORITHM AND USING C ID.
61
32. In Classification preview set Size = 300; click the button and then left click
a point of the image in the map. The classification process should be rapid, and
Classification preview. We can see that now there are only 4 colors
TIP : When loading a previously saved QGIS project, a message could ask to
handle missing layers, which are temporary layers that SCP creates during each
session and are deleted afterwards; you can click Cancel and ignore these layers;
also, you can delete these temporary layers clicking the button in Working
toolbar.
62
Fig 3.16: CLASSIFICATION PREVIEW DISPLAYED OVER THE IMAGE USING C ID
35. In the Classification output click the button and define the path of the
classification output, which is a raster file (.tif). If Play sound when finished
process is finished.
63
RESULT:
CONCLUSION:
With the aid of Semi-Automatic Classification Plugin, the classification of the area
1. Water;
2. Built-up;
64
3. Vegetation;
4. Soil.
In the Spectral plot we can see the line of each signature (with the color defined
in the ROI & Signature list), and the spectral range (minimum and maximum) of
each band (i.e. the semi- transparent area colored like the signature line). The
deviation, and therefore the heterogeneity of pixels that composed that signature.
signatures (for more information see Spectral Distance). Highlight two or more
spectral signatures with click in the table Plot Signature list, then click the button;
distances will be calculated for each pair of signatures. Now open the tab Spectral
considered algorithm.
65
EXPERIMENT-4
definition and consequently the user must assign a land cover label to each class.
not necessarily represent a particular land cover type and additional processing
66
could be required for producing an accurate classification.
The study area of this experiment is Madurai (Tamil Nadu, India) which is a city in
PROCEDURE:
Preprocessing, clicking the button in the SCP menu and select the tab
Sentinel-2.
3. Click the button Directory containing Sentinel-2 bands and select the
table Metadata. You can ignore Select metadata file because this conversion
4. Check the option Create Band set and use Band set tools in order to create
67
automatically the input Band set that will be used for clustering.
5. To start the conversion process, click the button RUN and select the
directory where converted bands are saved. After a few minutes, converted
bands are loaded and displayed (file name beginning with RT_).
6. Open the tab Band set clicking the button in the SCP menu. The bands are
68
Fig 4.1: CONVERTED BANDS.
CLUSTERING
69
Clustering requires the user to define the number of clusters (i.e. classes)
seeds). During the first iteration clusters are produced calculating the pixel
spectral distance with initial spectral signatures. Pixels are assigned according to
the most similar spectral signature, therefore producing clusters. In this tutorial
we are going to perform clustering using the ISODATA algorithm, which includes
steps for merging clusters having similar spectral signatures and splitting
clusters having too high variability. We are going to select randomly the starting
spectral signatures and use the algorithm Euclidean Distance for distance
calculation.
70
7. Open the tab Clustering clicking the button in the SCP menu.
8. In Select input band set , we set 1 because we are going to classify the
first Band set. In Method check ISODATA. In Distance threshold set 0.01,
In Number of classes set 10; we set a number higher than the land cover
general, the more the iterations the better the result. In ISODATA max
splitting a class; we can set the value 0.2 here. In ISODATA minimum class
9. We check the option Use random seed signatures to randomly selects the
10. Now click the button RUN and define the path of the classification output.
71
Fig 4.3: CLUSTERING TOOL.
11. After the process, the result is displayed in the map. The result of the
the class IDs defined at the beginning of this tutorial. The number of classes
72
Fig 4.4: RESULT OF CLUSTERING.
We must identify the correspondence between raster classes and the land cover
Composite of bands: Near-Infrared, Red, and Green: in the Working toolbar, click
the list RGB= and select the item 7- 3-2 (corresponding to the band numbers in
Band set). You can see that image colors in the map change according to the
selected bands, and vegetation is highlighted in red (if the item 3-2-1 was selected,
73
Fig 4.5: COLOR COMPOSITE RGB=7-3-2.
74
Now we can reclassify the output raster according to out classification system.
12. Open the tool Reclassification (page 90) clicking the button in the SCP
the classification and fill the reclassification table. In New value set the
14. When the table is complete, click the button RUN and define the path of
15. After the process, the raster is added to the map. We can define a symbology
according to our classes. By clicking the band in layer panel and then click
16. For reducing those errors we could repeat the clustering step increasing the
Number of classes, reducing the value ISODATA max standard deviation, and
The classification could contain small patches of pixels that we would like to
remove from the classification result. We can use the tool Classification sieve
(page 85) to remove small patches of isolated pixel replacing them with the value
75
of the largest neighbor patch.
17. Open the tool Classification sieve clicking the button in the SCP menu.
18. In Select the classification select the raster reclassified in the previous
step (click Refresh button to refresh the layer list if the classification is not
listed). In Size threshold enter 2 to set the maximum size of the patch to be
replaced (in pixel unit); all patches smaller than the selected number of pixels
will be replaced by the value of the largest neighbor patch. Setting the value 2
76
Fig 4.7: RECLASSIFICATION RASTER.
77
Fig 4.8: SIEVE TOOL.
20. Now click the button RUN and define the path of the classification output.
After the process, the raster is added to the map. We should see that single
cleaner classification.
78
RESULT:
CONCLUSION:
training input is required, producing classes (i.e. clusters) that have no definition
and consequently the user must assign a land cover label to each class.
With the aid of Semi-Automatic Classification Plugin, the classification of the area
79
is done to identify the following land cover classes:
1. Water;
2. Built-up;
3. Vegetation;
4. Soil.
80