PGIS Practical
PGIS Practical
Certificate
Certify that Mr / Miss
External Examiner
Roll no
Branch
Subject
Index
Sr.no Title of Practical Page no
1B Setting properties
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)
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.
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
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”.
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.
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
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:
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.
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