0% found this document useful (0 votes)
3 views29 pages

Gis

This document is a lab assignment for a Geographical Information System (GIS) course at Tribhuvan University, detailing the prerequisites, installation, and practical applications of Quantum GIS (QGIS). It covers the definition of GIS, the types of geographical data, and provides step-by-step instructions for creating and managing vector data layers, including polygons, lines, and points. Additionally, it includes procedures for calculating line lengths and generating statistics related to the data.

Uploaded by

MiHawk
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)
3 views29 pages

Gis

This document is a lab assignment for a Geographical Information System (GIS) course at Tribhuvan University, detailing the prerequisites, installation, and practical applications of Quantum GIS (QGIS). It covers the definition of GIS, the types of geographical data, and provides step-by-step instructions for creating and managing vector data layers, including polygons, lines, and points. Additionally, it includes procedures for calculating line lengths and generating statistics related to the data.

Uploaded by

MiHawk
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/ 29

Tribhuvan University

Bhaktapur Multiple Campus


Dudhpati-7, Bhaktapur, Nepal

Lab Assignment of
Geographical Information System (CSC 468)

Submitted By:
Anil Kumar Shrestha
B.Sc. CSIT 076 Batch, 8th Semester
Symbol No: 23223

Submitted To:
Bishow Karn
Lecturer, Geographical Information System
Department of Computer Science and Information Technology
Contents
Prerequisites to GIS Practical .................................................................................................... 1
What is a Geographic Information System (GIS)? ................................................................ 1
Understanding QGIS ................................................................................................................. 3
What is Quantum GIS? .......................................................................................................... 3
Installation of QGIS ................................................................................................................... 4
Step By step procedure .......................................................................................................... 4
Understanding QGIS Desktop Environment. ............................................................................ 8
Quantum GIS toolbars and some other components .............................................................. 9
PRACTICAL – 1 ..................................................................................................................... 11
a) Creating Polygon vector layer ...................................................................................... 12
b) Creating Line vector layer ............................................................................................... 16
c) Calculating line lengths and statistics .............................................................................. 23
Prerequisites to GIS Practical
What is a Geographic Information System (GIS)?
A Geographical Information System (GIS) is an organized collection of computer
hardware, software and data used to link, analyze and display geographically
referenced information.

The foundation of GIS is the ability to locate objects and events (streams, villages,
disease cases) and link them with appropriate information in order to identify patterns
and provide a basis for map making and analysis. Key types of geographical data,
represented as separate map layers in a GIS, are outlined in the table below.
Sr. Data Type Example Layer on Map
No
1 POINT Building, Hospital, City,
Well.

2 LINE River, Road

3 POLYGON Administrative
Boundaries, Census
tacts.

4 RASTER Pixel or grid data

1
Vector data: A representation of the world using points, lines, and polygons.
Vector models are useful for storing data that has discrete boundaries, such as
country borders, land parcels, and streets.
Point features: A map feature that has neither length nor area at a given scale, such
as a city on a world map or a building on a city map.
Line features: A map feature that has length but not area at a given scale, such as a
river on a world map or a street on a city map.
Polygon features: A map feature that bounds an area at a given scale, such as a
country on a world map or a district on a city map.
Raster data: A representation of the world as a surface divided into a regular grid
of cells. Raster models are useful for storing data that varies continuously, as in an
aerial photograph, a satellite image, a surface of chemical concentrations, or an
elevation surface.
With a GIS application you can open digital maps on your computer, create new
spatial information to add to a map, create printed maps customized to your needs
and perform spatial analysis.

2
Understanding QGIS
What is Quantum GIS?

Quantum GIS (QGIS) is a user friendly Open Source GIS application licensed under the
GNU General Public License. QGIS is an official project of the Open Source Geospatial
Foundation (OSGeo). It runs on Linux, Unix, Mac OSX, Windows and Android and supports
numerous vector, raster, and database formats and functionalities.

Like all GIS applications, QGIS provides a graphical user interface allowing display of map
layers and manipulation of data for analyses and map-making.

A Geographical Information System (GIS) is a collection of software that allows you to


create,visualize, query and analyze geospatial data. Geospatial data refers to information
about the geographiclocation of an entity. This often involves the use of a geographic
coordinate, like a latitude or longitude value. Spatial data is another commonly used term, as
are: geographic data, GIS data, map data, location data, coordinate data and spatial geometry
data. Applications using geospatial data perform a variety of functions. Map production is the
most easily understood function of geospatial applications. Mapping programs take
geospatial data and render it in a form that is viewable, usually on a computer screen or
printed page. Applications can present static maps(a simple image) or dynamic maps that are
customized by the person viewing the map through a desktop program or a web page.

Many people mistakenly assume that geospatial applications just produce maps, but
geospatial data analysis is another primary function of geospatial applications. Some typical
types of analysis include computing:

Distances between geographic locations

The amount of area (e.g., square meters) within a certain geographic region

What geographic features overlap other features?

The amount of overlap between features

The number of locations within a certain distance of another and so on...

These may seem simplistic, but can be applied in all sorts of ways across many disciplines.
The results of analysis may be shown on a map, but are often tabulated into a report to
support management decisions. The recent phenomena of location-based services promises to
introduce all sorts of other features, but many will be based on a combination of maps and
analysis. For example, you have a cell phone that tracks your geographic location. If you
have the right software, your phone can tell you whatkinds of restaurants are within walking
distance. While this is a novel application of geospatialtechnology, it is essentially doing
geospatial data analysis and listing the results for you.

System Requirements

Windows OS:

3
Minimum: Pentium III / 256 MB RAM. Recommended: 1 GB of RAM and 1.6
GHz processor.
Operation System: Platforms Windows and Linux (Win XP or newer, Linux Suse
8.2/9.0/9.2, Linux Debian (Lliurex))

MAC OS:

PC/Desktop with at least Pentium IV Tiger OS, Leopard OS.

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

4) Your 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-OSGeo4W3.36.3-1
5) Move or copy the above file to your D:/QGISlab folder and double click on the
file. You will get a popup window with a security warning.

4
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.
8) Please go through the license agreement and click on the button> I agree and
proceed with the installation as shown in the screen.

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

10) After browsing the folder click the Next button and proceed with the
installation as shown in above figure.

6
11) Please reboot your machine once the installation is completed. Click finish to
complete the installation.

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

7
Understanding QGIS Desktop Environment.
1
2

5
4

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

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

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

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.

9
List of Sample/Data files used for Practical
IND_rails.zip
IND_adm0.zip

The above data can be downloaded from:


https://drive.google.com/drive/folders/191tJ4L7O-
VJm2Q2AB8dZDpIj7vyyPM3I?usp=sharing

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

2. Setting properties (Labeling, Symbolism)

Our aim is to create map representing a location and its surrounding as follows:

11
a) Creating Polygon vector layer

• Select Layer > Create Layer > New Shapefile Layer

• Following dialog box will appear on the screen. Select Polygon


option from Geometry type.

12
• 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 o Add the Attribute you want to show. (Column Name
for Table) o Specify Type (DataType:Text Data/Decimal Data/Whole
Number/Date) of Attribute o 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.

13
• Select Geometry Type as follows o 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

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

14
 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.

b) Creating Line vector layer


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

16
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

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

18
 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.

19
 Roads will look like these

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

 Roads will look like these

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

20
o Check Enable symbol levels option



o Click ok & Road will appear as follows

21
 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

22
c) Calculating line lengths and statistics
 Go to Layer > Add Layer >Add Vector Layer
 Add the following file to project

 Also add India Administrative Map


 Double click on IND _adm0. And select symbology and then select any
outline style.Then Press Ok
 The display will appear like

23
 In Layer Pane, Right click on IND_rails > Open Attribute Table.

 Press Toggle Editing button using button, on Attribute table window


toolbar.
Press Open Field Calculator using button.

 Set the output field as “Track_Len”, field type to “Decimal Number”.


 From Go to geometry and select $Length.
Set Expression as : $Length/1000.
 A new Column ‘Track_len’ Gets added to attribute list

24
 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

25
 Select IND_rails layer from input layer. And select Track_Len in field to
“calculate statistics on” and press Run.

26
 Open the “output.html” file to get the field statistics.
 Analyzed field: FID_rail_d
 Count: 2012
 Unique values: 1991
 NULL (missing) values: 0
 Minimum value: 144645.0
 Maximum value: 170897.0
 Range: 26252.0
 Sum: 320970959.0
 Mean value: 159528.30964214713
 Median value: 158989.5
 Standard deviation: 5309.7916503218385
 Coefficient of Variation: 0.03328432215092562
 Minority (rarest occurring value): 144645.0
 Majority (most frequently occurring value): 152876.0
 First quartile: 155823.0
 Third quartile: 163016.0

Interquartile Range (IQR): 7193.0 The above statistics show that the total
length of Railway track in India is 60,479.32 KM.

27

You might also like