0% found this document useful (0 votes)
15 views158 pages

New Gis Practical - Sujal

The document is a certificate for a student who completed practical work in 'Fundamentals of GIS' as part of their B.Sc. IT curriculum at Smt. Sushiladevi Deshmukh College. It includes an index of practical exercises covering topics such as QGIS installation, vector and raster data management, and map creation. Detailed procedures for using QGIS software and performing various GIS tasks are also provided.

Uploaded by

nanawareritesh7
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)
15 views158 pages

New Gis Practical - Sujal

The document is a certificate for a student who completed practical work in 'Fundamentals of GIS' as part of their B.Sc. IT curriculum at Smt. Sushiladevi Deshmukh College. It includes an index of practical exercises covering topics such as QGIS installation, vector and raster data management, and map creation. Detailed procedures for using QGIS software and performing various GIS tasks are also provided.

Uploaded by

nanawareritesh7
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/ 158

Smt.

Sushiladevi Deshmukh College of Art’s, Science & Commerce


(Affiliated to University of Mumbai)
Sector - 04, Airoli, Navi Mumbai-400708
NAAC Accredited

Date : - ____________
Certificate
This is to certify that Mr. / Miss
Roll No. of B.Sc. IT Semester VI has successfully completed all the Practical
Work in the Subject of “Fundamentals of GIS” during the academic year 2024-2025
under the guidance of Mrs. Soni Yadav being the partial requirement for the
fulfilment of the curriculum of Degree of Bachelor of Science in Information
Technology Practical Exam.

Signature of Internal Guide Signature of HOD

Signature of External Examiner Signature of Principal

College Seal
INDEX
Sr No
Practical Remark

Familiarizing Quantum GIS: Installation of


1 QGIS, datasets for both Vector and Raster
data, Maps.

Creating and Managing Vector Data: Adding


2 vector layers, setting properties, formatting,
calculating line lengths and statistics

Exploring and Managing Raster data: Adding


3 raster layers, raster styling and analysis,
raster mosaicking and clipping.
Making a Map, Working with Attributes,
Importing Spreadsheets or CSV files Using
4
Plugins, Searching and Downloading
OpenStreetMap Data.

5 Working with attributes, terrain Data.

6 Working with Projections and WMS Data.

Georeferencing Topo Sheets and Scanned


7 Maps, Georeferencing Aerial Imagery
Digitizing Map Data.

Managing Data Tables and Saptial data Sets:


8 Table joins, spatial joins, points in polygon
analysis, performing spatial queries.
Practical 1 : Familiarizing Quantum GIS: Installation of QGIS, datasets for both
Vector and Raster data, Maps.
QGIS: Quantum Geographic Information System.

It is Open source software for creating and editing GIS data. It is supported by many platforms. QGIS
provides us the tool which we can use to perform various calculation, analytical, statistical, etc.
operations on our data.

Vector Datasets: Vector dataset are created using vertices and edges. Vector dataset has 3 basic types of
data point, line and polygon. Vector dataset doesn’t have grid or pixels.

Raster Dataset: Unlike vector dataset it is completely based on grid and pixels.

Map: Map are the representation of the real world places with their attributes. Map is a visual database
for the real world places. Maps are mostly static but now digitization led us to create more dynamic and
interactive maps. Example Google map, here map, etc.

Installation of QGIS
Step By step procedure
1) Create a folder on your D:/ drive on your computer called QGISlab by right clicking
on the D: drive and navigating down to the New / Folder.
2) Go to the QGIS download page and download the latest 64bit version of QGIS for
windows which is QGIS 3.4 'Madeira’ by clicking once.
3) If you have a 32 bit machine or using another operating system search the bottom of
the page for your operating system and download the correct operating system version
of QGIS. http://www.qgis.org/en/site/forusers/download.html

1
4) You browser will download the file to the browsers default download directory. By
pressing the control key and the letter J at the same time a popup window will show
you the folder where the QGIS file has been downloaded. The QGIS file will be
called:
QGIS-OSGeo4W-3.4.2-1-Setup-x86.exe
5) Move or copy the above file to your C:/QGISlab folder and double click on the file.
You will get a popup window with a security warning.
6) Hit the run button to start the installation process and follow the prompts. There is no
need to install the data sets suggested by QGIS.

7) From the above window, click Next button and continue with the installation.

2
8) Please go through the license agreement and click on the button> I agree and proceed
with the installation as shown in the screen.
9) As the software is very heavy it is advisable to install it in the different drive other
than the windows drive. As per our example, we will be installing in QGIS folder on
D:\ drive.

3
10) After browsing the folder click the Next button and proceed with the installation as
shown in above figure.
11) By default QGIS component is selected. Do not install any other data set at this point.
Click Install to proceed with installation.

12) You will see the progress of the installation on the screen.

4
13) Please reboot your machine once the installation is completed. Click finish to
complete the installation.

