Gis 62 Nedariya Mohammad

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

T.Y.B.Sc.I.T.

SEM VI Principles of Geographic Information Systems 2021-22

Practical Journal of

Principles of Geographic
Information Systems
Submitted by
Nedariya Mohammad
Bachelor of Science in Information Technology Academic Year 2021-2022

1
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

CERTIFICATE

Name: Nedariya Mohammad

Div: A Seat Number: 2011029

Branch: Bachelor of Science in Information Technology

This is to certify the work of the student in Bachelor of


Science in InformationTechnology during the academic year
2021-22 has been successfully completed.

Date: 30/03/2022

Examiner’s Sign

2
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

Index
Sr. Practical Title Page Sign
No No
1 1A Creating and Managing Vector Data 4
2 1B a) Adding vector layer
3 1C b) Setting properties
c) Vector Layer Formatting
4 1D Calculating line lengths and statistics 26
5 2A Adding raster layers 31
6 2B Raster Styling and Analysis 32
7 2C Raster Mosaicking and Clipping 35
8 3A Making a Map 40
9 3B Importing Spreadsheets or CSV files 49
10 3C Using Plugin 51
11 3D Searching and Downloading OpenStreetMap Data 52
12 4A Working with attributes 54
13 4B Terrain Data and Hill shade analysis 56
14 5A Working with Projections and WMS Data 64
15 6A Georeferencing Topo Sheets and Scanned Maps 66
16 6B Georeferencing Aerial Imagery 71
17 6C Digitizing Map Data 75
18 7A Table Join 80
19 7B Spatial Join 83
20 7C Points in polygon 85
21 7D Performing spatial queries 87
22 8A Nearest Neighbor Analysis 90
23 8B Sampling Raster Data using Points or Polygons 104
24 8C Interpolating Point Data 114
25 9A Batch Processing using Processing Framework 121
26 9B Automating Complex Workflows using
Processing Modeler
27 9C Automating Map Creation with Print Composer 143
Atlas
28 10A Validating Map Data 161

3
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

PRACTICAL - 1
B. AIM : - Creating and Managing Vector Data:
a) Adding vector layer
b) Setting properties
c) Vector Layer Formatting
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:

4
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

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

5
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


Field Panel

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)

➢ Click on Add to Field List Button.


➢ You can add as many fields (Column Name) as you want for the layer.

6
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

Select Geometry Type as follows
 Click on the following button


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

7
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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


Save the newly added polygon as follows.


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

➢ Following screen will appear on the screen. Select pattern as you want and click on OK.

8
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

b) Creating Line vector layer



Repeat the same steps as we have done for polygon layer.
➢ Select geometry type Line.

9
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


Road layer :

To plot road click on Add Line Feature.


Click on the map where you want to draw line.


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

➢ save your data

10
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

11
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

12
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


Following window will appear on the screen

➢ Roads will look like these

13
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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


Check Enable symbol levels option

➢ Click ok & Road will appear as follows

14
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-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:

15
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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_adm0.shp”

Double Click on IND_adm0


Select Select any outline style from below given options.

Press OK

The display window will appear like

16
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

➢ →
In Layer Pane, Right click on IND_rails Open Attribute Table

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

17
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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.

18
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

19
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

20
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

PRACTICAL - 2
Exploring and Managing Raster data:
a) Adding raster layers
→ →
➢ 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

21
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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

22
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

23
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

24
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

25
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

26
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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.

27
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

28
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

➢ → →
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.

fter

29
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

PRACTICAL - 3
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”.

30
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


A new Print Layout window will open


➢ Select Add Item Add Map

31
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

➢ After adding map go to ItemProperties


→ →
Ma Layers
p1
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.

32
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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).

33
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


The Print Layout will appear like


➢ Add Item Add Label

34
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

35
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

The Print Layout will appear

➢ →
Add Item Add Scale Bar

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

36
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

➢ →
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.

37

Open the PDF or Image from location.

□ Country Border

Tourist Place
Location

© Copy Rig ht Reserved

-
38
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

39
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22
➢ Press ADD and close the window.
➢ Output:

40
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

41
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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

42
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


➢ 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:

43
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

PRACTICAL - 4
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.

44
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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.

45
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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

46
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

47
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

48
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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

49
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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.

50
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

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

51
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


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.

52
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22


Press “RUN” and Close the Hill Shape Dialog window.

After Raster styling the Output will appear like this.

53
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

PRACTICAL - 5
Working with Projections and WMS Data
A Web Map Service (WMS) is a standard protocol developed by the Open Geospatial Consortium in
1999 for serving georeferenced map images over the Internet. These images are typically produced by
a map server from data provided by a GIS database

➢ Start a new Project.
→ →
Layer Add Layer Vector Layer

➢ Select “ne_10m_admin_0_countries.zip” Layer from data folder.

Go to Layer Save As
Select format as ESRI Shape File
Select folder location and file name
Set CRS North_America_Albers_Equal_Area_Conic EPSG: 102008


Press “OK”.

Deselect the original Image and keep the projected layer visible.

→ → →
➢ Select Layer Add Layer Add Raster Layer Select MiniScale_(standard)_R17.tif from
Location

54
T.Y.B.Sc.I.T. SEM VI Principles of Geographic Information Systems 2021-22

“GIS_Workshop\Practicals\Practical_05\DATA\minisc_gb\minisc_gb\data\RGB_TIF_compres
sed\MiniScale_(standard)_R17.tif”

The Layer appears on a different location than the location where Great Britain is shown
on Map.

➢ → → →
Open Layer Properties CRS Search bri select British National Grid EPSG 27700.

Processing may take some time.

Locate United Kingdom on Layer; the vector layer exactly coincides by the raster
layer covering United Kingdom.

55

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy