GIS Practicals
GIS Practicals
GIS Practicals
CERTIFICATE
This is to certify that Mst. Anish Surendra Darne of Class T.Y. Bsc.IT A bearing
Roll No. 13 of Semester VI has successfully completed the Assignment/Practical
work in the subject of “Principles of Geographical Informantion System”
during the academic year 2022 - 2023 under the guidance of Prof. Manisha Kasar
being the partial requirement for the fulfilments of the curriculum of Degree of
Bachelor of Science in Information Technology, University of Mumbai.
Place:
Date:
____________________ _____________________
Sign of Subject In-charge Sign of External Examiner
__________________ _____________________
Sign of H.O.D Sign of Principal
2
INDEX
Following dialog box will appear on the screen. Select Polygon option from Geometry type.
The CRS dialog box will appear on screen. Click on the WGS84 option and it will be selected
as follows. click on OK
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.
Same way we can add one more polygon layer for Gardens.
To label your roads Right click on Road layer .Go to properties window then select label and
set single label property
Following window will appear on the screen
Final output:
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”
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
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
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.
PRACTICAL - 3
a) Making a Map
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.
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.
Add Item Add Legend Place the legend indicator at appropriate location.
Uncheck auto update and use suitable legend indicator label.
The Print Layout will appear
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.
The places matching the criteria will appear in different color.
Will give
Use the deselect button to deselect the feature to be rendered in original color.
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
“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.
PRACTICAL - 6
Georeferencing
The canvas area will now have the scanned map of Mumbai referenced with control points.
Select the newly added layer in Layer Panel Right click and go to property.
This file will have only 1 row specifying data types for each column. Save this file as
.csv file.
ca_tracts_pop.csvt in the same directory as the original
Go to Layer Add Layer Add Delimited Text Layer
And add I:\GIS_Workshop\Practicals\Practical_07\A\Data\ca_tacts_pop.csv ”
In the layer panel, Right click on “tl_2013_06_tract”, layer and select Properties
Select the option in Properties, and click on button to add new table join.
In the Add Vector Join window set the following properties and click OK.
For more clear output, select “tl_2013_06_tact” from Layer Panel, right click and
select properties. Go to Symbology and set the following properties.
A detailed and accurate population map of California can be seen as the result. Same techniqu
e
can be used to create maps based on variety of census data.
b) spatial joins
Go to Layer Add Layer Add Vector Layer Select
“I:\GIS_Workshop\Practicals\Practical_07\B\Data\nybb_12c\nybb_13c_av\nybb.shp” and
“I:\GIS_Workshop\Practicals\Practical_07\B\Data\OEM_NursingHomes_001\OEM_NursingHo
mes_001.shp”, from data folder.
Use the Identify Feature Button to select a region to view join data on map Layer.
Output
c) Points in polygon analysis
Go to Layer Add Layer Add Delimited Text Layer
Select “EarthQuakeDatabase.txt”
Also a new column is added to attribute table “NumPoints” indicating number of earth
quake points in each country.
PRACTICAL - 8
Advanced GIS Operations 1:
a) Nearest Neighbor Analysis
Go to Layer add Layer add Delimited Text Layerand load “signif.txt” from data file.
9. Browse to the newly created matrix.csv file. Since this file is just text columns, select No
geometry (attribute only table) as theGeometry definition. Click OK .
10. You will see the CSV file loaded as a table. Right-click on the table layer and select Open
Attribute Table.
11. Now you will be able to see the content of our results. The InputID field contains the field
name from the Earthquake layer. The TargetID fieldcontains the name of the feature from the
Populated Places layer that was the closest to the earthquake point. The Distance field is the
distance between the 2 points.
12. This is very close to the result we were looking for. For some users, this table would be
sufficient. However, we can also integrate this results in our original Earthquake layer using
a Table Join. Right-click on the Earthquake layer, and select Properties.
14. We want to join the data from our analysis result to this layer. We need to select a field from
each of the layers that has the same values. Selectmatrix as the Join layer` and InputID as
the Join field. The Target field would be I_D. Leave other options to their default values and
click OK.
15. You will see the join appear in the Joins tab. Click OK.
16. Now open the attribute table of the signif layer by right-clicking and selecting Open Attribute
Table.
17. You will see that for every Earthquake feature, we now have an attribute which is the nearest
neighbor (closest populated place) and the distance to the nearest neighbor.
18. We will now explore a way to visualize these results. First, we need to make the table join
permanent by saving it to a new layer. Right-click the signif layer and select Save As....
19. Click the Browse button next to Save as label and name the output layer
as earthquake_with_places.shp. Make sure the Add saved file to map box is checked and
click OK.
20. Once the new layer is loaded, you can turn off the visibility of the signif layer. As our dataset is
quite large, we can run our visualization analysis on a subset of the data. QGIS has a neat
feature where you can load a subset of features from a layer without having to export it to a
new layer. Right-click the earthquake_with_places layer and select Properties.
21. In the General tab, scroll down to the Feature subset section. Click Query Builder.
22. For this tutorial, we will visualize the earthquakes and their nearest populated places
for Mexico. Enter the following expression in the Query Builder dialog.
Principles of Geographic Information Systems
"COUNTRY" = 'MEXICO'
23. You will see that only the points falling within Mexico will be visible in the canvas. Let’s do
the same for the populated places layer. Right-click on
the ne_10m_populated_places_simplelayer and select Properties.
24. Open the Query Builder dialog from the General tab. Enter the followin
g
expression. "adm0name" = 'Mexico
'
25. Now we are ready to create our visualization. We will use a plugin named MMQGIS. Find and
install the plugin. See Using Pluginsfor more details on how to work with plugins. Once you
have the plugin installed, go to MMQGIS Create Hub Lines.
‣ ‣
26. Select ne_10m_populated_places_simpleas the Hub Point Layer and name as the Hub ID
Attribute. Similarly, selectearthquake_with_places as the Spoke Point Layer andmatrix_Tar as
the Spoke Hub ID Attribute. The hub lines algorithm will go through each of earthquake points
and create a line that will join it to the populated place which matches the attribute we specified.
Click Browse and name the Output Shapefile asearthquake_hub_lines.shp. Click OK to start
the processing.
27. The processing may take a few minutes. You can see the progress on the bottom-left corner of
the QGIS window.
28. Once the processing is done, you will see the earthquake_hub_lines layer loaded in QGIS. You
can see that each earthquake point now has a line that connects it to the nearest populated place.
c) Interpolating Point Data
Procedure
1. Open QGIS. Go to Layer Add Layer Add Vector Layer..
‣ ‣
2. Browse to the downloaded Shapefiles.zip file and select it. Click Open.
3. In the Select layers to add... dialog, hold the Shift key and
select Arlington_Soundings_2007_stpl83.shp and Boundary2004_550_stpl83.shp layers.
Click OK.
4. You will see the 2 layers loaded in QGIS. Th e Boundary2004_550_stpl8 3 layer represents th e
boundary of the lake. Un-check the box next to it in the Table of Contents .
5. This will reveal the data from the second layer Arlington_Soundings_2007_stpl83 . Though the
data looks like lines, it is a series of points that are very close.
6. Click the Zoom icon and select a small area on the screen. As you zoom closer, you will see
the points. Each point represents a reading taken by a Depth Sounder at the location recorded
by
a DGPS equipment.
7. Select the Identify tool and click on a point. You will see the Identify Results panel show up on
the left with the attribute value of the point. In this case, the ELEVATIONattribute contains the
depth of the lake at the location. As our task is to create a depth profile and elevation contours,
we will use this values as input for the interpolation.
8. Make sure you have the Interpolation plugin enabled. See Using Plugins for how to enable
plugins. Once enabled, go toRaster Interpolation Interpolation.
‣ ‣
9. In the Interpolation dialog, select Arlington_Soundings_2007_stpl83 as the Vector layers in
the Input panel. Select ELEVATION as the Interpolation attribute. Click Add. Change
the Cellsize X and Cellsize Y values to 5. This value is the size of each pixel in the output grid.
Since our source data is in a projected CRS with Feet-US as units, based on our selection, the
grid size will be 5 feet. Click on the ... button next to Output file and name the output file
as elevation_tin.tif. CLick OK.
10. You will see the new later elevation_tin loaded in QGIS. Right-click the layer and select Zoom
to layer.
11. Now you will see the full extent of the created surface. Interpolation does not give accurate
results outside the collection area. Let’s clip the resulting surface with the lake boundary. Go
to Raster Extraction Clipper.
‣ ‣
12. Name the Output file as elevation_tin_clipped.tif. Select the Cliiped mode as Mask layer.
Select Boundary2004_550_stpl83 as the Mask layer`. Click OK.
119
13. A new raster elevation_tin_clipped will be loaded in QGIS. We will now style this layer to
show the difference in elevations. Note the min and max elevation values from
the elevation_tin layer. Right-click the elevation_tin_clipped layer and select Properties.
14. Go to the Style tab. Select Render type as Singleband pseudocolor. In the Generate new color
map panel, select Spectralcolor ramp. As we want to create a depth-map as opposed to a height-
map, check the Invert box. This will assign blues to deep areas and reds to shallow areas.
Click Classify.
15. Switch to the Tranparency tab. We want to remove the black-pixels from our output. Enter
0 as
the Additional no data value. Click OK.
16. Now you have a elevation relief map for the lake generated from the individual dept
h
readings. Let’s generate contours now. Go to Raste
r Extraction Contours.
‣ ‣
17. In the Contour dialog, entercontours as the Output file for contour lines. We will generate
contour lines at 5ft intervals, so enter5.00 as the Interval between contour lines. Check
the Attribute name box. Click OK.
18. The contour lines will be loaded ascontours layer once the processing is finished.
Right-click the layer and select Properties.
19. Go to the Labels tab. Check the Label this layer with box and select ELEV as the field.
Select Curved as the Placement type and click OK.
20. You will see that each contour line will be appropriately labeled with the elevation along the
line.