14) After machine is restarted, type QGIS on Run and open QGIS Desktop 3.4.2.

5
15) It will open a new wizard for the first time after installation as shown in the figure
below.

16) Select I want a clean start. Don’t import my QGIs 2 settings and click on let’s get
started button. You will be redirected now to the home screen of QGIS Desktop.

6
Understanding QGIS Desktop Environment.

Quantum GIS interfaces change from one project to another depending on the required
interface of the project. Below are the basic menus that you will encounter in Quantum GIS
during the practicals.
1. Title of the Project - Shows the title of project that you are going to view.
2. Menu Bar – This provides access to various Quantum GIS features using a standard
hierarchical menu.
3. Toolbars – These provide access to most of the same functions as the menus, plus
additional tools for interacting with the map. It shows the command for zoom in, zoom
out, pan, back to original view, go back to previous extent, go to next extent, object-
information, coordinate read-out, measure, print and help.
4. Table of Contents/Map Legend (TOC) - Shows the layers that can be turned on or off
and the legend, attributes symbols and query symbols available for the corresponding
project.
5. Display Window - Shows the feature/s that you have turn on from the TOC.
6. Status Bar - Shows you your current position in map coordinates (e.g. metres or decimal
degrees) as the mouse pointer is moved across the map view. To the left of the
coordinate display in the status bar is a small button that will toggle between showing
coordinate position or the view extents of the map view as you pan and zoom in and out.
7. Data sources browser – In previous versions, QGIS browser was only provided as an
external application which enables us to explore our spatial data sets. In QGIS 2.0.1-
Dufour this application is also integrated in the QGIS framework as an additional panel
just below the Table of Contents.

7
Quantum GIS toolbars and some other components
Toolbars are divided by thematic (greyed icons means they are inactive because the
appropriate conditions to use them are not fulfilled). Some of them are included by
default in QGIS and others can be added/removed from the interface:

Key functions:
Here, you will learn how to QGIS‟ different mapping tools and other components that
you‟ll be using in this practical.

8
9
Practical 2 : Creating and Managing Vector Data: Adding vector layers, setting
properties, formatting, calculating line lengths and statistics.

Procedure:
a. Adding vector layers (Polygon, Line, Points)
 Polygon layers (We have taken 2 layers Matunga, Garden)
 Line layers (We have taken 3 layers Small_Roads, Road, Flyover)
 Point layers (We have taken 4 layers bank,college,Restaurants,ATM)
b. Setting properties (Labeling, Symbolism)

 Our aim is to create map representing a location and its


surrounding as follows:

10
a) Creating Polygon vector layer
 Select Project→New


 Select Layer→Create Layer→New Shapefile Layer 


 Following dialog box will appear on the screen. Select Polygon option from
Geometry type.

 Fill the appropriate information in each text box.


 File name :
 By default the file will be saved in bin folder.

11
 To avoid it click on following button to change the location of file.

 Field Panel
a. Add the Attribute you want to show. (Column Name for Table)
b. Specify Type (DataType:Text Data/Decimal Data/Whole Number/Date) of
Attribute
c. Specify the Length of the Attribute. Specify Precision (If Data Type is Decimal)

12
 Click on Add to Field List Button.
 You can add as many fields (Column Name) as you want for the layer.

 Select Geometry Type as follows


 Click on the following button

13
 The CRS dialog box will appear on screen. Click on the WGS84 option and it will
be selected as follows. click on OK.

a) Follow the steps to plot Polygon features.


 Select the Polygon Feature( In our case it is Matunga for background) from layer
panel



 Click Toggle Editing Button → Click on Add Polygon →Now
place the cursorat the location where you want to place the polygon. for
polygon layer minimum 3 points should be selected.

14

 Save the newly added polygon as follows.

 Set style for polygon by using property window(Right click on Matunga Layer)

15
 Following screen will appear on the screen. Select pattern as you want and click on
OK.


 Same way we can add one more polygon layer for Gardens.

16
b) Creating Line vector layer
 Repeat the same steps as we have done for polygon layer.
 Select geometry type Line.

 Road layer :
 To plot road click on Add Line Feature.

 Click on the map where you want to draw line.

17
 Once you are done then right click on map (Dotted line turn into solid line)

 save your data.

18
 set style for Roads in the same way as we have done for polygon

19
 Road will look as below

 To label your roads Right click on Road layer .Go to properties window then
select label and set single label property.

20
 Following window will appear on the screen

 Roads will look like these

 To merge roads
 Go to properties of road then select symbology. Click on Advanced
button select Symbol levels.

21
 Check Enable symbol levels option.

 Click ok & Road will appear as follows

22
c) Create Point vector layer
 Repeat same steps to add point layers as we have done in
previous layers.(For ATM, Restaurants, Banks, Bus Stops etc)

Final output:

23
d) Calculating line lengths and statistics
 Go to Layer  Add Layer  Add Vector Layer
 Add the following file to project

"\GIS_Workshop\Practicals\Practical_01\D\DATA\IND_rrd\IND_
rails.shp" Press “ADD”
 Also add India Administrative Map
“GIS_Workshop\Practicals\Practical_01\D\DATA\IND_adm\IND_a
dm0.shp”
 Double Click on IND_adm0

Select  Select any outline style from below given options.

 Press OK
The display window will appear like

24
 In Layer Pane, Right click on IND_rails  Open Attribute Table

Press Toggle Editing button using button, on Attribute table window toolbar.

25
 Press Open Field Calculator using button.
 Set the output field as “Track_Len”, field type to “Decimal Number”.

 From Function List search $length or go to Geometry  Select $length

Set expression as

Press “OK”
 A new column is added to the attribute table with value representing the length of
track in KM.

26
 Press CTRL+S or click on Save Edits option on tool bar
 Close the attribute table window.
 For calculating the total length of Railway tracks in India.
 Select Vector Analysis Tools Basic Statics for Fields

 Select IND_rails layer from input layer. And select Track_Len in “Field to
Calculate statistics on”

Press RUN

27
 The Result is

 Open the “output.html” file to get the field


statistics. Analyzed field: Track_Len
Count: 2012
Unique values:
1608 NULL
(missing)
values: 0
Minimum value:
0.0
Maximum value: 400.48
Range: 400.48
Sum: 60479.320000000014
Mean value: 30.059304174950306
Median value: 14.04
Standard deviation:
39.483220276624444 Coefficient of
Variation: 1.313510786770889
Minority (rarest occurring value):
0.03 Majority (most frequently
occurring value): 0.0 First quartile:
3.35
Third quartile:
42.855000000000004
Interquartile Range (IQR):
39.505
The above statistics show that the total length of Railway track in India is 60,479.32
KM.

28
Practical 3 : Exploring and Managing Raster data: Adding raster layers, raster
styling and analysis, raster mosaicking and clipping.

a) Adding raster layers

Exploring and Managing Raster data:


From menu bar select Layer Add Layer Add Raster Layer

Select Gridded Population of the World (GPW) v3 dataset from Columbia University, Population
Density Grid for the entire globe in ASCII format and for the year 1990 and 2000.

“\GIS_Workshop\Practicals\Practical_02\A\Data\gl_gpwv3_pdens_90_ascii_one\glds90ag60.asc”
“\GIS_Workshop\Practicals\Practical_02\A\Data\gl_gpwv3_pdens_90_ascii_one\glds00ag60.asc”
Go to Project Properties OR Press the Set CRS option on bottom right corner.

Select WGS 84 EPSG: 4326 and Press OK

29
b) Raster Styling and Analysis

➢ To start with analysis of population data, convert the pixel from grayscale to Color .

➢ Select “glds90ag60.asc” Layer form layer Pane select property OR double click on it.

➢ Select

➢ Press “APPLY”
➢ Repeat the same for “glds00ag60.asc” Layer

30
Layer output after applying style.
➢ The objective this experiment is to analyze raster data, as an example we will find areas with
largest population change between 1990 and 2000, by calculating the difference between each pixel
values.
➢ Go to Raster → Raster Calculator

➢ Put the expression "glds00ag60@1" - "glds90ag60@1"


➢ Select the output file location & name and Press OK.

31
Remove the other two layers i.e. glds00ag60.asc and glds90ag60.asc
➢ Double click on pop_diff layer.

➢ Select

Set Render Type to “Single band Pseudo color”, Interpolation as Discrete, and remove all
classification and add as shown in figure above using button. After all settings press “OK”.
➢ Layer will appear like

Explore an area of your choice and check the raster band value using to verify the classification rule.
➢ The red pixel shows negative changes and blue shows positive changes. 

32
c) Raster Mosaicking and Clipping

A mosaic is a combination or merge of two or more images.


In GIS, a single raster dataset can be created from multiple raster datasets by mosaicking them
together.

In many cases, there will be some overlap of the raster dataset edges that are being mosaicked
together, as shown below.

These overlapping areas can be handled in several ways; for example, you can choose to only keep
raster data from the first or last dataset, you can blend the overlapping cell values using a weight-
based algorithm, you can take the mean of the overlapping cell values, or you can take the
minimum or maximum value. When mosaicking discrete data, the First, Minimum, or Maximum
options give the most meaningful results. The Blend and Mean options are best suited for
continuous data. If any of the input rasters are floating point, the output is floating point. If all the
inputs are integer and First, Minimum, or Maximum is used, the output is integer.


➢ Go to Layer → Add Layer → Add Raster Layer.

33

➢ Select the following “.tif” raster images for India from data folder.
FAS_India1.2018349.terra.367.2km.tif
FAS_India2.2018349.terra.367.2km.tif
FAS_India3.2018349.terra.367.2km.tif
FAS_India4.2018349.terra.367.2km.tif


