0% found this document useful (0 votes)
38 views19 pages

PGIS Practical

Uploaded by

Aditya
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)
38 views19 pages

PGIS Practical

Uploaded by

Aditya
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/ 19

SMT.

CHANDIBAI HIMATHMAL MANSUKHANI


COLLEGE
(Affiliated to University of Mumbai)
ULHASNAGAR-MAHARASHTRA- 421003

DEPARTMENT OF INFORMATION TECHNOLOGY

Certificate
Certify that Mr / Miss

of BSc (IT) department, semester VI with Seat no has

completed a course of necessary experiments in the subject

Principles of Geographic information systems under my

supervision in the Smt Chandibai Himatmal Mansukhani College


Laboratory in the year 2023-2024

Subject In charge Head, B.Sc. (IT)

External Examiner

Date: College Seal


Name

Roll no

Branch

Subject

Index
Sr.no Title of Practical Page no

1A Adding vector layer

1B Setting properties

1C Vector Layer Formatting

1D Calculating line lengths and statistics

2A Adding raster layers

2B Raster Styling and Analysis

2C Raster Mosaicking and


Clipping
3A Making a Map

3B Importing Spreadsheets
or CSV files
3C Using Plugin
3D Searching and Downloading OpenStreetMap Data
4A Working with attributes
4B Terrain Data and Hill shade analysis
5A Working with Projections and WMS Data
Practical 1
Creating and Manging Vector Data
a. Adding Vector Layer
b. Setting Properties
c. Vector Layer Formatting
d. 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 it’s surrounding as follows:
c. Vector Layer Formatting
a. Creating Polygon vector layer:
Select Project → New
Select Layer → Create Layer → New Shapefile Layer
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.
Field Panel:
• Add the Attribute you want to show.
• Specify Type of Attribute
• Specify the Length of the Attribute. Specify Precision.
• Click on Add to Field List Button.
Select Geometry Type as EPSG:4326 – WGS 84
CRS dialog box will appear on screen. Click on the WGS84 option and it will be selected as follows. Click on OK.
Follow the steps to plot Polygon features:
Select the Polygon Feature from layer panel.
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.
Set style for polygon by using property window.
Select pattern as you want and click on OK.
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.
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.
• Save your data.
• Set style for Roads in the same way as we have done for polygon.
• To label your roads Right click on Road layer. Go to properties window then select label and set single
label property
• 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.

c. Create Point vector layer:


Repeat same steps to add point layers as we have done in previous layers.
Final Output:
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 Symbology → Select any outline style from below given options. Press OK.
In Layer Pane, Right click on IND_rails → Open Attribute Table.
Press Toggle Editing button, on Attribute table window toolbar.
Press Open Field Calculator button.
Set the output field as “Track_Len”, field type to “Decimal Number”, output field length to 10 and Precision to 2.
From Function List search $length or go to Geometry → Select $length. Press OK.
A new column is added to the attribute table with value representing the length of track in KM.
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.
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
Above statistics show that the total length of Railway track in India is 60,479.32 KM.
Practical 2
Exploring and Managing Raster data
a. Adding Raster layers
b. Raster Styling and Analysis
c. Raster Mosaicking and Clipping

Procedure:
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 EPSG:4326
Set CRS option on bottom right corner.
Select WGS 84 EPSG: 4326 and Press OK

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 Symbology
Set Render Type to “Single band Pseudo color” and set minimum value to 0 and maximum value to 240 and set mode
to Continuous
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
Put the expression "glds00ag60@1" - "glds90ag60@1"
Select the output file location & name and Press OK.
Remove the other two layers i.e. glds00ag60.asc and glds90ag60.asc
Double click on pop_diff layer.
Select Symbology.
Set Render Type to “Single band Pseudo color”, Interpolation as Discrete, and remove all classification and add using
ADD button. After all settings press “OK”.

Layer output after applying style.

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

c. Raster Mosaicking and Clipping


Go to Layer → Add Layer → Add Raster Layer
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
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.
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 Symbology → Select any one

The result will be


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.

Output:

After Clipping
Practical 3A
Making a Map
Procedure:
Go to Project → New Print Layout
Select Add Item → Add Map
After adding map go to ItemProperties → Map1 → Layers Check on Lock Layers and Lock Styles for Layers
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.
Select the Picture representing main Map from Items pane.
In Item Properties → Overviews → using ADD icon add an overview.
Select the checkbox Draw Overview
Name the Picture object representing inset
Add Item → Add Label
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

Print Layout

Add Item → Add Scale Bar


Add Item → Add Label → Add a Label using HTML rendering
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.
Open the PDF or Image from location
Output:
Practical 3B
Importing Spreadsheets or CSV files
Procedure:
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.
Press ADD and close the window.

Output:
Practical 3C
Using Plugins
Procedure:
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 “Show also experimental plugins”
or “Show also deprecated plugin”
A NEW tab will be added to Plugin Manager Window.
Click on a plugin name and Click Install.
Practical 3D
Searching and Downloading OpenStreetMap Data
Procedure:
Add “Open Layer” and “OSM Search” Plugin from Not Installed option from Plugin Manager Dialog Box.
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 → Check “No projection”
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 Zoom

Output:
Practical 4A
Working with attributes
Procedure:
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.
Enter pop_max>100 and pop_max<10000 and click ‘Select features’ button to get all places with population
between 100 and 100000

Output:

Places matching the criteria will appear in different color.

Use the deselect button to deselect the feature to be rendered in original color
Practical 4B
Terrian Data and Hill shade analysis

Procedure:
Go to Layer → Add Raster Layer → select “10n060e_20101117_gmted_mea300.tif”, from Data folder
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.
Crop the raster layer only for the region under study.
Go to Raster → Extraction→ Clip Raster by Extent
Select the raster layer
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.
To derive counter lines from given raster.
Go to Raster → Extraction → Contour
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”

Contour Layer
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.

Counter line raster layer

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.
Press “RUN” and Close the Hill Shape Dialog window.

Output:
Practical 5
Working with Projections and WMS
Data
Procedure:
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: 102008Press “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_compressed
\MiniScale_(standard)_R17.tif”
The Layer appears on a different location than the location where Great Britain
is shown on MapOpen 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
Outputs

You might also like