Prach: A Feature-Rich Platform Empowering the Autism Community
GIS and QGIS training notes
1. Kilaini M Arnold
1
Prepared by Arnold Kilaini
Contents
Introduction to (GIS) Geographic Information Systems (GIS) .............................................................................2
INTRODUCTION TO QGIS.............................................................................................................................. 10
A Free and Open Source Geographic Information System...................................................... 10
Adding Vector Layer/Ctrl+Shif+V.................................................................................................................. 10
Adding Raster Layer/ Ctrl+Shif+V ................................................................................................................. 12
Importing GPX file in QGIS and Cleaning ...................................................................................................... 14
Editing in shapefiles in QGIS and Cleaning ................................................................................................... 17
Creating New Shapefile Layer with the Google map base map ................................................................... 19
Merging Shapefiles to Single file .................................................................................................................. 25
Filtering and Separation from Main District roads........................................................................................ 27
2. Kilaini M Arnold
2
Introduction to (GIS) Geographic Information Systems (GIS)
Source: John Snow Inc. www.jsi.com
In the 1850s, cholera was very poorly understood and massive outbreaks were a common occurrence
in major industrial cities. An outbreak in London in 1854 in the Soho district was typical of the time,
and the deaths it caused are shown in the map below.
Dr John Snow is known as the ‘father of modern epidemiology’ and the ‘father of GIS’ because of
the famous case of the 1854 Cholera outbreak in London’s Broad Street region.
3. Kilaini M Arnold
3
Source: UCLA http://www.ph.ucla.edu/epi/snow/snowmap1_1854_lge.htm
The map was made by Dr John Snow, who has conceived the hypothesis that cholera was
transmitted through the drinking of polluted water, rather than through the air, as was commonly
believed. He noticed that the outbreak appeared to be centred on a public drinking water pump in
Broad Street – and if this hypothesis was correct, the pattern shown on the map would reflect the
locations of people who drank the pump’s water. There were anomalies, in the sense that deaths had
occurred in households that were located closer to other sources of water, but he was able to confirm
that these households also drew their water from the Broad Street pump. Snow had the handle of the
pump removed, and the outbreak subsided, providing direct causal evidence in favour of his
hypothesis.
Types of GIS
There are a number of Geographical Information Systems (GIS) (or GIS software) available today.
They range from high-powered analytical software to visual web applications, and each of those are
used for a different purpose.
Due to the vast number of GIS available it is simply not possible to provide training for each in this
course. However, there are common feature in all GIS. Understanding these basic features will give
you confidence with any GIS system that you use in the future.
4. Kilaini M Arnold
4
This following are three groups of GIS:
• Web-based GIS: ONS and London Profiler
• Geobrowser: Google Earth
• Desktop GIS:Quantum GIS(QGIS), ArcGIS,QGIS etc
Defining Geographic Information Systems (GIS)
• The common ground between information processing and the many fields using spatial
analysis techniques. (Tomlinson, 1972)-Father of GIS
• A powerful set of tools for collecting, storing, retrieving, transforming, and displaying spatial
data from the real world. (Burroughs, 1986)
• A computerised database management system for the capture, storage, retrieval, analysis and
display of spatial (locationally defined) data. (NCGIA, 1987)
• A decision support system involving the integration of spatially referenced data in a problem
solving environment. (Cowen, 1988)
Examples of Applied GIS
• Urban Planning, Management
& Policy
– Zoning, subdivision
planning
– Land acquisition
– Economic development
– Code enforcement
– Housing renovation
programs
– Emergency response
– Crime analysis
– Tax assessment
• Civil Engineering/Utility
– Locating underground
facilities
– Designing alignment for
freeways, transit
– Coordination of
infrastructure
maintenance
• Environmental Sciences • Real Estate
5. Kilaini M Arnold
5
– Monitoring
environmental risk
– Modeling stormwater
runoff
– Management of
watersheds, floodplains,
wetlands, forests,
aquifers
– Environmental Impact
Analysis
– Hazardous or toxic
facility siting
– Groundwater modeling
and contamination
tracking
– Neighborhood land
prices
– Traffic Impact Analysis
– Determination of
Highest and Best Use
• Political Science
– Redistricting
– Analysis of election
results
– Predictive modeling
• Health Care
– Epidemiology
– Needs Analysis
– Service Inventory
GIS System Architecture and Components
Data Input
Query Input
Geographic
Database
Transformation and
Analysis
Output: Display
and Reporting
7. Kilaini M Arnold
7
Representing Data with Raster and Vector Models
Raster Model
• area is covered by grid with (usually) equal-sized, square cells
• attributes are recorded by assigning each cell a single value based on the majority feature
(attribute) in the cell, such as land use type.
• Image data is a special case of raster data in which the “attribute” is a reflectance value from
the geomagnetic spectrum
– cells in image data often called pixels (picture elements)
• Vector Model
The fundamental concept of vector GIS is that all geographic features in the real work can be
represented either as:
• points or dots (nodes): trees, poles, fire plugs, airports, cities
• lines (arcs): streams, streets, sewers,
• areas (polygons): land parcels, cities, counties, forest, rock type
Because representation depends on shape, ArcView refers to files containing vector data as
shapefiles
8. Kilaini M Arnold
8
Projection, Scale, Accuracy and Resolution
the key properties of spatial data
• Projection: the method by which the curved 3-D surface of the earth is represented by X,Y
coordinates on a 2-D flat map/screen
– distortion is inevitable
• Scale: the ratio of distance on a map to the equivalent distance on the ground
– in theory GIS is scale independent but in practice there is an implicit range of scales
for data output in any project
• Accuracy: how well does the database info match the real world
– Positional: how close are features to their real world location?
– Consistency: do feature characteristics in database match those in real world
• is a road in the database a road in the real world?
– Completeness: are all real world instances of features present in the database?
• Are all roads included.
9. Kilaini M Arnold
9
• Resolution: the size of the smallest feature able to be recognized
– for raster data, it is the pixel size
10. Kilaini M Arnold
10
INTRODUCTION TO QGIS
A Free and Open Source Geographic Information
System
Quantum GIS (QGIS)- Is a free and open-source desktop geographic information system (GIS)
application that provides data viewing, editing, and analysis. Similar to other software GIS systems,
QGIS allows users to create maps with many layers using different map projections. Maps can be
assembled in different formats and for different uses.[1] QGIS allows maps to be composed
of raster or vector layers. Typical for this kind of software, the vector data is stored as either point,
line, or polygon-feature. Different kinds of raster images are supported, and the software
can georeference images.
Adding Vector Layer/Ctrl+Shif+V
12. Kilaini M Arnold
12
Opening Properties of the Vector Layer
Double click the Vector layer or Right Click the layer
Adding Raster Layer/ Ctrl+Shif+V
OR
14. Kilaini M Arnold
14
Write down -WGS 84/Pseudo Mercator-EPSG: 3857
Importing GPX file in QGIS and Cleaning
a) In QGIS ''Layers'-> 'Add Vector Layer'
15. Kilaini M Arnold
15
b) Chose file type as 'GPX'
c) Navigate to Directory to get the GPX file
d) Open it and select 'Track'.
16. Kilaini M Arnold
16
e) The QGIS will show these as layers.
f) Immediately export (In Menu with right click on layer) 'Save As' the track to
'Shapefile format' with recognizable name and location in the local hard disk.
17. Kilaini M Arnold
17
g) Remove the 'GPX layers' from the QGIS as these are no longer needed h) Load the
saved shapefile.
i) Do 'Toggle Editing' for the track shapefile and use grips to move it and remove unwanted
sections.
j) Save the Editing
Editing in shapefiles in QGIS and Cleaning
In general, tools for editing vector layers are divided into two, digitizing and advanced digitizing.
Below are the icons fro editing
18. Kilaini M Arnold
18
Icon Purpose Icon Purpose
This is used to
show/represent
current or on ongoing
edits
This is used to allow
editing(toggle editing)
This is used to add
features: capture
Point
This is used to add features:
capture line
This is used to add
features: Capture
Polygon
This is used to move features
This is used to allow
editing of
nodes(Node Tool)
This is used to delete features
This is used to cut
features
This is used to with
participants copy features
This is used to paste
features
This is used to save layer
edits.
Other editing tools used are;
Icon Purpose Icon Purpose
The is used to undo
ongoing edits
The is used to redo ongoing
edits
This is used to Rotate
Feature(s)
This is used to simplify
features we were working on
This was explained
and used to add Ring
This was explained and used
to add parts
This was explained
and used to fill Ring
This was explained and used
to delete rings
This is used to delete
Parts
This was explained and used
to reshape features
This is used to offset
Curves
This is used to split features
19. Kilaini M Arnold
19
Icon Purpose Icon Purpose
This is used to split
Parts
Used to merge selected
features
This is used to merge
attributes of selected
features
This is used to rotate point
symbols
Toggle editing: This should be activated to allow editing of the Vector
Creating New Shapefile Layer with the Google map base map
25. Kilaini M Arnold
25
Merging Shapefiles to Single file
The layers to be merged should be in the same folder, then the layers should be selected in the
layers panel as shown in the figure below:
Then Merging is obtained on Vector>>>>Data management tools>>>Merge shapefiles to one
Input directory-The directory which contains the shapefiles to be merged.
Output Shapefile-The New merged shapefiles location that means where do you want the new
merged shapefiles to be saved
27. Kilaini M Arnold
27
Filtering and Separation from Main District roads.
1. After the loading of the Tanzanian Wards in to QGIS with the respective regions ( for
instance Dodoma) then,
28. Kilaini M Arnold
28
2. Filter the attributes by right-clicking the TZ_Wards by clicking it the screen will
show the following and then, filter by clicking the Region name and clicking all, in
the right hand side for selecting region ‘Dodoma’ ” Region name” =‘Dodoma’
29. Kilaini M Arnold
29
3. It will appear like the below diagram ,So you can filter as below, depending on what
you want, if you want to filter the District(for instance Bahi DC)from the beginning,
you will have to go for this command: ” Region name” =‘Dodoma’, then” District
name”=’Bahi’
4. The wards in Bahi will show up but the wards will be acting independently so
30. Kilaini M Arnold
30
5. Merge the features( in QGIS 2.6) Vector>Data Management Vector>Merge Shape
files to one, thereafter SAVE AS (Don’t forget to save the entities in the same file
during merging) so that you Cannot Duplicate your Tanzanian Wards by merging the
whole Bahi Dc become as one like below;
31. Kilaini M Arnold
31
6. For boundary separation, you will have to go for spatial query,
which is (in QGIS 2.6) Vector>Spatial Query>Spatial Query,
THEN
7. Then you Spatial query to the referencing of the Dodoma roads with
respect to the where it intersects so that you can split the roads with
respect to the district boundary
32. Kilaini M Arnold
32
8. Then the Shape file is ready for splitting so that you can separate the
roads with respect to the Bahi DC,As shown in the figure below by
(Toggle Editing, Split Features-snapping options for better accuracy)
By Arnold Kilaini