➢ Press open
➢ In data source manager | Raster window click Add.


➢ Go to Raster → Miscellaneous → Merge

34

➢ In the Merge dialog window


➢ Select all layers and Press OK.


➢ In Merge dialog window select a file name and location to save merged images.

35

➢ Save the file to “GIS_Workshop/Practicals/Practical_02/C/” location with the name as
Merge_Files.tif
➢ Press Run and after completion of operation close the Merge window dialog box.


➢ You can now deselect individual layers from layer pane and only keep the merged raster file.

➢ Go to Layer→ Add Vector Layer → Select


\GIS_Workshop\Practicals\Practical_02\C\IndiaAdminBoundry\IND_adm0.shp file.
➢ From layer properties → select → select any one of the following

➢ The result will be

36

➢ Go to Raster → Extraction → Clip Raster by Mask Layer

➢ Select the merge raster image as input and Ind_adm0 as mask layer.

➢ Select a file name and location for clipped raster as /Practical_02/C/Clipped_File.tif.

➢ Press RUN.

37
Practical 4 : Making a Map, Working with Attributes, Importing Spreadsheets or
CSV files Using Plugins, Searching and Downloading OpenStreetMap Data.

a) Making a Map

➢ Create a new Thematic Map or open and existing one


➢ Consider the following map as an example map

➢ Go to Project → New PrintLayout


➢ Insert a suitable title and press “OK”.

38

➢ A new Print Layout window will open


➢ Select Add Item → Add Map

39

➢ After adding map go to ItemProperties → Map1→ Layers
Check on Lock Layers and Lock Styles for Layers

This will ensure that if any change in layers or change their styles, the Print Layout view will not
change.
➢ Go to Add Item → Add Picture → Place a picture box at appropriate location.

40

➢ Also adjust Image Rotation to its appropriate value.
➢ Item Properties → Image Rotation


➢ Add an inset Using Add Item → Add Picture → Select an area to be highlighted on main Map.
➢ Set a frame for Inset by enabling the check box for Frame.


➢ To highlight the area shown in Inset
➢ Select the Picture representing main Map from Items pane.
➢ In Item Properties → Overviews → using icon add an overview.
➢ Select the checkbox Draw Overview
➢ Name the Picture object representing inset (Map1 in our case).

41
➢ The Print Layout will appear like

➢ Add Item → Add Label

42

➢ Change the Label text To “Mumbai Map”, Set appropriate font size and color using Item
Properties→ Main Properties.

➢ Add Item → Add Legend→ Place the legend indicator at appropriate location.
➢ Uncheck auto update and use suitable legend indicator label.

43
➢ The Print Layout will appear


➢ Add Item → Add Scale Bar


➢ Add Item → Add Label→Add a Label using HTML rendering

44
➢ A Map can be saved in Image or PDF using Layout → Export as Image / Export as PDF

➢ Save the Map to a location appropriate location as PDF or Image.

45
➢ Open the PDF or Image from location.

46
b) Importing Spreadsheets or CSV files

➢ Many times the GIS data comes in a table or an Excel spreadsheet or a list lat/long coordinates,
therefore it has to be imported in a GIS project.
➢ Sample file for Earthquake data will be used in this practical.
➢ Go to Layer → Add Layer → Add Delimited text Layer

➢ Data Source Manager | Delimited Text window will appear


➢ Select the \GIS_Workshop\Practicals\Practical_03\C\Sample.csv file from data folder.

47

➢ Press ADD and close the window.
➢ Output:

48
c) Using Plugins

➢ Core plugins are already part of the standard QGIS installation. To use these, just enable them.
➢ Open QGIS. Click on Plugins → Manage and Install Plugins....


➢ To enable a plugin, check on the checkbox next to Plugin. This will enable the plugin to use it.
➢ External plugins are available in the QGIS Plugins Repository and need to be installed by the users
before using them.
➢ Click on Not Installed or Install from ZIP.
➢ Once the plugin is downloaded and installed, you will see a confirmation dialog.
➢ Click on Plugins → <<new Plugin Name>>
➢ The Plugin if marked Experimental plugin can be installed, from Setting→ check on

or

➢A tab will be added to Plugin Manager Window.


➢ Click on a plugin name and Click Install.

49
d) Searching and Downloading OpenStreetMap Data

OpenStreetMap (OSM) created by Steve Coast in the UK in 2004 is a collaborative project to create
a free editable map of the world. Rather than the map itself, the data generated by the project is
considered its primary output. The creation and growth of OSM has been motivated by restrictions
on use or availability of map information across much of the world, and the advent of inexpensive
portable satellite navigation devices.
➢ Add “Open Layer” and “OSM Search” Plugin from Not Installed option from Plugin Manager
Dialog Box.
➢ The OSM Place Search plugin will install itself as a Panel in QGIS, if not go to View → Panels →
select OSM Place Search.

➢ Go to Web → OpenLayer Plugin and select Open Street Map

➢ A World map will appear on screen.


➢ If an error occurs in loading maps, go to project properties → CRS →

50

➢ In OSM Place search Pane → Enter Mumbai or any place name to search

➢ Double click on the desired place in OSM Place search Panel or Click and press

Output:

51
Practical 5 : Working with attributes, terrain Data.
A. Working with attributes
➢ Start a new project.
➢ Go to Layer → Add Layer → Add Vector Layer
➢ Select
“\GIS_Workshop\Practicals\Practical_04\A\Data\ne_10m_populated_places_simple.zip”

➢ Right click on Layer in Layer Panel → Open Attribute Table.


➢ Explore various attributes and their values in the Attribute table.
➢ To find the Place with maximum population click on “pop_max” file

➢ On clicking the Select feature using expression button the following window will appear.

➢ Enter pop_max>100 and pop_max<10000 and click button to get all the places with
population between 100 and 10000.

52
➢ The places matching the criteria will appear in different color.

➢ Different queries can be performed using the dataset.


➢ Try this

Will give

➢ Use the deselect button to deselect the feature to be rendered in original color.

53
b) Terrain Data and Hill shade analysis
A terrain dataset is a multiresolution, TIN-based surface built from measurements stored as features
in a geodatabase. Terrain or elevation data is useful for many GIS Analysis like, to generate various
products from elevation data such as contours, hillshade etc.

https://www.google.com/maps/@27.9857765,86.9285378,14.75z/data=!5m1!1e4?hl=en-US
➢ Go to Layer → Add Raster Layer → select “10n060e_20101117_gmted_mea300.tif”, from Data
folder

54

➢ The Lower altitude regions are shown using dark color and higher using light shade as seen on top
region containing Himalaya and Mt Everest.
➢ Mt. Everest - is located at the coordinates 27.9881° N, 86.9253° E.
➢ Enter 86.92, 27.98 in the coordinate field, Scale 900000 and Magnifier 100% at the bottom of
QGIS.


➢ Press enter the view port will be centered on Himalaya Region.

➢ Crop the raster layer only for the region under study.
➢ Go to Raster → Extraction→ Clip Raster by Extent

55

➢ Select the raster layer (if project contains multiple layers).
➢ Select the clipping area by selecting the option Use Canvas Extends if the visible part of map is to
be selected or manually select an area on canvas by using Select Extent on Canvas.
➢ Select the location and file name for storing clipped raster layer.

➢ Press RUN.
➢ Deselect the original layer and keep the clipped one.
➢ The Clipped raster layer is representing altitude are from 103 Meters.

Original Raster Clipped Raster


➢ Counter lines are the lines on a map joining points of equal height above or below sea level. A
contour interval in surveying is the vertical distance or the difference in the elevation between the
two contour lines in a topographical map.
➢ To derive counter lines from given raster.
➢ Go to Raster → Extraction→ Contour

56
➢ The Contour configuration window will appear



➢ Select the input raster layer name. Set contour interval 100.00 meters, select the output file name
& location and check the option to add output file to project after processing.
➢ Press “RUN”.
➢ The contour layer will appear like this

57

➢ Label the layer using “ELEV” field and set appropriate symbols for line.

➢ In the Layer panel right click on Contour Raster Layer and select “Open Attribute table”,
➢ Arrange the table in descending order based on the value of “ELEV” column.

58
Compare the above counter line raster layer with the previous Google map image or visit
https://www.google.com/maps/@27.9857765,86.9285378,14.75z/data=!5m1!1e4?hl=en-US
➢ To verify the above contour files using Google Map
➢ Make a copy of Contour Layer, Go to Layer →Save As
➢ Select file format as “Keyhole Markup Language”, set file name, location and Layer Name.
➢ Also set CRS to WGS 84 EPSG:4326

59

➢ Go to the stored location on Hard Disk and open the “Himalayan_Google_Map_File.kml” with
Google Map.\
--------------------------------------------------------------------------------------------------------------------------
--
A Hillshade is a grayscale 3D representation of the surface, showing the topographical shape of hills
and mountains using shading (levels of gray) on a map, just to indicate relative slopes, mountain
ridges, not absolute height.
➢ For Hill Shade surface analysis
➢ Go to Plugin → Install Georeferencer GADL.
➢ After successful installation of plugin Go to Raster → Analysis → Hill Shade

➢ Select the input raster layer, select file name and location for storing Hill Shade output file.

60
➢ Press “RUN” and Close the Hill Shape Dialog window.
➢ After Raster styling the Output will appear like this.

61
Practical 6 : Working with Projections and WMS Data.

Download resources from the link below.


https://drive.google.com/open?id=1TxBCqKQzT5WBzoUQ0FZ2GVHPm-2R2wTL

Add vector layer “ne_10m_admin_0_countries.shp”


Layer > Add Layer > Add Vector Layer…

Click on “Browser”.

Select “ne_10m_admin_0_countries.shp” file.

62
”Right click” on “ne_10m_admin_0_countries” layer and select “Save
As…”.

63
Select “ESRI Shape file” in “Format” dropdown list.

In “File name” give path and name to output file.

64
In CRS click on button. New window will pop-up.

65
We have to select

“North_America_Albers_Equal_Area_Conic EPGS: 102008”.

To search it we have to use “Filter”.

Enter “102008” in “Filter” textbox we will find out

“North_America_Albers_Equal_Area_Conic” in “Coordinate reference


system of the world”.

Click on “OK”.

66
Click on “OK” on “Save vector layer as…” window.

67
NOTE: If your map doesn’t look like the above don’t worry it’s because
“OTF (ON THE FLY)”. On bottom right hand corner we can see (OTF) next to
“EPSG: 4326”. QGIS does it automatically, if there are layers which has
different CRS then QGIS projects layer in such way that they overlap on
each other. You can change this by going in
Setting > Options…

68
In “CRS” tab we can see in “Default CRS for new projects” section
“Automatically enable ‘on the fly’ reprojection if layer have different
CRS” option is selected. We can select “Don’t enable ‘on the fly’
reprojection” and click on “OK”.

Now we have to load “MiniScale_(standard)_R17.tif” file but “.tif” file


doesn’t have the information regarding projections.

69
For that we have to use “.tfw” file which you can find in

“\RGB_TIF_compressed\georeferencing_files\ESRI_TFW_files”.

We will get “MiniScale_(standard)_R17.tfw” file. We have to keep both


“.tif” and “.tfw” files in same locations with same name.

70
We have to copy “MiniScale_(standard)_R17.tfw” file and paste it with
“MiniScale_(standard)_R17.tif” file

Now go to QGIS to load “MiniScale_(standard)_R17.tif” file. For that go


to

71
Layer > Add Layer > Add Raster Layer…

Select “MiniScale_(standard)_R17.tif” file and click on “Open” button.

72
“Coordinate Reference System Selector” window will appear. We have to
select “OSGB 1936/British National Grid EPSG: 27700” for this we have to
type “bri” in “Filter” textbox. Now select “OSGB 1936/British National
Grid EPSG: 27700” and click on “OK”.

73
If your canvas looks like this you have to deselect “output” layer.

Your “MiniScale_(standard)_R17” map layer will overlap on exact same


location where it is on “ne_10m_admin_0_countries” layer.

74
Practical 7 : Georeferencing Topo Sheets and Scanned Maps, Georeferencing
Aerial Imagery Digitizing Map Data.

Please download the resources files from the link below.

https://drive.google.com/open?id=1fSn0Uv3AHlJsidAb_wuT5rJNr0S5vpHf

Georeferencing Topo Sheets and Scanned Maps

We are performing this practical in QGIS 3.4 version.

75
We have to open “Georeferencer…” for that we have to go in “Raster” tab
but if we didn’t find any option named “Georeferencer…” then we have to
add it through plugins, for that go in

Plugins > Manage and Install Plugins…

Select “Installed” tab we can see “Georeferencer GDAL” just select


the checkbox before of it and close the window.

76
Now we can see the “Georeferencer…” in “Raster” tab click on it.

77
New window will open up.

78
In Georeferencer window go to – File > Open Raster…

Select “1870_southern-india.jpg” and click “Open”. If it ask for CRS


then select EPSG: 4326

79
80
Now map will get load in upper window in the bottom window we can will
see the coordinate’s details which we are going to plot on the map. Our
aim is to give map a perfect reference point which will help us overlap the
map with the other maps like vector map. Now as we can see we selected
“.jpg” image we know that it doesn’t contain coordinate’s details like “.tif”
does. Now we will add coordinate’s details in this “.jpg” file and we will
save it in “.tif” format. Do not having coordinate’s details means that we
cannot call that map/data in QGIS directly because it doesn’t have
georeferences attached to it.

Now map is drawn by very clever cartographer, he/she did mention the
Longitude (Vertical lines, X axis) and Latitude (Horizontal lines, Y axis) in
map although it is been drawn on paper but it represent exact location in
real world. We can see the Latitude (Horizontal lines, Y axis) values on left

and right side of the map and Longitude (Vertical lines, X axis) values on
top and bottom of map.

81
We will plot few points on map and give those coordinates details. For that
click on “Add Point” button.

82
Zoom in to the point which is intersection of 70 Longitude (X axis value)

83
and 15 Latitude (Y axis value) and click on the intersection point.

You will get a window which will ask you for the X and Y values enter the
values 70 and 15 respectively.

84
We can see that we will get record for that point in GCP table window.

Now by using same steps we will plot points on 70:5, 80:5, 90:5 and 85:15

85
After plotting all the points it will look like below screenshot.

Now we have to save it, for that go to

Settings > Transformations Settings…

86
Transformation Sttings window will pop-up in that, in
“Transformation Type” select “Thin Plate Spline”.

87
In “Resampling method” select “Nearest neighbour” and in “Target SRS”
select “Project CRS: EPSG: 4326 – WGS 84” if you didn’t find it just
browse it by clicking on button.

Set path and name for the output file in “Output raster” text box by
clicking on button. Enter the name and set path for the output file
and click on “Save”.

88
89
Check the “Load in QGIS when done” checkbox. And click on “OK”

90
Now click on “Start Georeferencing” button.

91
We can see that new has been added in our layer panel.

Close the Georeferencer window. Now we have to load


“ne_10m_admin_0_countries.shp” file in project. Go to

Layer > Add Layer > Add Vector Layer…

92
Select “ne_10m_admin_0_countries.shp” file and click on “open”.
93
94
We can see that our paper map in following coordinate system which
helps it to get located at exact points where it is supposed to be.

Now reduce the transparency of “ne_10m_admin_0_countries” layer.


Right click on it and select properties…

Go to Symbology tab and reduce “Opacity” value and click on “OK” and
we will get our output.

95
96
Practical 8: Managing Data Tables and Saptial data Sets: Table joins, spatial
joins, points in polygon analysis, performing spatial queries.
Download resources from link given below.

https://drive.google.com/open?id=1_wJNYrLkD0WCBAahFhYFIHd9BbVbxOOq

First add “tl_2013_06_tract.shp” file, go to Layer > Add Vector Layer…

Click on “Browse”.

97
98
Select “tl_2013_06_tract.shp” and click “Open”

Open layer’s attributes table by right clicking on it and selecting “Open Attribute Table”.

99
“GEOID” is unique attribute for this layer.

Now check out “ca_tracts_pop.csv” file, here “GEO.id2” attribute is like foreign key for “GEOID”
attribute from “tl_2013_06_tract”. We have to read “D001” attribute’s values as Integer but by
default it is read as String to make QGIS read this attribute in Integer we need to add
“ca_tracts_pop.csvt” file which state the attribute’s datatypes.

100
“ca_tracts_pop.csvt” file.

To add “ca_tracts_pop.csv” file go to

Layer > Add Delimited Text Layer…

101
Browse “ca_tracts_pop.csv” file and select “CSV (comma separated values)” in File format. And
select “No geometry (attribute only table)”, and click “OK”

Now it’s time for join query. Go to “tl_2013_06_tract” file’s properties.

102
Go to “Joins”, click on button.

103
Set the values as shown below, and click on “OK”

We can see that on join has been added, now click on “Apply” and then “OK”.

104
Now go to “tl_2013_06_tract” file’s attribute table, we can see that extra attributes are added.

105
Now go to “tl_2013_06_tract” file’s properties to change set the colour of map

according to “D001” attribute’s values.

Go to “Style”, select “Graduated”, and in column select “ca_tracts_pop_D001”.

Now colour band will appear below, if not then try adding own colour band or try changing
“Mode” values. Once it done click on “OK”.

106
107
==PRACTICAL 8B==

Download resources from link given below.

https://drive.google.com/drive/folders/1B0eD3jh-MVAdrYSNXiHZzvRniJaUOgr-

First we have to load “nybb.shp” and “OEM_NursingHomes_001.shp” vector files in QGIS.

Layer > Add Vector Layer…

Click on “Browse”.

108
109
110
We can see “Capacity” attribute in “OEM_NursingHomes_001.shp”, for that right click on layer and
select “Properties”.

Now go to

Vector > Data Management Tools > Join attribute by location.

111
In “Join attribute by location” window select “nybb” in Target vector layer, select
“OEM_NursingHomes_001” in Join vector layer.

Select “Take summary of intersecting features” and check “Sum”.

Set name and path for output file by clicking on “Browse”.

Select “Keep all records (including non-matching target records)”and click on “OK”.

112
Click on “Yes” if it asks for adding layer in canvas.

113
If we go to output layer’s properties we can see “SUMCapacit”.

114
Here we finish our practical.

If we want to remove some attributes then click on “Toggle” button.

And then click on “Delete”.

115
Select all other field which you want to delete and click on “OK”.

116
Click on “Toggle” button again to save changes.

117
Now click on “Identify Feature” and click on any feature from map, it will show you the feature’s details.

118
==PRACTICAL 8C==

Download resources from link given below.

https://drive.google.com/open?id=1lo8vo_S57kHNIXLn7RDYAO3-
1gsR2a4i

First we have to add “signif.txt” file, for


that go to Layer > Add Delimited Text
Layer…

Browse “signif.txt” file and check on “Tab” and “Use spatial index”
checkboxes and check “X field” and “Y field” are “LONGITUDE” and
“LATITUDE” respectively.

119
If it ask for CRS select “WGS 84”.

120
Now add “ne_10m_admin_0_countries.shp” file for that
go to Layer > Add Vector Layer…

121
Select that file and click on “Open”.

122
Once both files are loaded go to

Vector > Analysis Tools > Points in polygon

123
Set all values as shown below and set path and name for output file
and click “OK”.

If it shows following error then don’t worry just click “OK”.

124
Now please wait it will take time to
process.

Once it’s done it will ask to add layer in TOC click on “Yes”.

125
Our output has been loaded.

Now just check the attributes of output layer for that right click on it
and select “Open Attribute Table”.

126
We can see that it has “PNTCNT” attribute.

Get back to main canvas now click on “Identify Feature” button.

127
And click on any feature it will display the details of it.

128
==PRACTICAL 8D==

Download resources from link given below.

https://drive.google.com/open?id=1WTQja3uFh3mZJvSrsd0tvn75Vrb
1EXq7

First we have to add “ne_10m_rivers_lake_centerlines.shp” and

“ne_10m_populated_places_simple.shp” files in QGIS. For that go to

Layer > Add Vector Layer…

129
130
Also add “ne_10m_populated_places_simple.shp” file.

Now we want our layer to be in “World_Azimuthal_Equidistant” CRS


which will help us to plot our output on “Google Earth”. For that right
click on “ne_10m_populated_places_simple” layer and select “Save
As…”.

131
First click on “Browse” button for CRS field
and select “World_Azimuthal_Equidistant”
as CRS.

132
Give name and path for the output file by clicking on “Browse”
button for Saveas field. Set Encoding to“UTF-8”, select“Add saved file
to map”and click on“OK”.

Do same for “ne_10m_rivers_lake_centerlines” layer.

133
NOTE: IF you are facing problem while save
“ne_10m_rivers_lake_centerlines” file then don’t worry
just restart QGIS if it shows following error

134
Then too don’t worry because even it shows error but still
QGIS has created output’s “.shp” file. So just go
to {Layer > Add Vector Layers… > Browse that output layer
and open it}

135
Once you add both re-projected layers deselect first two original
layers. Now we

have to stop “OTF (On The Fly)” because our projection is not right so
click on which to view project’s CRS Properties.

136
Now go to “CRS” panel and deselect “Enable‘on the fly’CRS
transformation”, and click on “OK”.

137
Once you click “OK” you will see blank canvas, don’t worry just right
click on “riversout” layer and select “Zoom to layer Extent”.

138
Yes we can view layers in “World_Azimuthal_Equidistant” CRS
projection.

139
Now go to

Vector > Geoprocessing Tools > Buffer(s)

Following window will appear.

First select “riversout” in Input vector layer.

Set Buffer distance to “10000”.

Set path and name for output file by clicking on “Browse”, then click
on “OK”.

140
If it ask to add layer in TOC then click on “Yes”.

141
Do same steps for another re-projected layer i.e. “saved” in our case.

142
Once you load buffered layers in QGIS deselect other layers.

Go to “riverbuffer” attribute table.

143
In this “featurecla” attribute has values which says that the feature is
related to river or lake. We want features which represent river.

Click on “Select feature using an Expression” button shown below


144
Now in “Select ByExpressioin” window, in Function List panel double
click on “featurecla” from “Fields and Values”.

Now first click “Equal” button and then “Load all unique values”.

145
Now double click on “River”, you will get “featurecla”=‘River’
Expression, now click on “Select”.

146
It will select all features which satisfy the expression. Minimize both
windows.

Now go to

Vector > Spatial Query > Spatial Query

147
Now in Spatial Query window select

“populatedbuffer” layer in “Select source feature from”.

“Intersections” in “Where the features”.

“riverbuffer” in “Reference features of”, it will show you the features which
satisfy this query, and click on “Apply”

148
Once operation is done it will show side panel like one below, just
click on “Create layer selected with”.

It will add layer to your layer panel.

149
Now deselect all other layers except layer just created.

Now we need our file in KML (Keyhole Markup Language) format, for
that right click on layer and select “Save As…”.

150
Select “Keyhole Markup Language [KML]” in Format, set name and
path for the output file and set CRS to “WGS 84”, and click on “OK”.

151
Now go open Google Earth in Chrome.

https://earth.google.com/web/@0,0,-

24018.82718741a,36750128.22569847d,35y,0h,0t,0r/data=CgAoAQ

link for Google Earth.

We have to upload our final.kml file in Google Earth, for that click on
“My Places”. Now first enable KML import for that click on
“Settings”.

152
Click on enable toggle button front of “Enable KML file import”.

Click on “SAVE”.

Once you enable go to “IMPORT KML FILE” and select “Open file…”.

153
Select .kml file and click on “Open”.

154
Yes we have our output.

Zoom in a little you can see each data is been plotted on Google Earth.

155
156

You might also like