85% found this document useful (13 votes)
18K views164 pages

Qgis Training Manual PDF

Uploaded by

GachatonyMwaniki
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
85% found this document useful (13 votes)
18K views164 pages

Qgis Training Manual PDF

Uploaded by

GachatonyMwaniki
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

This work is licensed under the Creative Commons Attribution 4.0 International License.

To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/


or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

A copy of the license is included at the end in the section titled “Creative Commons
Attribution 4.0 International Public License”.
Quantum Geographic Information System

Desktop 1 Training Package

An Open Source Desktop Training Package


Produced for the Water Resources Management Authority

First published
Nairobi
April 2017
Dedication
We dedicate this work to the personnel of the Kenyan
Water Resources Management Authority who fully
participated in the modification and testing process of
this QGIS training manual. The Authority has also
included the manual in their standard training content to
enhance their staff’s capacity to utilise GIS tools in their
day-to-day work.

2
QGIS DESKTOP TRAINING

Table of Contents
Foreword ...................................................................................................... 4
Background to Geographic Information Systems and QGIS ........................ 5
How this modified training manual was developed .................................... 6
License ................................................................................................ 7
Authors ............................................................................................... 8
Contributors ........................................................................................ 8
Sponsorship ........................................................................................ 9
How to use this training manual ................................................................ 10
Type of data used ............................................................................. 11
Preparing exercise data .................................................................... 12

Module 1: THE INTERFACE MODULE ......................................................... 13


Lesson 1: A brief introduction .......................................................... 14
Lesson 2: Adding your first layer ...................................................... 18
Lesson 3: An overview of the interface ............................................ 22

Module 2: CREATING A BASIC MAP LESSON .............................................. 27


Lesson 1: Working with Vector Data ................................................ 29
Lesson 2: Symbology......................................................................... 43

Module 3: MAP PUBLICATION ................................................................... 71


Lesson 1: Using the Map Composer ................................................. 72
Some notes to keep in mind ............................................................. 94
Design principles for all maps ........................................................... 94
Map dangers ..................................................................................... 96

Module 4: CREATING VECTOR DATA.......................................................... 98


Lesson 1: Creating a New Vector Dataset ...................................... 100
Lesson 2: Feature Topology ............................................................ 123
Lesson 3: Forms .............................................................................. 148

Recommended for further reading .......................................................... 155

3
QGIS DESKTOP TRAINING

Foreword

This training module focuses on data usage, visualisation, and analyses


with a geographical information system (GIS), the open source software
Quantum GIS (QGIS). Particular emphasis is given to enhancing sustainable
practices in data analysis in Water Resources Management (WRM).

The development of this QGIS manual has been a collaborative effort of the
Kenyan Water Resources Management Authority (WRMA) and the
Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH
Water Sector Reform Programme (WSRP) in Kenya. The lead authors of this
version of the manual include Abel Omanga, George Odhiambo, Nele
Foerch and Daniela Arp. Contributions were also made by Justus Diang’a,
and Tony Mwaniki. Special thanks go to Nele Foerch for taking the lead in
writing and compiling this document, while constantly reminding us about
the importance of documenting our experiences.

Thanks also go to the Free Quantum GIS Training Manual team of Linfiniti
Consulting CC which laid out the whole basis of this manual.

We also thank the officers and interns with the Water Resources
Management Authority who tested the manual during training in the
administrative sub-regions of Lower Nzoia Yala and Northern Shoreline
Nyando as well as the Kisumu regional office.

4
QGIS DESKTOP TRAINING

Background to Geographic Information


Systems and QGIS
Welcome to the wonderful world of geographic information systems!

QGIS (Quantum GIS) is an Open Source Geographic Information System (GIS). The
project was born in 2002 and established as a project on SourceForge the same year.
The QGIS community has worked hard to make GIS software (which is traditionally
expensive proprietary software) a viable prospect for anyone with basic access to a
personal computer. In 2008 QGIS launched the Gentle Introduction to GIS, a
completely free, open content resource for people who want to learn about GIS
without being overloaded with scientific jargon and new terminology. It was sponsored
by the South African government and has been a phenomenal success, with people all
over the world using the materials to run training courses and teach themselves GIS.

QGIS is a user-friendly GIS, providing common functions and features. It currently runs
on most Unix platforms, Windows and OS X. The initial goal of the project was to
provide a GIS data viewer, but it has now reached the point in its evolution where it is
being used by many for their daily GIS data viewing needs. QGIS supports a number of
raster and vector data formats, with new format support easily added using the plugin
architecture.

In Kenya, there has been a rapid rise in the need for GIS tool applications in various
fields and sectors in recent years. The growing need, however, cannot directly be
translated into equal investment in skill enhancement, which presents a major
challenge in adopting GIS. It is often forgotten that not all users need to be GIS
professionals or GIS scientists to be trained in and utilise the technology. Mostly,
professionals need to know the basics to accomplish their duties, without needing
specialised knowledge of GIS tools.

To address this gap, this modified version of the Free Quantum GIS Training Manual by
Linfiniti Consulting CC is tailored to equip Kenyan users with the basic knowledge to
utilise QGIS software in their day-to-day work — especially within the water sector.
QGIS software was chosen since it is an open source, fully supported software that is
steadily advancing over time and in accordance with user demands and technological
changes. The QGIS Gentle Introduction is not a software tutorial but rather aims to be
a generic modified text utilising QGIS in all the learning examples for someone being
trained in basic GIS applications.

5
QGIS DESKTOP TRAINING

How this modified training manual was developed


In Kenya, the Water Resources Management Authority (WRMA) has the mandate of
regulating water use as well as managing water resources. The GIZ Water Sector
Report Programme (GIZ WSRP) has supported the capacity building of WRMA since its
establishment through an Act of Parliament in the year 2005. One of the areas
supported is the adoption of GIS technology in data management. In 2013, due to
great demand, a systematic capacity building programme for WRMA staff in GIS and
data management skills was initiated with the objective of supporting their work in
areas such as water resources mapping, hydrometric data modelling, and map
publication.

An initial evaluation was done in six selected sub-regional offices in the Tana
Catchment Area (TCA). The findings highlighted the need for further training as well as
continuous support for practical application of GIS tools in day-to-day work. Previous
training had failed to enable officers to sustainably apply the software while the
accessibility to the required tools during and after the training was limited. This can be
attributed partially to the use of commercial software, which licence was acquired in
small numbers and eventually expired. The
resulting inaccessibility prevented them
from practising with and utilising the Note that this training
software. Moreover, the use of “foreign” manual does not replace the
instead of locally acquired data during as officially published QGIS user
well as after the training further dampened manuals and references that
interest in the uptake of the software and are freely accessible online.
acquired skills as no immediate outputs Users are encouraged to go
could be generated that visibly helped online and refer the various
officers to meet their targets. topics in detail offered by the
QGIS platform
These findings formed the basis for deciding
(http://docs.qgis.org/2.14/en
to modify and adapt the available online
/docs/training_manual/)
training materials on GIS to the local context
and the needs of WRMA officers. This
involved downloading the QGIS online user
guides and other documentation on selected topics. The downloaded materials were
customised for the intended users. Most of the phrases remain the same as structured
in the initial online QGIS training manual; however, the data sets used as well as the
level of detail throughout the given instructions have changed.

This training manual is intended to provide all the materials needed to run an initial
basic GIS desktop training based on QGIS as the GIS desktop software. The course is
structured with content to suit novice, intermediate and advanced users alike and
offers hands-on exercises that will aid the training process.

6
QGIS DESKTOP TRAINING

License
The Free Quantum GIS Training Manual by Linfiniti Consulting CC. is based on an earlier
version from Linfiniti and is licensed under a Creative Commons Attribution 4.0
International. Permissions beyond the scope of this license may be available (see
below).

The QGIS training manual is published under a liberal license that allows you to freely
copy, modify and redistribute this work. A complete copy of the license is available at
the end of this document. In simple and human readable terms, the usage guidelines
are as follows:

 You may not represent this work as your own work, or remove any authorship
text or credits from this work.
 You may not redistribute this work under more restrictive permissions than
those under which it was provided to you.
 If you add a substantive portion to the work and contribute it back to the
project (at least one complete module) you may add your name to the end of
the authors’ list for this document (which will appear on the front page).
 If you contribute minor changes and corrections you may add yourself to the
contributors’ list below.
 If you translate this document in its entirety, you may add your name to the
authors’ list in the form “Translated by Joe Bloggs”.
 If you sponsor a module or lesson, you may request the author to include an
acknowledgement in the beginning of each lesson contributed.
 If you are unsure about what you may do under this license, please contact us
at office@linfiniti.com and we will advise you if what you intend doing is
acceptable.
 If you publish this work under a self-publishing site such as http://lulu.com we
request that you donate the profits to the QGIS project.
 You may not commercialise this work, except with the expressed permission of
the authors. To be clear, by commercialisation we mean that you may not sell
for profit, create commercial derivative works (e.g. selling content for use as
articles in a magazine). The exception to this is if all the profits are given to the
QGIS project. You may (and we encourage you to do so) use this work as a
textbook when conducting training courses, even if the course itself is
commercial in nature. In other words, you are welcome to make money by
running a training course that uses this work as a textbook, but you may not
profit from the sales of the book itself — all such profits should be contributed
back to QGIS.

7
QGIS DESKTOP TRAINING

Authors
The authors of the Free Quantum GIS Training Manual by Linfiniti Consulting CC
include:

 Rüdiger Thiede (rudi@linfiniti.com) — Rudi has written the QGIS instructional


materials and parts of the PostGIS materials.
 Tim Sutton (tim@linfiniti.com) — Tim has overseen and guided the project and
co-authored the PostgreSQL and PostGIS parts. Tim also authored the custom
sphinx theme used for this manual.
 Horst Düster (horst.duester@kappasys.ch ) — Horst co-authored the
PostgreSQL and PostGIS parts.
 Marcelle Sutton (marcelle@linfiniti.com) — Marcelle provided proofreading
and editorial advice during the creation of this work.

Contributors
The contributors of this adapted version of the training manual tailored to the needs of
the Water Resources Management Authority in Kenya include:

 Abel Omanga (omatech.geodimension@gmail.com) — Abel has taken the lead


in adapting the original QGIS manual to the Kenyan context and the
requirements of the personnel of the Water Resources Management Authority.
He has also conducted most of the training during which the manual was
tested.
 George Odhiambo (georgeodhiambo632@yahoo.com) — George supported
the testing of and contributed towards the adaptation of this work.
 Nele Foerch (nfoerch@gmail.com) — Nele has overseen the finalisation of the
project and provided proofreading and editorial advice during the adaptation
and testing process of this work.
 Daniela Arp (daniela.arp@gmail.com) — Daniela has provided valuable input on
the adaptation needs and supported the testing of this work.
 Tony Mwaniki (tonymwaniki17@yahoo.com) — Tony supported the final
testing, proofreading and editing of this work.
 Justus Diang’a (justusdian@gmail.com) — Justus supported the final testing
and commented on this work.

8
QGIS DESKTOP TRAINING

Sponsorship
The sponsors of the adaptation, as well as the testing process of the modified version,
include:

 The GIZ Water Sector Reform Programme in Kenya (www.giz.de) provided the
expertise required for the adaptation of the context-specific training manual as
well as the training utilising and testing this manual.
 The German Federal Ministry for Economic Cooperation and Development
(BMZ) (www.bmz.de) sponsored the context-specific adaptation process as well
as the training utilising and testing this manual.
 The Kenyan Water Resources Management Authority (www.wrma.or.ke)
supported the context-specific adaptation process through providing some of
the training venues as well as the valuable time and input of their officers to
test this manual.

9
QGIS DESKTOP TRAINING

How to use this training manual


The QGIS interface training manual was developed to be a step-by-step guide to
learning the fundamentals of QGIS as a GIS application and basic understanding of its
fundamental tools. The training can’t guarantee that at its conclusion all trainees will
be proficient geographic information system practitioners since GIS applications are
more software specific. Furthermore, the training will not exhaust the GIS applications
available for water resources management. Despite these limitations, professionals
with a further interest in GIS technology can use the knowledge acquired in the
training to further their knowledge in QGIS and GIS in most of the applications areas.

Keep in mind:
 Do not compare open source software with commercial software. They are not
the same. Most functions are cross-cutting, but software efficiency and
workflow differ.
 Always practise and continuously apply the learned skills in your work —
remember, excellence is a habit, not an act.
 Imagine! As Albert Einstein said, “Imagination is more important than
knowledge. Knowledge is limited to what we know and understand, while
imagination embraces the entire world, and all there ever will be to know and
understand.” The principle is the same for GIS, once you have learned the basic
concepts, there is no limit to how you can apply them if you have great
imagination.

The details, data, and results in this document have been written and verified to the
best of the knowledge and responsibility of the authors and editors. Nevertheless,
errors are possible. Therefore, data are not liable to any duties or guarantees. The
authors, editors and publishers do not take responsibility or liability for any
shortcomings and unintended consequences. However, you are always welcome to
report possible errors to enable future improvements and corrections.

This document can be freely downloaded as a PDF via


http://ubsupprogram-001-site6.atempurl.com/

The training data can also be downloaded from the link


http://ubsupprogram-001-site6.atempurl.com/

10
QGIS DESKTOP TRAINING

Type of data used


The training data used is gathered within the Kenya Water Resources Management
Authority. It includes all models of data, vector data and raster data. The compilation
of data is summarised below:

Type of data Data Source


model
Excel spatial data.xlsx Text data WRMA Kenya
ken_elevation.asc Raster data http://srtm.csi.cgiar.org/
kisumu.tif Raster data WRMA Kenya
kisumu.ecw
Kisumu unreferenced image.jpg Raster data Google earth
butere.jpg
mumias.jp

KERICHO MUNICIPALITY_BLOCK 5.jpg Raster data WRMA Kenya


kenya_health.shp Vector data WRMA Kenya
OSM Point Data.shp Vector data http://www.openstreetmap.org/
wells.shp Vector data WRMA Kenya
WRMA_Regional_offices.shp Vector data WRMA Kenya
Garissa_Rivers.shp Vector data WRMA Kenya
ke_major-rivers.shp, kerail_way.sh, Vector data WRMA Kenya
kenya_roads(wfp)_wgs84.shp
OSM Line Data.shp Vector data http://www.openstreetmap.org/
Roads.shp, Water_way.shp Vector data http://www.openstreetmap.org/
ke-com_100.shp WRMA Kenya
kenya250.shp
ke-com_50.shp
kenya_outside_boundary.shp WRMA Kenya
kenya_poverty_1999.shp
Kenya soil.shp WRMA Kenya
kenya_lakes.shp WRMA Kenya
lu1990.shp WRMA Kenya
lu2000.shp WRMA Kenya
LVSCA WRUAS.shp WRMA Kenya
OSM Multipolygon Data.shp http://www.openstreetmap.org/
exercise_data QGIS
qgis_sample_data QGIS

NOTE: The data used in this training has to have the two folders pasted into local drive
C: for it to retain the structured training data paths.

11
QGIS DESKTOP TRAINING

The data remains the legal property of the sources listed above. For any further use
other than in this manual, you will need clearance from the listed sources.

Preparing exercise data


The sample data provided with the original training manual is limited to only two
sources: open source (open street and Google earth) and local spatial data providers
(WRMA, http://www.wri.org/resources/data-sets/kenya-gis-data).

The dataset contains feature names in English.

Anyone can use this dataset without difficulty, but you may prefer to use data from
your own locality. If you choose to do so, you will be required to navigate to your data
paths without relying on the data paths provided.

NOTE: The sample data used throughout the manual can be downloaded here:

http://qgis.org/downloads/data/training_manual_exercise_data.zip

You will be asked to download a zipped folder called:


training_manual_excercise_data.zip

12
MODULE 1: THE INTERFACE

Module 1:
THE INTERFACE MODULE
Lesson 1: A brief introduction
Lesson 2: Adding your first layer
Lesson 3: An overview of the interface

13
QGIS DESKTOP TRAINING

Lesson 1: A brief introduction


Welcome to the introductory professional training in Desktop GIS using QGIS. The
training is tailored to be easy yet comprehensive enough to enable the trainees to
undertake related tasks with ease. If you’re new to GIS, the training will provide you
with the tools to get started. If you’re an experienced user, you’ll see how QGIS fulfils
all the basic GIS functions you expect from a GIS and more!

In this module we cover the QGIS project, which is integrated with basic exercises that
will give an elaborate basic introduction with the desktop and browser interfaces of
QGIS.

After completing this section, you will be able to correctly identify the main windows,
panels, toolbars and menus of the screen in QGIS, know what each of them does, and
load a shapefile into QGIS.

WARNING

This course includes instructions on adding, deleting and altering GIS datasets.
We have provided training datasets for this purpose. Before using the techniques
described here on your own data, always ensure you have proper backups!

1.1. How to use this tutorial


Any text that looks like this refers to something on the screen that you can click on.

Text that looks like ‣ C:\Q-GIS Training data\Projects directs you through menus as
you navigate to datasets and projects.

1.2. Tiered course objectives


This course caters to different user experience levels. Depending on which category
you consider yourself to be in, you can expect a different set of course outcomes. Each
category contains information that is essential for the next one, so it’s important to do
all exercises that are below or at your level of experience before proceeding further.

14
MODULE 1: THE INTERFACE

1.2.1. Basic
In this category, the course assumes that you have little or no prior experience with
theoretical GIS knowledge or the operation of a GIS program.

Some theoretical background will be provided to explain the purpose of an action you
will be performing in the program, but the emphasis is on learning by doing.

When you complete the course, you will have a better concept of the possibilities of
GIS, and how to harness their power via QGIS.

1.2.2. Intermediate
In this category, it is assumed that you have working knowledge and experience of
the everyday uses of GIS.

Following the instructions for the beginner level will provide you with familiar ground,
as well as make you aware of the cases where QGIS does things slightly differently
from other software you may be used to. You will also learn how to use analysis
functions in QGIS.

When you complete the course, you should be comfortable with using QGIS for all of
the functions you usually need from a GIS for everyday use.

1.2.3. Advanced
In this category, the assumption is that you are experienced with GIS, have knowledge
of and experience with spatial databases, using data on a remote server, perhaps
writing scripts for analysis purposes, etc.

Following the instructions for the other two levels will familiarise you with the
approach that the QGIS interface follows, and will ensure that you know how to access
the basic functions that you need. You will also be shown how to make use of the QGIS
plugin system, database access system, and so on.

When you complete the course, you should be well acquainted with the everyday
operation of QGIS, as well as its more advanced functions.

1.3. Why QGIS?


As information becomes increasingly spatially aware, there is no shortage of tools able
to fulfil some or all commonly used GIS functions. Why should anyone be using QGIS
over some other GIS software package?

15
QGIS DESKTOP TRAINING

Here are some of the reasons:

 It’s free, as in lunch. Installing and using the QGIS program costs you a grand
total of zero money. No initial fee, no recurring fee, nothing.
 It’s free, as in liberty. If you need extra functionality in QGIS, you can do more
than just hope it will be included in the next release. You can sponsor the
development of a feature, or add it yourself if you are familiar with
programming.
 It’s constantly developing. Because anyone can add new features and improve
on existing ones, QGIS never stagnates. The development of a new tool can
happen as quickly as you need it to.
 Extensive help and documentation is available. If you’re stuck with anything,
you can turn to the extensive documentation, your fellow QGIS users, or even
the developers.
 Cross-platform. QGIS can be installed on MacOS, Windows and Linux.

Now that you know why you want to use QGIS, we can show you how. The first lesson
will guide you in creating your first QGIS map.

Lesson preparation
The training requirements:

1. QGIS software (freely available for download). You can install the QGIS through
the following steps
a. Open a web browser
b. Insert the URL: http://www.qgis.org/en/site/
c. Click on the Download now option
d. Identify the suitable download option depending on your operating system
e. Select and click on the QGIS standalone installer version 2.10 option suiting
the operating system specifications, either 32 or 64 bit.
f. You will be presented with a popup menu with option to save the file to
local disk
g. Click Save
h. Navigate to the Download folder and double click the installation file
i. Follow the popup instructions

2. A computer (1GB of RAM, 1.2GHZ, and at least 2GB of free storage space in the
local disk)
3. A notebook (small and easy to carry)
4. A pen
5. An exercise manual

16
MODULE 1: THE INTERFACE

Ensure you copy the training data availed by the facilitator in a DVD to Local disk C.

NOTE: Do not create folders for the data; this will interfere with the navigation path.

This is a professionally certified training where every exercise counts. This means we
take all exercises and the related tasks seriously.

This is a step by step training where everyone is encouraged to follow the


steps during the illustration, before undertaking the individual exercises.
Anyone seeking help during the exercises should raise their hand as a sign to
the facilitator(s) — if available — that assistance is needed.

17
QGIS DESKTOP TRAINING

Lesson 2: Adding your first layer


We will start the application, and create a basic map to use for examples and exercises.

The goal for this lesson:


To get started with an illustrative QGIS project.

Launch QGIS from its desktop shortcut, menu item, etc., depending on how you
configured its installation.

NOTE: the screenshots for this course were taken in QGIS 2.10.1 running on Windows 8.
Depending on your setup, the screens you encounter may appear somewhat different.
However, all the same buttons will still be available, and the instructions will work on
any OS. You will need QGIS 2.10.1 (the latest version at time of writing) or you can use
a newer version of QGIS though it will have some differences in tool appearance and
function.

Let’s get started right away!

2.1. Follow along: Prepare a map

a. Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.
b. You will have a new blank map.

c. Click on the Add Vector Layer tool.

d. Click on the Browse button in the Add vector layer popup window and navigate
the path C:/Q-GIS Training data/Vector data/Poly_line data/Roads/Roads.shp
e. Double click the file Roads.shp that has Type indicated as SHP File.

18
MODULE 1: THE INTERFACE

SHP file type-


Contains geometry
properties of
vector data

f. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector window then follow the sub-steps below, otherwise
proceed to the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

Only type the


code: 4326

Click once on
the WGS 84

Click OK
once

19
QGIS DESKTOP TRAINING

Congratulations! You now have a basic map. Now would be a good time to save your
work.

NOTE: The map lacks the basic elements that enable the map reader to decode and
understand a map. Not even labels are there on the map, only graphics. This is just the
start.

 Click on the Save As button:


 Navigate the path C:\Q-GIS Training data\Projects and save the map under it
as INTERFACE MODULE
 After saving your map, you should be able to see the name you saved your map
as from the Project Title Bar as illustrated below.

20
MODULE 1: THE INTERFACE

NOTE: you can proceed to the next exercise or exit the program and take a break.

2.2. In conclusion
You’ve learned how to add a layer and create a basic map!

2.3. What’s next?


Now you’re familiar with the function of the Add Vector Layer button, but what about
all the others? How does this interface work? Before we go on with the more involving
stuff, let’s first take a good look at the general layout of the QGIS interface. This is the
topic of the next lesson.

21
QGIS DESKTOP TRAINING

Lesson 3: An overview of the interface


We will explore the QGIS user interface so that you are familiar with the menus,
toolbars, map canvas and layers list that form the basic structure of the interface.

The goal for this lesson:


To understand the basics of the QGIS user interface.

3.1. Try yourself...: The Basics


1 2 3

4
5

The elements identified in the figure above are:

1. Project title bar


2. Menu bar
3. Toolbar
4. Layers list
5. Map canvas
6. Status bar
7. Side toolbar

22
MODULE 1: THE INTERFACE

3.1.1. The Layers list


In the Layers list, you can see a list, at any time, of all the layers available to you for
display in the canvas.

Expanding collapsed items (by clicking the arrow or plus symbol beside them) will
provide you with more information on the layer’s current appearance.

Right-clicking on a layer name will give you a menu with lots of extra options. You will
be using some of them before long, so take a look around!

Some versions of QGIS have a separate Control rendering order checkbox just
underneath the Layers list. Don’t worry if you can’t see it. If it is present, ensure that
it’s checked for now.

Note: a vector layer can consist of either points, lines or polygons. A vector layer is a
dataset, usually of a specific kind of object, such as roads, trees, etc.

3.1.2. Toolbars
Your most often-used sets of tools can be turned into toolbars for basic access. For
example, the File toolbar allows you to save, load, print, and start a new project. You
can easily customise the interface to see only the tools you use most often, adding or
removing toolbars as necessary via the View ‣ Toolbars menu.

Even if they are not visible in a toolbar, all of your tools will remain accessible via the
menus. For example, if you remove the File toolbar (which contains the Save button),
you can still save your map by clicking on the File menu and then clicking on Save.

To add new toolbars, follow the following path:

1. Click on View
2. Highlight the Toolbars option
3. Move the cursor to the right popup menu and then click on the toolbar desired
to turn it on as illustrated in the figure below.

23
QGIS DESKTOP TRAINING

3.1.3. The Map Canvas


This is where the map itself is displayed.

Map
Canvas

24
MODULE 1: THE INTERFACE

3.1.4. The Status Bar


This shows you information about the current map. It also allows you to adjust the
map scale and see the mouse cursor’s coordinates on the map.

Status
Bar

3.2. Try yourself... 1


Try to identify the four elements (Layers list, Map canvas, Status bar, Side toolbar)
listed above on your own screen, without referring to the diagrams above. See if you
can identify their names and functions. You will become more familiar with these
elements as you use them in the coming days.

3.3. Try yourself... 2


Try to find each of these tools on your screen. What is their purpose?

1 2 3 4 5

HINT: If any of these tools is not visible on the screen, try enabling some toolbars that
are currently hidden. Also keep in mind that if there isn’t enough space on the screen,
a toolbar may be shortened by hiding some of its tools. You can see the hidden tools
by clicking on the double right arrow button in any such collapsed toolbar. You can see
a tooltip with the name of any tool by holding your mouse over the tool for a while.

25
QGIS DESKTOP TRAINING

3.4. What’s next?


Now you’ve seen how the QGIS interface works, you can use the tools available to you
and start improving on your map! This is the topic of the next lesson.

26
MODULE 2: CREATING A BASIC MAP

Module 2:
CREATING A BASIC MAP LESSON

Lesson 1: Working with Vector Data


Lesson 2: Symbology

27
QGIS DESKTOP TRAINING

In this module, you will create a basic map which will be used later as a basis for
further demonstrations of QGIS functionality.

Lesson 1: Working with Vector Data

1.1. Follow along: Viewing layer attributes

1.2. Follow along: Loading vector data from shapefiles

1.3. Follow along: Reordering the layers

1.4. In conclusion

1.5. What’s next?

Lesson 2: Symbology

2.1. Follow along: Changing colours

2.2. Try yourself...

2.3. Follow along: Changing symbol structure

2.4. Try yourself...

2.5. Follow along: Scale-based visibility

2.6. Follow along: Adding symbol layers

2.7. Try yourself...

2.8. Follow along: Enabling symbol levels

2.9. Try yourself...

2.10. Try yourself...

2.11. Follow along: Symbol layer types

2.12. Follow along: Creating a custom SVG fill

2.13. In conclusion

2.14. Further reading

2.15. What’s next?

28
MODULE 2: CREATING A BASIC MAP

Lesson 1: Working with Vector Data


Vector data is arguably the most common kind of data you will find in your daily use of
GIS. It describes geographic data in terms of points that may be connected into lines
and polygons. Every object in a vector dataset is called a feature and is associated with
attribute data that describes that feature.

The goal for this lesson: To learn about the structure of vector data and more on how
to load vector datasets into a map.

1.1. Follow along: Viewing layer attributes


It’s important to know that the data you will be working with not only represents
where objects are in space but also tells you what those objects are.

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer tool.

29
QGIS DESKTOP TRAINING

Click only once on the Browse button in the Add Vector Layer popup window and
navigate the path C:/QGIS Student/Q-GIS Training data/Vector data/Point
data/kenya health services data/kenya_health.shp

Double click the file kenya_health.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector window follow the sub-steps below, otherwise proceed to
the next step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

Only type the


code: 4326

Click once on
the WGS 84

Click OK
once

The kenya_health layer is added to the map. What you can see right now is merely the
location of the kenya_health centres.

NOTE: Don’t worry about the default display symbology of the graphics. This will vary
from computer to computer.

30
MODULE 2: CREATING A BASIC MAP

To see all the data available to you, click on this Open Attribute Table tool
located on the Tool Bar:

31
QGIS DESKTOP TRAINING

It will show you a table with more data about the kenya_health layer. This extra data
describing displayed point data (Kenya_health layer) is called attribute data. The
graphics - Points- that you can see on your map represent where the health centres
are located in space; this is the spatial data.

NOTE: These definitions are commonly used in GIS, so it’s essential to remember them!

You may now close the attribute table.

Vector data represents features in terms of points, lines and polygons on a coordinate
plane. It is usually used to store individual features, like roads and city blocks.

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Viewing Layer Attributes

Exit the desktop application.

NOTE: Remember to save your map!

1.2. Follow along: Loading vector data from shapefiles


The Shapefile is a specific file format that allows you to store GIS data in an associated
group of files. Each layer consists of several files with the same name, but different file
types/extensions (e.g. .shp, .dbf, .sbx, .sbn). In order to add vector data from a
shapefile, always load data that has the file type/file extension indicated as SHP.
Shapefiles are easy to send back and forth, and most GIS software can read them.

Refer back to the introductory exercise in the previous section for instructions on how
to add vector layers.

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Click on the Add Vector Layer tool.

32
MODULE 2: CREATING A BASIC MAP

Click only once on the Browse button in the Add Vector Layer popup window and
navigate the path C:/QGIS Student/Q-GIS Training data/Vector data/Polygon
data/land_use_1990/lu1990.shp

Double click the file lu1990.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub- steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The lu1990 layer is added to the map.

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Loading Vector Data

Exit the desktop application.

NOTE: Remember to save your map!

All the vector data is added to the map utilising the same procedure.

33
QGIS DESKTOP TRAINING

1.3. Follow along: Reordering the layers


The layers in your Layers list are drawn on the map in a certain order. The layer at the
bottom of the list is drawn first, and the layer at the top is drawn last. By changing the
order that they are shown on the list, you can change the order they are drawn in.

NOTE: Depending on the version of QGIS that you are using, you may have a checkbox
beneath your Layers list reading Control Rendering Order. This must be checked
(switched on) so that moving the layers up and down in the Layers list will bring them
to the front or send them to the back of the map. If your version of QGIS doesn’t have
this option, then it is switched on by default and you don’t need to worry about it.

1.3.1 Adding Point data

Launch the QGIS desktop by double clicking the icon on the desktop if not

already open. Click on the Add Vector Layer tool.

Click only once on the Browse button in the Add Vector Layer popup window and
navigate the path C:/QGIS Student/Q-GIS Training data/Vector data/Point
data/kenya health services data/kenya_health.shp

Double click the file kenya_health.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The kenya_health layer is added to the map.

34
MODULE 2: CREATING A BASIC MAP

1.3.2 Adding Line Data

Click on the Add Vector Layer Tool

Click only once on the Browse button in the Add vector Layer popup window and
navigate the path C:/QGIS Student/Q-GIS Training data/Vector data/Poly_line
data/ke_major-rivers/ke_major-rivers.shp

Double click the file ke_major-rivers.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The ke_major-rivers layer is added to the map.

Click on the Add Vector Layer tool.

35
QGIS DESKTOP TRAINING

Click only once on the Browse button in the Add vector Layer popup window and
navigate the path C:/QGIS Student/Q-GIS Training data/Vector data/Polygon
data/Kenya Soil/Kenya soil.shp

Double click the file Kenya soil.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The Kenya soil layer is added to the map.

1.3.3 What is a raster?


Raster data in GIS represent features on, above or below the earth’s surface. In its
simplest form, a raster consists of a matrix of cells (or pixels) organized into a grid, as
shown in the graphic below, where each cell contains a value representing
information, such as temperature. Rasters can be digital aerial photographs, imagery
from satellites, digital pictures, or even scanned maps.

The area (or surface) represented by each cell consists of the same width and height
and is an equal portion of the entire surface represented. For example, a raster
representing elevation (that is, digital elevation model) may cover an area of 100

36
MODULE 2: CREATING A BASIC MAP

square kilometres. If there were 100 cells in this raster, each cell would represent one
square kilometre of equal width and height (that is, 1 km x 1 km).

LANDFIRE data cells are 30 metres by 30 metres, with each cell or pixel representing an
area of 900 square metres, or 2224 acres. Data stored in a raster format represent
real‐world phenomena such as:

 Thematic data (also known as discrete data), representing features such as


land use or soils data. LANDFIRE data layers depicting fuels, vegetation, fire
regimes, and other features are also examples of this.
 Continuous data representing phenomena such as temperature and elevation
data or spectral data, including, for example, satellite images and aerial
photographs.
 Pictures: examples include scanned maps or drawings and building
photographs.

Within a GIS, the uses of raster data fall under four main categories:

a) Rasters as base maps


A common use of raster data in a GIS is as a background display for other feature
layers. For example, orthophotographs displayed underneath other layers provide the
map user with confidence that map layers are spatially aligned and represent real
objects, as shown in the image below. Three main sources of raster base maps are
orthophotos from aerial photography, satellite imagery, and scanned maps.

37
QGIS DESKTOP TRAINING

b) Rasters as surface maps


Rasters are well suited for representing data that changes continuously across a
landscape (surface). They provide an effective method for storing the continuity and
provide a regularly spaced representation of surfaces. Elevation values measured from
the earth’s surface are the most common application of surface maps, as depicted in
the graphic below. Other values, such as rainfall, temperature, concentration, and
population density, can also define surfaces that can be spatially analysed.

c) Rasters as thematic maps


Rasters representing thematic data can be derived from analysing other data. A
common analysis application is the classification of a satellite image by land‐cover
categories. Basically, this activity groups the values of multispectral data into classes
(such as biophysical settings shown in the graphic below) and assigns a categorical
value. Thematic maps can also result from geoprocessing operations that combine
data from various sources, such as vector, raster, and terrain data. For example, a user
can process data through a geoprocessing model to create a raster dataset that maps
suitability for a specific activity. Most of the LANDFIRE data layers are derived in this
manner.

38
MODULE 2: CREATING A BASIC MAP

d) Rasters as attributes of a feature


Rasters used as attributes of a feature may be digital photographs (see image below),
scanned documents, or scanned drawings related to a geographic object or location. A
parcel layer may have scanned legal documents identifying the latest transaction for
that parcel, or a layer representing cave openings may have pictures of the actual cave.

ADDING RASTER DATA

Click on the Add Raster Layer tool

Click on the Browse button in the popup window and navigate the path C:/QGIS
Student/Q-GIS Training data/Raster data/kenya elevation/ken_elevation.asc

39
QGIS DESKTOP TRAINING

Open by clicking
layer with file
type (ASC FILE)

Double click the file ken_elevation.asc

Click Open in the Add Raster Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The ken_elevation layer is added to the map.

The order in which the layers have been loaded into the map is probably not logical at
this stage. It’s possible that the kenya_health data layer is hidden because other layers
are on top of it.

40
MODULE 2: CREATING A BASIC MAP

To resolve this problem:


Click and drag on a layer in the Layers list.

Reorder them to look like this:

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Reordering the layers.qgs

Exit the desktop application.

NOTE: Remember to save your map!

41
QGIS DESKTOP TRAINING

1.4. In conclusion
Now you’ve added all the layers you need from several different sources.

NOTE: It is always best practice to have the point data at the top in the Table of
Content, then the line data, followed by polygons and at the bottom the raster data, if
you need to display all these data sets at the same time.

1.5. What’s next?


Using the random palette automatically assigned when loading the layers, your current
map is probably not easy to read. It would be preferable to assign your own choice of
colours and symbols. This is what you’ll learn to do in the next lesson.

42
MODULE 2: CREATING A BASIC MAP

Lesson 2: Symbology
The symbology of a layer is its visual appearance on the map. The basic strength of GIS
over other ways of representing data with spatial aspects is that, with GIS, you have a
dynamic visual representation of the data you’re working with.

Therefore, the visual appearance of the map (which depends on the symbology of the
individual layers) is very important. The end users of the maps you produce need to be
able to easily see what the map represents. Equally as important, you need to be able
to explore the data as you’re working with it, and good symbology helps a lot.

In other words, having proper symbology is not a luxury or just nice to have. In fact, it’s
essential in order for you to use GIS properly and produce maps and information that
people will be able to use.

The goal for this lesson:


To be able to create any symbology you want for any vector layer.

2.1. Follow along: Changing colours


To change a layer’s symbology, open its Layer Properties. Let’s begin by changing the
symbology of the kenya_poverty_1999 layer.

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

43
QGIS DESKTOP TRAINING

Click on the Add Vector Layer tool

Click only once on the Browse button in the Add Vector Layer popup window and
navigate the path C:/Q-GIS Training data/Vector data/Polygon data/Kenya poverty
data/kenya_poverty_1999.shp

Double click the file kenya_poverty_1999.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The kenya_poverty_1999 layer is added to the map.

Right-click on the kenya_poverty_1999 in the Layers list.

Select with a single click on the menu item Properties in the right-click popup menu.

Note: By default, you can also access a layer’s properties by double-clicking on the layer
in the Layers list.

44
MODULE 2: CREATING A BASIC MAP

In the Properties window:

1 2

1. Select the Style tab at the extreme left.


2. Click the Symbology selection window.

3. Choose Categorized option in the drop-down window.

45
QGIS DESKTOP TRAINING

6
4

5
7

4. For the Column option choose LOCATION field.


5. Click Classify button. If prompted with the High number of Classes notification
window, click OK.
6. Choose a suitable Colour ramp to display land use.
7. Click OK button on the properties window.

You will get a display like the one below:

46
MODULE 2: CREATING A BASIC MAP

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Changing Colours

Exit the desktop application.

2.2. Try yourself...


Change the layer to kenya250, categorize the colour using the SHEET_NAME field as
the classifier, with a colour ramp type Reds.

To add the data, navigate the path C:/Q-GIS Training data/Vector data/Polygon
data/Kenya grid/Ke-Com_250/kenya250.shp

NOTE: Remember to save your map!

2.3. Follow along: Changing symbol structure


This is good so far, but there’s more to a layer’s symbology than just its colour. Next,
we want to change the colour of the farms (the Landuse layer), but we also want to
eliminate the lines between the different farms so as to make the map less visually
cluttered.

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Click on the Add Vector Layer tool.

47
QGIS DESKTOP TRAINING

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

Double click the file LVSCA WRUAS.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA WRUAS layer is added to the map.

Double click the LVSCA WRUAS name in the layer list to open its properties.

2 3
4

1. Click only once on Style tab.


2. Select the Categorized symbology in the symbology selection entry.
3. For the column option, select WRUA_NAME field. This field will be used to
classify the layer while symbolising.

NOTE: Under the Style tab, you will see the same kind of dialog as before. This time,
however, you’re doing more than just quickly changing the symbology.

4. Set the colour ramp to Oranges.


5. Click Classify to see the colour effect preview.
6. Click OK, but only once.

48
MODULE 2: CREATING A BASIC MAP

Next, we want to get rid of the lines between all the farms.

Re-open the Layer Properties window for the LVSCA WRUAS layer by double-clicking
the layer name in the Layer List window.

Click on the Style tab as in the previous exercise if not active.

Click on the Change button to open the Symbol selector window:

9
7

10

7. Click the button next to the Colour label Simple Fill to enable the options.
8. Click on the Border style drop-down menu; change this to No Pen.
9. Click OK, and
10. Then OK again.

Now the LVSCA WRUAS won’t have any lines between the polygons.

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects and
save the map under it as Changing symbol structure

Exit the desktop application.

49
QGIS DESKTOP TRAINING

2.4. Try yourself...


Change the vector layer Kenya soil layer’s symbology so that it is grey and without
outlines. The data is located in the file path C:/Q-GIS Training data/Vector
data/Polygon data/Kenya Soil/Kenya soil.shp

NOTE: Remember to save your map!

50
MODULE 2: CREATING A BASIC MAP

2.5. Follow along: Scale-based visibility


Sometimes you will find that a layer is not suitable for a given scale. For example, a
dataset of all the continents may have low detail, and not be very accurate at street
level. When that happens, you want to be able to hide the dataset at inappropriate
scales.

In our case, we may decide to hide the roads from view at small scale. This map,
below, for example, is not very useful. The roads are just a blob at this scale.

To enable scale-based rendering:

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Go to the menu bar, click Projects then click Open and navigate the path C:\Q-GIS
Training data\Projects

Double click to open the Project Scale Based Visibility.qgs

Double click the Roads layer name in the Layers list to open the Layer Properties
dialog for the Roads layer.

51
QGIS DESKTOP TRAINING

2
3 4
1

1. Click once on the General tab to activate.


2. Enable scale-based rendering by clicking on the checkbox labelled Use scale
dependent visibility to turn it on.
3. Set the minimum scale to 1:500,000.
4. Utilising the drop-down menu, select the Maximum value to 1:100, 000.
5. Click OK.

Test the effects of this by zooming in and out in your map, noting when the Roads
layer disappears and reappears.

Click on the Save button to save your QGIS project that contains added
parameters of scale-based visibility:

Go to the menu bar, click once on Projects menu then click Exit QGIS in the menu list.

NOTE: You can use your mouse wheel to zoom in increments. Alternatively, use the
zoom tools to zoom to a window.

2.6. Follow along: Adding symbol layers


Now that you know how to change simple symbology for layers, the next step is to
create more complex symbology. QGIS allows you to do this using symbol layers.

52
MODULE 2: CREATING A BASIC MAP

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer tool.

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

Double click the file LVSCA WRUAS.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA WRUAS layer is added to the map.

Double click the LVSCA WRUAS layer name in the Layers list window to open the Layer
Properties dialog for the LVSCA WRUAS layer.

53
QGIS DESKTOP TRAINING

1. Click once on the Style tab.


2. Set the symbology to Single Symbol.
3. Click the Add Symbol Layer button and it will add a new symbol layer:

5 6

4 7

4. Click once on the topmost symbol layer.


5. Set the Fill to Green colour.
6. Change the fill style to Dense 1.
7. Set the border style to No Pen.
8. Click OK in this dialog to apply the changes. Now you can see your results.

You should achieve a display that is unique from the default fill.

54
MODULE 2: CREATING A BASIC MAP

NOTE: It’s important not to get confused between a map layer and a symbol layer. A
map layer is a vector (or raster) that has been loaded into the map. A symbol layer is
part of the symbology used to represent a map layer. This training course will usually
refer to a map layer as just a layer, but a symbol layer will always be called a symbol
layer, to prevent confusion.

You can even add multiple extra symbol layers and create a kind of texture for your
layer that way. It’s fun! (But it probably has too many colours to use in a real map.)

Multiple
symbol layers

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects and
save the map under it as Adding symbol layers

Exit the desktop application.

55
QGIS DESKTOP TRAINING

2.7. Try yourself...


Create a simple, but not distracting texture for the LVSCA WRUAS layer using the
methods above.

NOTE: Remember to save your map!

2.8. Follow along: Enabling symbol levels


When symbol layers are rendered, they are also rendered in a sequence, similar to
how the different map layers are rendered. This means that in some cases, when
having many symbol layers in one symbology, rendering can cause unexpected results.
Think of this exercise as a way of generating your own symbology for a particular
dataset using the already existing symbols within the software.

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer tool.

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Poly_line data/Roads/Roads.shp

Double click the file Roads.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

56
MODULE 2: CREATING A BASIC MAP

Double click the Roads layer name in the Layer List window to open its properties.

3 4

7
1

6
2

1. Click on the Style tab once if inactive.


2. Click the Add Symbol Layer tool once to add an extra symbol layer.
3. Click once on the newly added symbol layer.
4. Set the pen width of 2.0 for the top symbol layer.
5. Set the colour to Black.
6. Set the Pen style to Dash line.

To add another Symbol Layer, repeat the steps but observing the new parameters.

7. Click once on the second Symbol Layer below the first:


 Set the pen width of 4.0 for the top symbol layer
 Set the colour to Green
 Set the Pen style to Solid line

Click OK.

You’ll notice that the following happens:

57
QGIS DESKTOP TRAINING

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects and
save the map under as Enabling Symbol Levels

Exit the desktop application.

NOTE: Remember to save your map!

2.9. Try yourself...


Change the appearance as above for the kenya_roads(wfp)_wgs84 layer again.

Navigate the path C:/Q-GIS Training data/Vector data/Poly_line


data/Kenya_Roads/kenya_roads(wfp)_wgs84.shp to add the data.

2.10. Follow along: Symbol layer types


In addition to setting fill colours and using predefined patterns, you can use entirely
different symbol layer types. The only type we’ve used up to now has been the Simple
Fill type. The more advanced symbol layer types allow you to customize your symbols
even further.

Each type of vector (point, line and polygon) has its own set of symbol layer types.
First we will look at the types available for points.

2.10.1 Point symbol layer types


Change the symbol properties for the OSM Point Data layer:

58
MODULE 2: CREATING A BASIC MAP

The data is stored in the path C:/Q-GIS Training data/Vector data/Point data/OSM
Point Data/OSM Point Data.shp

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer Tool

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Point data/OSM Point Data/OSM Point Data.shp

Double click the file OSM Point Data.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The OSM Point Data layer is added to the map

You can access the various symbol layer types here:

Double click the OSM Point Data layer in the Layer List window, to open the Layer
Properties.

59
QGIS DESKTOP TRAINING

5
1 4

7
8

1. Click on the Style tab once if not selected.


2. Select the Single Symbol in the Symbology drop-down menu.
3. Click only once on the Simple Marker layer.
4. Click the symbol layer type drop-down menu and explore the Symbol layer
types accessible. Select the SVG marker.
5. Set the size to 10.00.
6. Set the fill colour to Yellow.
7. Set the Border colour to Black.
8. Set the Border width to a higher value (15.00-20.00).
9. Click OK.

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects
and save the map under it as Point Symbol Layer Types

Exit the desktop application.

NOTE: Remember to save your map!

60
MODULE 2: CREATING A BASIC MAP

2.10.2 Line symbol layer types


To see the various options available for line data:

 Launch the QGIS desktop by double clicking the icon on the Desktop if
not already open.

 Click on the Add Vector Layer tool.

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Poly_line
data/Kenya_Roads/kenya_roads(wfp)_wgs84.shp

Double click the layer kenya_roads(wfp)_wgs84.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The kenya_roads(wfp)_wgs84.shp layer is added to the map.

Double click the kenya_roads(wfp)_wgs84 layers name in the layer list window to
open its properties.

61
QGIS DESKTOP TRAINING

2 4

1. Click on the Style tab once if not selected.

2. Select the Single Symbol in the Symbology drop-down menu.

3. Click once on the Simple fill symbology layer.

4. Click the symbol layer type drop-down menu and explore the Symbol layer
types accessible. Select the Marker Line with a single click.

62
MODULE 2: CREATING A BASIC MAP

5. Set the Marker placement width interval to 3.0.

6 8

6. Click once on the Simple marker layer.


7. Set the fill colour to Yellow.
8. Click on Add Symbol Layer tool once.
9. Click once on the Simple Line symbology layer in the symbology window.

63
QGIS DESKTOP TRAINING

10 11

13 12
14

10. Set the Pen colour to Red.

11. Set the Pen width to 5.00.

12. Click once on the Simple layer type drop-down menu and select with a single
click on Outline: Simple Line option.

13. Click once on the Move down tool. This will enable visibility of the marker
points by moving the thick line beneath the marker points.

14. Click OK.

Zoom in to see the changes.

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects and
save the map under it as Line symbol layer types

64
MODULE 2: CREATING A BASIC MAP

Your final product should resemble the figure above.

Exit the desktop application.

NOTE: Remember to save your map!

2.10.3 Polygon symbol layer types


To see the various options available for polygon data:

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Click on the Add Vector Layer tool.

65
QGIS DESKTOP TRAINING

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

Double click the file LVSCA WRUAS.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA WRUAS layer is added to the map.

Double click the LVSCA WRUAS layer’s name in the Layer List window to open its
properties.

66
MODULE 2: CREATING A BASIC MAP

2 3 4
1

1. Click on the Style tab once if not selected.

2. Select the Categorized Symbol in the Symbology drop-down menu.

3. For the Column select WRUA_NAME as the symbolising defining field.

4. Set the Colour Ramp to Random Colours.

5. Click once on the Classify button.

6. Click Ok once.

As a result, you have a textured symbol for the LVSCA WRUAS layer, with the added
benefit that you can symbolize every polygon with a unique colour. Random colours
will have a display like the one below.

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects and
save the map under it as Polygon symbol layer types.

Exit the desktop application.

NOTE: Remember to save your map!

67
QGIS DESKTOP TRAINING

2.11. Quantitative Symbology in polygons

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Click on the Add Vector Layer tool.

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

Double click the file LVSCA WRUAS.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA WRUAS layer is added to the map.

Double click the LVSCA WRUAS layer name in the layer list window to open its
properties.

68
MODULE 2: CREATING A BASIC MAP

1 2 3

1. Click on the Style tab once if not selected.

2. Select the Categorized Symbol in the Symbology drop-down menu.

3. For the Column select AreasqKm as the symbolising defining field.

4. Set the Colour Ramp to Random Colours.

5. Click only once on the Classify button.

6. Click OK once.

Click the Plus sign before the layer name in the layer list window. This expands the
symbology view.

Click on Plus
Sign to expand
symbology view

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects and
save the map under it as Quantitative symbology in polygons

Exit the desktop application.

69
QGIS DESKTOP TRAINING

2.12. In conclusion
Changing the symbology for the different layers has transformed a collection of vector
files into a legible map. Not only can you see what’s happening, it’s even nice to look
at!

2.13. Further reading


Use the hyperlink in the soft document Examples of Beautiful Maps or
http://gis.stackexchange.com/questions/3083/what-makes-a-map-beautiful

2.14. What’s next?


Changing symbols for whole layers is useful, but the information contained within each
layer is not yet available to anyone reading these maps. What are the streets called?
Which WRUAs do certain areas belong to? What are the relative surface areas of the
WRUAs? All this information is still hidden. The next lesson will explain how to
represent this data on your map.

NOTE: Remember to save your map!

70
MODULE 3: MAP PUBLICATION

Module 3:
MAP PUBLICATION

Using the Map Composer

71
QGIS DESKTOP TRAINING

Lesson 1: Using the Map Composer


In this module, you’ll learn how to use the QGIS Map Composer to produce quality
maps with all the requisite map components.

1.1 Follow along: Let us add data to the display

1.2 Follow along: The Composer Manager

1.3 Follow along: Basic Map Composition

1.4 Follow along: Adding a title

1.5 Follow along: Adding a legend

1.6 Follow along: Customizing legend items

1.7 Follow along: Adding grids

1.8 Follow along: Adding North Arrow

1.9 Follow along: Scale Bar

1.10 Follow along: Exporting your Map

1.11 In conclusion

Now that you’ve got a map, you need to be able to


NOTE: To compose a map
print it or to export it to a document in various
for printing, one needs to
raster formats: JPEG, TIFF, PNG, IMG, etc. The
have organised datasets
reason is, a GIS map file is not an image! Rather, it
in display. They must be in
saves the state of the GIS program, with references
the right symbology and
to all the layers, their labels, colours, etc. So for
labels visible at the right
someone who doesn’t have the data or the same
scale. The symbology has
GIS program (such as QGIS), the map file will be
to conform to the common
useless. Luckily, QGIS can export its map file to a
map interpretation aids.
format that anyone’s computer can read, as well as
The map has to contain all
printing out the map if you have a printer
the map elements not
connected. Both exporting and printing are handled
leaving out the publisher
via the Map Composer.
signature, date of release,
The goal for this lesson: datum, map units, grid
To use the QGIS Map Composer to create a basic and disclaimer.
map with all the required settings.

72
MODULE 3: MAP PUBLICATION

First, you need to add the following data: WRMA_regional_offices,


ke_major_rivers.shp, Kenya_lakes.shp and the six basins in Kenya.

1.1 Follow along: Let us add data to the display

1.1.1 To add WRMA_regional_offices (Point data)

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

1. Click on the Add Vector Layer tool.

2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Point data/WRMA regional
offices/WRMA_Regional_offices.shp
3. Double click the file WRMA_Regional_offices.shp
4. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The WRMA_Regional_offices layer is added to the map.

Turning on labels
1. Double click the WRMA_Regional_offices layer name in the Layer List window.
This opens the layer’s properties.
2. Click the Labels tab once.

73
QGIS DESKTOP TRAINING

3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select
TOWN_NAME with a single click.
5. Click Ok in the layer properties window. The layer should now have
TOWN_NAME label displayed.

1.1.2 To add Kenya’s major rivers (Vector data)

1. Click on the Add Vector Layer tool (see 1.1.1 to recall how to do this).
2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Poly_line data/ke_major-rivers/ke_major-
rivers.shp
3. Double click the file ke_major-rivers.shp
4. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The ke_major-rivers layer is added to the map.

74
MODULE 3: MAP PUBLICATION

1.1.3 To add Kenya lakes layer (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya_Lakes/kenya_lakes.shp
3. Double click the file kenya_lakes.shp
1. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The kenya_lakes layer is added to the map.

Turning on labels
1. Double click the kenya_lakes layer name in the layer list window. This opens
the layer’s properties.
2. Click the Labels tab once.
3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select NAME
with a single click.
5. Click OK in the layer properties window. The layer should now have NAME
labels displayed.

75
QGIS DESKTOP TRAINING

1.1.4 To add TCA basin boundary (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and Navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6 basins/TCA/TCA.shp
3. Double click the file TCA.shp
4. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The TCA layer is added to the map.

Turning on labels
1. Double click the TCA layer name in the Layer List window. This opens the layer’s
properties.
2. Click the Labels tab once.
3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select
Basin_Name with a single click.
5. Click OK in the layer properties window. The layer should now have
Basin_Name labels displayed.

1.1.5 To add ACA basin boundary (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6 basins/ACA/ACA.shp
3. Double click the file ACA.shp
4. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The ACA layer is added to the map.

76
MODULE 3: MAP PUBLICATION

Turning on labels
1. Double click the ACA layer name in the layer list window. This opens the layer’s
properties.
2. Click the Labels tab once.
3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select
Basin_Name with a single click.
5. Click OK in the layer properties window. The layer should now have
Basin_Name label displayed.

1.1.6 To add LVSCA basin boundary (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6
basins/LVSCA/LVSCA.shp
3. Double click the file LVSCA.shp
4. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA layer is added to the map.

Turning on labels
1. Double click the LVSCA layer name in the Layer List window. This opens the
layer’s properties.
2. Click the Labels tab once.
3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select Name
with a single click.
5. Click OK in the layer properties window. The layer should now have Name label
displayed.

77
QGIS DESKTOP TRAINING

1.1.7 To add ENNCA basin boundary (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6
basins/ENNCA/ENNCA.shp
3. Double click the file ENNCA.shp
4. Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to
the next step.
 Type the code: 4326 in the Filter bar
 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The ENNCA layer is added to the map.

Turning on labels
1. Double click the ENNCA layer name in the layer list window. This opens the
layer’s properties.
2. Click the Labels tab once.
3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select
Basin_name with a single click.
5. Click OK in the layer properties window. The layer should now have
Basin_name label displayed.

1.1.8 To add RVCA basin boundary (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6 basins/RVCA/RVCA.shp
3. Double click the file RVCA.shp
4. Click Open in the Add Vector Layer window.
5. The RVCA layer is added to the map.

Turning on labels
1. Double click the RVCA layer name in the Layer List window. This opens the
layer’s properties.

78
MODULE 3: MAP PUBLICATION

2. Click the Labels tab once.


3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select
Basin_Name with a single click.
5. Click OK in the layer properties window. The layer should now have
Basin_Name label displayed.

1.1.9 To add LVNCA basin boundary (Polygon data)

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6
basins/LVNCA/LVNCA.shp
3. Double click the file LVNCA.shp
4. Click Open in the Add Vector Layer window.

The LVNCA layer is added to the map.

Turning on labels
1. Double click the LVNCA layer name in the layer list window. This opens the
layer’s properties.
2. Click the Labels tab once.
3. Check on, with a single click, the Label this layer checkbox.
4. In the immediate entry field, click once on the drop-down list and select Name
with a single click.
5. Click OK in the layer properties window. The layer should now have Name label
displayed
6. A must do: reorder the layers in the layer list window as appropriate to ensure
optimum visibility of every layer.

79
QGIS DESKTOP TRAINING

Zoom to full extent. This display extent determines what the map looks like in the Map
Composer.

80
MODULE 3: MAP PUBLICATION

1.2. Follow along: The Composer Manager


QGIS allows you to create multiple maps using the same map file. For this reason, it
has a tool called the Composer Manager.

1. Click once on the Project menu, then click once on the New Print Composer
option entry to open the tool dialog.
2. A popup dialog is displayed, type the map title Training map
3. Click OK.
4. A new blank map composer is opened.

OR

1. Click on the Composer Manager tool. It will launch the Composer


Manager dialog.
Click the Add
Button and a New
Composer will be
added

2. Click the Add button and a Composer Title window pops-up.


3. Type the title: Training Map
4. Click OK in the Composer title window. This should add the Print Composer to
the display.

81
QGIS DESKTOP TRAINING

1.3. Follow along: Basic Map Composition


Ensure that the layers allow visibility to all the layers beneath each of them. Arranging
the layers from top-down in the table of contents — Points first, lines comes second,
hollow polygons third, polygons with a colour fill or a raster beneath all the layers.

1. Right-click the ke_major-rivers layer name in the Layer List window.


2. Click once on the zoom to layer option.
3. With the Training map composer open, click on the Composition tab once.

If not, navigate the route Project‣Print Composers‣Training map

This will open the composition properties.

4. Check that the values under Composition ‣ Paper and Quality are set to the
following:
 Size: A4 (210 x 297mm).
 Orientation: Portrait.
 Quality: 300dpi (This is a measure of how fine or detailed an image is,
usually expressed in dots per inch [dpi]. A resolution quality of 300 dpi will
print well on all printers.)
5. Click once on the Guides and Grid option. This will open the properties for the
guides and grid. Make the following settings:
 Grid spacing: 10mm
 Snap Tolerance: 5px

82
MODULE 3: MAP PUBLICATION

Now you’ve got the page layout the way you wanted it, but this page is still blank. It
clearly lacks a map. Let’s fix that!

6. Click on the Add new map tools:

With this tool activated, you’ll be able to place a map on the page.

7. Click and drag a portrait-like virtual frame in the blank Print Composer page:

Pick the Add New Map


tool, click and drag a
portrait like this one

The map will appear on the page.

8. Click on the Move item content tool. Click and hold down on the newly
added map, and move the map by dragging it to the central part of the
composer.
9. Resize the map frame by clicking and dragging the boxes in the corners:

83
QGIS DESKTOP TRAINING

Click on the corner


boxes and drag
them to the best
suited position

NOTE: Your map may look a lot different, of course! This depends on how your own
project is set up. But not to worry! These instructions are general, so they will work the
same regardless of what the map itself looks like.

10. Be sure to leave margins along the edges, and a space along the top for the title
and at the bottom for the other map elements:

Leave space
for the title

Leave space for the


elements: legend,
scale bar, arrow, date,
publisher etc.

11. Zoom in and out on the page (not the map!) by using these tools.

84
MODULE 3: MAP PUBLICATION

12. Zoom and pan the map in the main QGIS window. You can also pan the map

using the Move item content tool:

When zooming in, the map view will not refresh by itself. This is so that no time
is wasted redrawing the map while you’re zooming the page to where you want
it, but it also means that if you zoom in or out, the map will be at the wrong
resolution and will look ugly or unreadable.

13. Force the map to refresh by clicking the refresh view tool:

Remember that the size and position you’ve given the map doesn’t need to be
final. You can always come back and change it later if you’re not satisfied. For
now, you need to ensure that you’ve saved your work on this map. Because a
Composer in QGIS is part of the main map file, you’ll need to save your main
project.

14. Go to the main QGIS window.

15. Click on the Save As button:

16. Navigate the path C:\Q-GIS Training data\Projects and Save the map as
Map_print.qgs

17. Click on the map once in the print composer. Scroll down till you reach the
Frame option.

18. Click on the black arrow behind the name: Frame. This will roll out the
properties for the frame.

b) Select Item
a) Click on the
properties
map c) Scroll
down till
you find
Frame

85
QGIS DESKTOP TRAINING

19. Click once on the checkbox preceding the Frame title.

20. Click once on the Item properties tab.

21. Make the following settings

o Frame colour: Green


o Thickness: 5.0mm
o Join style: Round

1.4. Follow along: Adding a title


Now your map is looking good on the page, but the reader is not being told what’s
going on yet. They need some context, which is what you’ll provide for them by adding
map elements. First, let’s add a title.

1. Click once on the Add new label tool.


2. Click once on the print composer page, and a label will appear.
3. Resize it and place it in the top centre of the page. It can be resized and moved
in the same way that you resized and moved the map.

But if you tried it, you’ll see that it’s difficult to align the label to be completely centred
to the map! Luckily, there’s a tool for that.

86
MODULE 3: MAP PUBLICATION

1. Click the map to select it.


2. Hold down the shift key on your keyboard and click on the label.

3. Look for this tool and click on the downward arrow next to the button.
4. Click Align Center.

Now the label is centred to the map, but not the contents. To center the contents of
the label:

 Select the label by clicking on it.


 Click on the Item tab in the side panel of the Composer window.
 Change the text of the label to “KENYA”:
 Use this interface to set the font and alignment options:

 Choose a large but sensible font (the example will use the font with a size of
36 points), and keep the colour subdued.
 In fact, it’s probably best to keep it black as per the default. The key is that the
font should not be distracting, otherwise people who see the page will be
looking at the heading instead of reading the map!
 Set the Horizontal Alignment to Center, so that the heading is properly
centred within the label.

87
QGIS DESKTOP TRAINING

If this is progressing nicely, this is our page so far.

1.5. Follow along: Adding a Legend


The map reader also needs to be able to see what various things on the map actually
mean. In some cases, like the place names, it is obvious. In other cases, it’s more
difficult to guess, like the colours of the farms. Let’s add a new legend.

1. Click on the Legend tool:


2. Click on the page to place the legend, and move it to where you want it:

88
MODULE 3: MAP PUBLICATION

1.6. Follow along: Customizing legend items


You can customize in the Item tab then move to the Legend items slider.

You can also rename items.

1
2

1. Click once on the Legend and select a layer from the same list.
2. Uncheck the Auto update option in the legend properties.
3. Click the Edit button:
4. Rename the layers ke_major-rivers to Kenya major rivers.

NOTE: For Edit button to be active, uncheck Auto update in legend items window.

89
QGIS DESKTOP TRAINING

You can also give the legend a frame and background colour:

In the item tab scroll down to frame and click on it inside the box.

1. Set the thickness to 1.0.


2. Scroll downwards to background and check it (clicking inside).
3. Select the background to yellow.

This is the result:

1.7. Follow along: adding Grids


1. In the item properties tab click on Grids.

2. Click on button Add new Grid


3. Select Grid type: solid.
4. Set the X and Y interval as X: 2.0 and Y: 2.0.
5. Leave the rest of the settings, default.

90
MODULE 3: MAP PUBLICATION

6. Scroll downwards to Draw Coordinates option and click on it to check it on.

1) Click on Item
Properties Tab

2) Scroll to
Search for Grid
and expand it
for options

This is the result.

91
QGIS DESKTOP TRAINING

1.8. Follow along: Adding North arrow

1. Click on
2. Click on map
3. Drag the extent frame
upwards.

NB: if the arrow points downwards


against your expectation, delete it
and repeat the process. You should
click at a point within the map frame,
then expand the north arrow frame
upwards by dragging it towards the
top.

1.9. Follow along: Scale bar

1. Click on
2. Click once on the map
3. Drag the scale frame to suit the
display
4. Position the scale bar in the best-
suited location

The final map should look like this. (Don’t


worry if it looks different; it depends on
how you arrange your map elements.)

92
MODULE 3: MAP PUBLICATION

1.10. Follow along: Exporting your map


NOTE: Remember to save your work!

Finally, the map is ready for export! You’ll see the export buttons near the top left
corner of the Composer window:

The button on the right is the Print button, which interfaces with a printer. Since the
options will differ depending on the printer model, consult the printer manual or a
general guide to printing for more information on this topic.

The other three buttons allow you to export the map page to a file. There are three
export formats to choose from:

o Export as Image
o Export as PDF
o Export as SVG

Exporting as an image will give you a selection of various common image formats to
choose from. This is probably the simplest option, but the image it creates is “dead”
and difficult to edit.

The other two options are more flexible.

If you’re sending the map to a cartographer (who may want to edit the map for
publication), it’s best to export as an SVG. SVG stands for ‘Scalable Vector Graphic‘,
and the file you create can be imported into programs like Inkscape or other vector
image editing software.

If you need to send the map to a client, it’s most common to use PDF (or ‘Portable
Document Format’), because it’s easier to set up printing options for a PDF. Some
cartographers may prefer PDF as well, if they have a program that allows them to
import and edit this format.

For our purposes, we’re going to use PDF.

o Click the Export as PDF button:


o Choose a save location (C:/Q-GIS Training data/Vector data) and a file name as
Kenya
o Click Save.

93
QGIS DESKTOP TRAINING

1.11. In conclusion
1. Close the Composer window.
2. Save your map.
3. Find your exported PDF using your operating system’s file manager.
4. Open it.
5. Bask in its glory.

Congratulations on your first completed QGIS map project!

Some notes to keep in mind


Design principles for all maps
o Clear title (supported by relevant footnotes if appropriate).

o Indicate the geographic areas used.

o Indicate the time period(s) both of the data and of the currency of the
geographic boundaries (e.g. 1990 data presented to 2005 boundaries).

o Include a key to explain what is meant by the colours on the map, the different
sizes of symbol etc. Ensure the ranges on the key do not overlap (So don’t use
0-5 and 5-10, for example. Otherwise, how would you show an area with value
5? Better ranges would be 0-4 and 5-9).

o Indicate data source.

o Textual summary. The key message(s) of your map should also be summarised
in words.

o Your map should be as large as is necessary to show everything clearly. If you


are showing data for smaller areas (such as local authorities) you will probably
need a larger map than if you were showing region-level data.

o You may not wish to label each of the areas shown on the map as this might
clutter the page and obscure the statistics. As an alternative, you may wish to
consider publishing a separate reference map containing just area names and
boundaries.

94
MODULE 3: MAP PUBLICATION

Choropleth (colour shaded) maps


o Choose an appropriate number of classes for your data, and also how to divide
them. There are a number of possibilities here:

o Equal ranges – e.g. classes take values 0-9, 10-19 etc.

o Percentiles – e.g. you could use quintiles whereby the bottom 20% of
values fall into one class, the next 20% into another, etc.

o Polarised ranges, whereby categories cluster towards one (or both) ends of
the range of values. For example, if you were highlighting deprivation you
might decide that the most prosperous 80% of areas are one shade, but
the most deprived areas are highlighted by having different shades for the
worst 20%, 10% and 5% of areas.

o Natural breaks in the data – If data values tend to cluster into distinct
groups, you may wish to adjust the ranges such that all those areas falling
into a particular group are shaded in the same colour. Most Geographic
Information Systems (GIS) offer a range of ways of doing this. Make sure
that the one you choose is appropriate to the data you are showing.

o Note that having too many classes is bad practice as it makes the map too
complicated and colours harder to pick out. Five or six classes are usually
ample.

o Appropriate choice of colours. There are a number of aspects to this too:

o It is best to have a gradation of colour along a range, rather than having


completely unrelated colours for each category. Note however that it is not
easy for readers to distinguish more than four shades of one colour.

o In general, use light colours for low values and darker ones for high values.

o Also be aware that in some cases certain colours may have ‘natural’
associations – for example, red and debt.

White is generally used to indicate areas where data are missing or


unavailable. It is therefore inadvisable to use white to represent any part of
your range of actual values.

Proportional symbol maps


o This sort of map is good for showing ‘big and small’, and giving an idea of where
events are concentrated, but is less effective for comparison across a range.

95
QGIS DESKTOP TRAINING

This is because it is very difficult for the human eye to interpret the relative size
of two-dimensional objects (although a good key will help).

o It is important that the symbols you use are genuinely proportional to the value
being mapped. A value twice as high needs a symbol with double the surface
area, not a doubling of each dimension. Consider that if you double both the
height and width of anything, the area becomes four times larger, which would
give a very misleading visual impression.

Dot maps
o GIS offers aggregated dot maps, which take the aggregate statistic for a given
area and randomly scatter an appropriate number of dots across it. It would be
possible to do this with Neighbourhood Statistics data, but you should not do
so. Such maps are misleading and are not true dot maps. A true dot map will
only mark data at the exact location of occurrence.

o Neighbourhood Statistics datasets do not generally provide locations of


individual data events, but instead aggregate them into standard areas (such as
Super Output Areas and local authorities). This means that you will not be able
to produce dot maps of Neighbourhood Statistics data. You may, however,
produce dot maps based on the datasets containing grid references for the
location of services such as doctors, dentists and schools.

Map dangers
Although maps are a valuable means of data presentation, there are some pitfalls in
the way they may be interpreted:

o They may exaggerate the difference between areas. Suppose the dividing line
between two classes on a choropleth map is 20%. Then suppose, for the
variable in question, that area A has a rate of 19.95% and B has one of 20.05%.
This is a small difference in reality, but their different colouring on the map
might be interpreted otherwise. This is one reason why it is often useful to
make the data available in a table too.

o As different geographic areas vary greatly in both size and population,


presenting maps of count data (either choropleth or graduated symbol) can be
misleading.

o The human mind will often associate dark colours or large symbols with a high
likelihood of the variable in question, but they may have more to do with the

96
MODULE 3: MAP PUBLICATION

simple fact that the area has a large overall population. For this reason, it is
often more appropriate to map using standardised data such as rates or
percentages.

o The fact that some geographic units are much larger than others means their
colours can dominate a choropleth map. For example, rural local authorities are
often large, whereas urban authorities tend to have a much smaller area. This
means that if one end of a range of values is common in rural areas, and the
other in urban, the colour of the typically rural characteristic might misleadingly
dominate the map. Although this is inevitable you can reduce the effect by
choosing non-dominant colours, and your textual summary might usefully
highlight the urban-rural distinction.

o Be aware of how the areas you use can substantially alter the visual impact of a
map. For example, a neighbourhood with a particularly high crime rate might
really stand out on a map if the boundaries approximate to those of the
neighbourhood. However, if the boundaries used happened to combine the
neighbourhood with an adjacent area of particularly low crime, the presence of
the hotspot could be lost.

o Don’t assume that the default values suggested by your GIS (for choropleth
map ranges, for example) are necessarily the best. Always examine the data
and its context to see if it could be presented in a better way, and adjust the
settings on your GIS accordingly.

97
QGIS DESKTOP TRAINING

Module 4:
CREATING VECTOR DATA

Lesson 1: Creating a New Vector Dataset


Lesson 2: Feature Topology
Lesson 3: Forms

98
MODULE 4: CREATING VECTOR DATA

Creating maps using existing data is just the beginning. In this module, you’ll learn how
to modify existing vector data and create new datasets entirely.

Lesson 1: Creating a New Vector Dataset


1.1. Follow along: The Layer Creation Dialog
1.2. Follow along: Data sources
1.5. In conclusion
1.6. What’s next?

Lesson 2: Feature Topology


2.1. Follow along: Snapping
2.2. Follow along: Closing the Gaps
2.3. Try yourself...
2.4. Follow along: Correct topology errors
2.5. Follow along: Tool: Simplify Feature
2.6. Try yourself... Tool: Add Ring
2.7. Try yourself... Tool: Add Part
2.8. Try yourself... Tools: Delete Ring and Delete Part
2.9. Follow along: Tool: Reshape Features
2.10. Try yourself... Tool: Split Features
2.11. Try yourself... Tool: Merge Features
2.12. In conclusion
2.13. What’s next?

Lesson 3: Forms
3.1. Follow along: Using QGIS’ Form Design Functionality
3.2. Try yourself... Using the Form to Edit Values
3.3. Follow along: Setting Form Field Types
3.4. In Conclusion
3.5. What Next?

99
QGIS DESKTOP TRAINING

Lesson 1: Creating a New Vector Dataset


The data that you use has to come from somewhere. For most common applications,
the data already exists; but the more particular and specialised the project, the less
likely it is that the data will already be available. In such cases, you’ll need to create
your own new data.

The goal for this lesson:


To create a new vector dataset.

1.1. Follow along: The Layer Creation Dialog


Before you can add new vector data, you need a vector dataset to add it to. In our
case, you’ll begin by creating new data entirely, rather than editing an existing dataset.
Therefore, you’ll need to define your own new dataset first.

You’ll need to open the New Vector Layer dialog that will allow you to define a new
layer.

A. POLYGON DATA

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

In the menu bar, navigate through:


Layer ‣ Create Layer ‣ New
Shapefile Layer

You’ll be presented with this dialog:

100
MODULE 4: CREATING VECTOR DATA

It’s important to decide which kind of dataset you want at this stage. Each different
vector layer type is “built differently” in the background, so once you’ve created the
layer, you can’t change its type.

For the next exercise, we’re going to be creating new features which describe areas.
For such features, you’ll need to create a polygon dataset.

At the top, click on the Polygon button:

This has no impact on the rest of the dialog, but it will cause the correct type of
geometry to be used when the vector dataset is created.

The next field allows you to specify the Coordinate Reference System or CRS. A CRS
specifies how to describe a point on Earth in terms of coordinates, and because there
are many different ways to do this, there are many different CRSs. Set the CRS of this
project to Project CRS EPSG: 4326-WGS84

101
QGIS DESKTOP TRAINING

Next, there is a collection of fields grouped under New attribute. By default, a new
layer has only one attribute, the ID field (which you should see in the Attributes list)
below. However, in order for the data you create to be useful, you actually need to say
something about the features you’ll be creating in this new layer! For our current
purposes, it will be enough to add three fields called: Name, Area, Plot Owner.

4
2

1. Type the field, name: Name


2. For type, set to: Text data
3. Set a width of 20
4. Click once: Add to Attributes list

102
MODULE 4: CREATING VECTOR DATA

1
1
4
2

1. Type the field, name: Area


2. For type, set to: Decimal number
3. Set a width of 20
4. Click Add to Attributes list

4
2

1. Type the field, name: Plot_owner


2. For type, set to: Text data
3. Set a width of 20

103
QGIS DESKTOP TRAINING

4. Click Add to Attributes list

Before you go further, confirm the Attributes list.

Confirm your
Attributes list

Click OK. A save dialog will appear.

Navigate the path C:\Q-GIS Training data\Projects

Save your new layer as Water_reservoirs.shp

The new layer should appear in your Layers list.

Click on the Save As button, navigate the path C:\Q-GIS Training data\Projects
and save the map under it as The Layer Creation.

Exit the desktop application to continue later or go through the creation of all the
layers below.

104
MODULE 4: CREATING VECTOR DATA

B. LINE DATA
For the next exercise, we’re going to be creating new features which describe lines.
For such features, you’ll need to create a line dataset.

Navigate to and click on the menu entry Layer ‣ Create Layer ‣ New Shapefile Layer

Click on the line button:

This has no impact on the rest of the dialog, but it will cause the correct type of
geometry to be used when the vector dataset is created.

The next field allows you to specify the Coordinate Reference System or CRS. A CRS
specifies how to describe a point on Earth in terms of coordinates, and because there
are many different ways to do this, there are many different CRSs. Set the CRS of this
project to Project CRS EPSG: 4326-WGS84.

105
QGIS DESKTOP TRAINING

Next, there is a collection of fields grouped under New attribute. By default, a new
layer has only one attribute, the ID field (which you should see in the Attributes list)
below. However, in order for the data you create to be useful, you actually need to say
something about the features you’ll be creating in this new layer! For our current
purposes, it will be enough to add two fields called Name and Length.

106
MODULE 4: CREATING VECTOR DATA

1
4

1. Type the field, name: Name


2. For type, set to: Text data
3. Set a width of 20
4. Click once: Add to Attributes list

1
4

5
3

1. Type the field, name: Length


2. For type, set to: Decimal number
3. Set a width of 20
4. Set the precision at 2
5. Click Add to Attributes list

107
QGIS DESKTOP TRAINING

Click OK. A save dialog will appear.

Navigate the path C:\Q-GIS Training data\Projects and save your new layer as
Rivers.shp

Click on the Save button:

Exit the desktop application to continue later or go through the creation of all the
layers below.

C. POINT DATA
For the next exercise, we’re going to be creating new features which describe points
(XY representations). For such features, you’ll need to create a point dataset.

Navigate to and click on the menu entry Layer ‣ Create Layer ‣ New Shapefile Layer

Click on the Point button:

108
MODULE 4: CREATING VECTOR DATA

This has no impact on the rest of the dialog, but it will cause the correct type of
geometry to be used when the vector dataset is created.

The next field allows you to specify the Coordinate Reference System or CRS. A CRS
specifies how to describe a point on Earth in terms of coordinates, and because there
are many different ways to do this, there are many different CRSs. Set the CRS of this
project to Project CRS EPSG: 4326-WGS84.

Next, there is a collection of fields grouped under New attribute. By default, a new
layer has only one attribute, the ID field (which you should see in the Attributes list)
below. However, in order for the data you create to be useful, you actually need to say
something about the features you’ll be creating in this new layer! For our current
purposes, it will be enough to add two fields called Name and Comment.

109
QGIS DESKTOP TRAINING

4
2

1. Type the field, name: Name


2. For type, set to: Text data
3. Set a width of 20
4. Click once: Add to Attributes list

4
2

110
MODULE 4: CREATING VECTOR DATA

1. Type the field, name: Comment


2. For type, set to: Text data
3. Set a width of 20
4. Click Add to attributes list

Click OK. A save dialog will appear.

Navigate the path C:\Q-GIS Training data\Projects

Save your new layer as markets.shp

Click on the Save button:

Exit the desktop application.

You have just learnt to create all vector data types: polygons, lines, and point data.

111
QGIS DESKTOP TRAINING

1.2. Follow along: Data sources


When you create new data, it obviously has to be about objects that really exist on the
ground. Therefore, you’ll need to get your information from somewhere.

There are many different ways to obtain data about objects. For example, you could
use a GPS to capture points in the real world, then import the data into QGIS
afterwards. Or you could survey points using a theodolite, and enter the coordinates
manually to create new features. Or you could use the digitizing process to trace
objects off remote sensing data, such as satellite imagery or aerial photography.

For our example, you’ll be using the digitizing approach. Sample raster datasets are
provided, so you’ll need to import them as necessary.

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Navigate the path below and click once on the project path C:\Q-GIS Training
data\Projects\The layer Creation.qgs

OR

Projects\Open Recent\ C:\Q-GIS Training data\Projects\The layer Creation.qgs

This opens to the empty layers you created in the previous exercise.

Click on the Add Raster Layer tool:

Navigate the path C:/Q-GIS Training data/Raster data/Kisumu/kisumu.tif

112
MODULE 4: CREATING VECTOR DATA

Double click the file kisumu.tif or Click Open in the open a GDAl Supported Raster Data
source window.

The Kisumu layer is added to the map.

Click and drag it to the bottom of the list so that you can still see your other layers.

Right-click the Kisumu raster dataset and click once on the Zoom to layer command.

Pan and zoom into any area of the map to a resolution where the details on the raster
are visible without haze:

You’ll be digitizing these three vector data types:

a) Water_Reservoirs b) Markets c) Rivers

Hide all the layers except the raster and the Water_reservoirs layer. This is achieved
by highlighting the layers you would like to hide, then click on Manage Layer Visibility

drop-down icon as illustrated from the figure below.

113
QGIS DESKTOP TRAINING

In order to begin digitizing, you’ll need to enter edit mode. GIS software commonly
requires this to prevent you from accidentally editing or deleting important data. Edit
mode is switched on or off individually for each layer.

To enter edit mode for the Water_Reservoirs layer:

Click on the Water_Reservoirs layer in the Layer list to select it. (Make very sure that
the correct layer is selected, otherwise you’ll edit the wrong layer!). In order to be
certain of the layer you are editing, make sure your layer has the Toggle Editing icon
beside it as illustrated.

Click on the Toggle Editing button:

Alternatively right click on the layer of interest and navigate to Toggle Editing.

If you can’t find this button, check that the Digitizing toolbar is enabled. There should
be a check-mark next to the View ‣ Toolbars ‣ Digitizing menu entry.

As soon as you are in edit mode, you’ll see the digitizing tools are now active:

The digitizing tools are


activated when editing
mode is enabled

114
MODULE 4: CREATING VECTOR DATA

From left to right on the image above, they are:

1. Toggle Edit: activates / deactivates edit mode

2. Save Edits: saves changes made to the layer

3. Add Feature: start digitizing a new feature

4. Move Feature(s): move an entire feature around

5. Node Tool: move only one part of a feature

6. Delete Selected: delete the selected feature (only active if a feature has
been selected)

7. Cut Features: cut the selected feature (only active if a feature has been
selected)

8. Copy Features: copy the selected feature (only active if a feature has
been selected).

9. Paste Features: paste a cut or copied feature back into the map (only
active if a feature has been cut or copied)

You want to add a new feature. Click on the Add Feature button now to begin
digitizing right away!

You’ll notice that your mouse cursor has become a crosshair. This allows you to more
accurately place the points you’ll be digitizing. Remember that even as you’re using the
digitizing tool, you can zoom in and out on your map by rolling the mouse wheel, and
you can pan around by holding down the mouse wheel and dragging around within the
map.

The first feature you’ll be digitizing is water reservoirs:

Start digitizing by clicking on a point somewhere along the edge of any identifiable
water reservoirs on the raster.

Place more points by clicking further along the edge, until the shape you’re drawing
completely covers the field.

115
QGIS DESKTOP TRAINING

To place your last point, right-click where you want it to be. This will finalise the
feature and show you the Attributes dialog.

Fill in the values as appropriate: See a sample fill below:

Click OK and you’ve created a new feature!

Remember, if you’ve made a mistake while digitizing a feature, you can always edit it
after you’re done creating it. So even if you’ve made a mistake, continue digitizing until
you’re done creating the feature as above. Then:

Select the feature with the Select Feature(s) tool:

Try to utilise the tools below to edit the data created:

 the Move Feature(s) tool to move the entire feature


 the Node Tool to move only one point where you may have mis-clicked

116
MODULE 4: CREATING VECTOR DATA

 Delete Selected to get rid of the feature entirely so you can try again
 Edit ‣ Undo menu item or the ctrl + z keyboard shortcut to undo mistakes
 Click on the Toggle Editing tool to exit editing mode

When prompted whether to save changes, click once on Save.

 Navigate the path C:\Q-GIS Training data\Projects and save the map under it
as Layer Creation.
 Exit the desktop application if you are not finishing the exercise now.

117
QGIS DESKTOP TRAINING

1.3. Try yourself...


Launch the QGIS desktop if not already open.

Navigate the path C:\Q-GIS Training data\Projects and double-click the project name:
Layer Creation

In order to begin digitizing, you’ll need to enter edit mode. GIS software commonly
requires this to prevent you from accidentally editing or deleting important data. Edit
mode is switched on or off individually for each layer.

To enter edit mode for the Markets layer:

Click on the Markets layer in the Layer List to select it. (Make sure that the correct
layer is selected, otherwise you’ll edit the wrong layer!) In order to be certain of the
layer you are editing, make sure your layer has the Toggle Editing icon beside it as
illustrated.

Click on the Toggle Editing tool:

If you can’t find this button, check that the Digitizing toolbar is enabled. There should
be a check-mark next to the View ‣ Toolbars ‣ Digitizing menu entry.

As soon as you are in edit mode, you’ll see the digitizing tools are now active (refer to
1.2 if you don’t remember what they are).

You want to add a new feature. Click on the Add Feature tool now to begin
digitizing right away!

You’ll notice that your mouse cursor has become a crosshair. This allows you to more
accurately place the points you’ll be digitizing. Remember that even as you’re using the
digitizing tool, you can zoom in and out on your map by rolling the mouse wheel, and

118
MODULE 4: CREATING VECTOR DATA

you can pan around by holding down the mouse wheel and dragging around within the
map.

The next feature you’ll be digitizing is markets:

Start digitizing by clicking on a point somewhere on the specific market centre and
urban area identifiable on the raster.

Fill in the values as appropriate: See a sample fill below.

Click OK and you’ve created a new feature!

Repeat the same to capture as many markets as you can identify on the raster.

Click on the Toggle Editing tool to exit editing mode.

When prompted whether to save changes, click once on Save.

To enter edit mode for the Rivers layer:

Click on the Rivers layer in the Layer list to select it. (Make very sure that the correct
layer is selected, otherwise you’ll edit the wrong layer!). In order to be certain of the
layer you are editing, make sure your layer has the Toggle Editing icon beside it as
illustrated.

119
QGIS DESKTOP TRAINING

Click on the Toggle Editing tool:

If you can’t find this button, check that the Digitizing toolbar is enabled. There should
be a check-mark next to the View ‣ Toolbars ‣ Digitizing menu entry.

As soon as you are in edit mode, you’ll see the digitizing tools are now active (refer to
1.2 if you don’t remember what they are).

You want to add a new feature.

Click on the Add Feature tool now to begin digitizing right away!

You’ll notice that your mouse cursor has become a crosshair. This allows you to more
accurately place the points you’ll be digitizing. Remember that even as you’re using the
digitizing tool, you can zoom in and out on your map by rolling the mouse wheel, and
you can pan around by holding down the mouse wheel and dragging around within the
map.

The next feature you’ll be digitizing is rivers:

1. Start digitizing by clicking on a point somewhere along the edge of any


identifiable river (Major Nyando) on the raster.
2. Place more points by clicking further along the edge, until the shape you’re
drawing completely covers the river stretch.
3. To place your last point, right-click where you want it to be. This will finalise
the feature and show you the Attributes dialog.
4. Fill in the values as appropriate: See a sample fill below.

120
MODULE 4: CREATING VECTOR DATA

5. Click OK and you’ve created a new feature!


6. Click on the Toggle Editing tool to exit editing mode.
7. When prompted whether to save changes, click once on Save.

8. Click on the Save As button:


9. Navigate the path C:\Q-GIS Training data\Projects and save the map under it
as Layer Creation
10. Exit the desktop application.

121
QGIS DESKTOP TRAINING

1.4. In conclusion
The features created are only useful when its attributes are known and documented.

1.5. What’s next?


Features in a GIS layer aren’t just pictures, but objects in space. For example, adjacent
polygons know where they are in relation to one another. This is called topology. In the
next lesson, you’ll see an example of why this can be useful.

122
MODULE 4: CREATING VECTOR DATA

Lesson 2: Feature Topology


Topology is a useful aspect of vector data layers because it minimises errors such as
overlap or gaps.

For example: if two features share a border, and you edit the border using topology,
then you won’t need to edit first one feature, then another, and carefully line up the
borders so that they match. Instead, you can edit their shared border and both
features will change at the same time.

The goal for this lesson:


To understand topology using examples

2.1. Follow along: Snapping and extending polygons


To make topological editing easier, it’s best if you enable snapping. This will allow your
mouse cursor to snap to other objects while you digitize. To set snapping options:

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Click on the Add Raster Layer Tool.

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Raster data/Kisumu/kisumu.tif

Double click the file kisumu.tif. If prompted with the Coordinate Reference System
Selector follow the sub-steps below, otherwise proceed to the next step.

 type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The Kisumu Raster layer is added to the map.

123
QGIS DESKTOP TRAINING

Setting the Snapping mode:


Navigate to the menu entry Settings ‣ Snapping Options...

1
2

3
4

5 6 7

Set up your Snapping options dialog as shown.

Set the following settings as follows:

1. Snapping mode: Current Layer


2. Snap to: Segment
3. Set to Pixels
4. Tolerance: 20 Pixels
5. Check on: Enable topological editing
6. Check on: Enable snapping at intersection
7. Click OK to save your changes and leave the dialog

Click on the Add Vector Layer tool.

124
MODULE 4: CREATING VECTOR DATA

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

Double click the file LVSCA WRUAS.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA WRUAS layer is added to the map.

 Click Once on the LVSCA WRUAS layer in the Layers list window to select it.

 Click once the Toggle Editing tool to enter editing mode.


 Check under View ‣ Toolbars to make sure that your Advanced Digitizing
toolbar is enabled.

Double click the LVSCA WRUAS layer name in the layer list window. This will open the
layer properties window for this layer.

1 2

1. Click once on the Labels tab.

125
QGIS DESKTOP TRAINING

2. Turn on the checkbox (Label this layer with).


3. Select the field WRUA_NAME in the drop-down window.
4. Click OK.

Zoom in next to the WRUA labelled Engare Engito.

Pan across and use the Select Features tool, click once on the Engare Engito
WRUA.

Digitize the WRUA


around this river system
next to Engare Engito

Click once on the tool Add part

Digitize this new (fictional) WRUA next to the Engare Engito WRUA.

NOTE: Make sure the layer is zoomed in close enough while digitizing.

126
MODULE 4: CREATING VECTOR DATA

If you’re careful while digitizing and allow the cursor to snap to the vertices of
adjoining WRUAs, you’ll notice that there won’t be any gaps between your new WRUA
and the existing WRUAs adjacent to it.

Note the undo/redo tools in the Advanced Digitizing toolbar: try using the
tools cautiously without distorting the current project.

Those buttons will become your best friends...

Click on the Toggle Editing tool to exit editing mode.

When prompted whether to Save changes, click once on Save.

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Extending polygons

Exit the desktop application.

2.2. Follow along: The Simplify Feature tool

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer tool

127
QGIS DESKTOP TRAINING

Click once on
the Browse
Button

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/Kenya 6 basins/ENNCA/ENNCA.shp

 Double click the file ENNCA.shp


 Click Open in the Add Vector Layer window

The ENNCA layer is added to the map.

Click on the ENNCA layer to activate it in the layer list window.

Click on the Toggle Editing button:

Click on the Simplify Feature tool

Click on the surface of the ENNCA layer in the canvas window.

You will be presented with the popup window where you can change the tolerance
values as desired.

Adjust the tolerance units upwards to 50 layer units and click OK.

128
MODULE 4: CREATING VECTOR DATA

The Simplify Feature tool allows you to reduce the number of nodes in complex
features. However, notice what it does to the topology! This tool is better suited to
generalising stand-alone features. The advantage is that it provides you with a simple,
intuitive interface for generalisation, and allows you to see what the effects would be
before you implement them.

Before you go on, get the farm back to its previous state. Either:

 cancel the Simplify Feature dialog, or


 If you already clicked OK, just undo the last change.
 Exit the desktop application without saving the project.

129
QGIS DESKTOP TRAINING

2.3. Try yourself... The Add Ring tool


This tool allows you to take a hole out of a feature, as long as the hole is bounded on
all sides by the feature. For example, if you’ve digitized the outer boundaries of a
WRUA and you need to add a hole for a water reservoir within the WRUA, you’d use
this tool.

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer tool.

Click once on
the Browse
Button

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/Kenya 6 basins/LVNCA/LVNCA.shp

Double click the file LVNCA.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector follow the sub-steps below, otherwise proceed to the next
step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVNCA layer is added to the map.

130
MODULE 4: CREATING VECTOR DATA

Click on the LVNCA layer to activate it in the Layer list window.

Click on the Toggle Editing button:

Click on the Add Ring tool:

Start digitizing by clicking on a point somewhere within the LVNCA layer in the canvas
display.

Place more points by clicking further around the target area where the reservoir will
rest until the area is fully enclosed. To place your last point, right-click where you want
it to be. This will finalise the feature.

Exit the desktop application without saving the project.

2.4. Try yourself... The Add Part tool


The Add Part tool allows you to create an extra part of the feature, not directly
connected to the main feature. For example, if you’ve digitized the boundaries of a
WRUA on a coastline but you haven’t yet added the islands attached to the WRUA on
the mainland, you’d use this tool to create them.

Launch the QGIS desktop by double clicking the icon on the desktop if not
already open.

Click on the Add Vector Layer tool.

131
QGIS DESKTOP TRAINING

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

Double click the layer LVSCA WRUAS.shp

Click Open in the Add Vector Layer window. If prompted with the Coordinate
Reference System Selector then follow the sub-steps below, otherwise proceed to the
next step.

 Type the code: 4326 in the Filter bar


 Click once on the WGS 84 coordinate reference system to select it
 Click only once on the OK button

The LVSCA WRUAS layer is added to the map.

Enable the LVSCA WRUAS layers labels.

Click on the LVSCA WRUAS layer to activate it in the layer list window.

Click on the Toggle Editing button:

Pick the Select Features tool by clicking it once.

To select the Nyandhiwa WRUA with a single click on its area confines.

132
MODULE 4: CREATING VECTOR DATA

Now click on the Add Part tool:

Start digitizing by clicking on a point somewhere close but not intersecting or


coinciding with the Nandhiwa WRUA boundary. The islands have to float in Lake
Victoria.

Place more points by clicking further around the target area where the islands will rest,
until the area is fully enclosed. To place your last point, right-click where you want it to
be. This will finalise the feature.

Try using this tool to create three islands.

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Adding parts

Exit the desktop application.

2.5. Try yourself... The Delete Ring and Delete Part tools

Launch the QGIS desktop by double clicking the icon on the Desktop if not
already open.

Click on the Add Vector Layer tool

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

133
QGIS DESKTOP TRAINING

 Double click the file LVSCA WRUAS.shp


 Click Open in the Add Vector Layer window.

The LVSCA WRUAS layer is added to the map.

NOTE: This is the Delete part tool:

Double click the LVSCA WRUAS layer name in the layer list window. This opens the
layer’s properties.

3
2
3
2

4
1

1. Click the Labels tab once.


2. Check on, with a single click, the Label this layer checkbox.
3. In the immediate entry field, click once on the drop-down list and select
WRUA_NAME with a single click.
4. Click OK in the layer properties window. The layer should now have
WRUA_NAME labels displayed.

Click on the LVSCA WRUAS layer to activate it in the Layer list window.

Click on the Toggle Editing tool:

Right-click the layer name LVSCA WRUAS in the layer list window, click only once on
the option Open Attribute Table

134
MODULE 4: CREATING VECTOR DATA

In the LVSCA WRUAS layers attribute table, click once on the first cell in the record
containing the WRUA_NAME: Nyandhiwa. This is selection by attribute.

Close the Attribute table.

135
QGIS DESKTOP TRAINING

Click once on the Zoom To Selection tool.

Click on the Delete part tool once to pick it up tool:

Click once on the Nyandhiwa selected polygon. The polygon is deleted immediately.

Click on the undo tool to restore the deleted part.

Exit the desktop application without saving changes.

136
MODULE 4: CREATING VECTOR DATA

2.6. Follow along: The Reshape Features tool


The Reshape Features can add or deduct a coverage area to an existing feature. With
this tool selected:

Launch the QGIS desktop if not already open.

Click on the Add Vector Layer tool

Click on the Browse button in the popup window and navigate the path C:/Q-GIS
Training data/Vector data/Polygon data/LVSCA WRUAS/LVSCA WRUAS.shp

 Double click the file LVSCA WRUAS.shp


 Click Open in the Add Vector Layer window.

The LVSCA WRUAS layer is added to the map

Double click the LVSCA WRUAS layer name in the layer list window. This opens the
layer’s properties.

137
QGIS DESKTOP TRAINING

3
2 3
2

4
1

1. Click the Labels tab once.


2. Check on with a single click, the checkbox next to the text Label this layer with.
3. In the immediate entry field, click on the drop-down list and select
WRUA_NAME with a single click.
4. Click OK in the layer properties window. The layer should now have
WRUA_NAME labels displayed.

Click on the LVSCA WRUAS layer to activate it in the layer list window.

Click only once on the Select features using an expression tool. It will open the
Select by expression window.

138
MODULE 4: CREATING VECTOR DATA

1. Click once the plus sign + next to the Fields and Values option, to expand the
contents.

4 7

139
QGIS DESKTOP TRAINING

2. Double click the option: WRUA_NAME. This adds it to the expression output
preview window.

3. Click once on the Equal Operator tool. This adds the operator to the
expression output preview window.

4. Click once on the all unique tool. The tool fetches all the
attributes in the WRUA_NAME field.

5. Scroll and find the attribute: Mawira. Double click it, to add it to the expression
output preview window.

6. Click once on the select tool.

7. Click on the Close tool on the Select by expression window.

8. Click on the Zoom to selection tool by clicking on it once. The display will
zoom to the Mawira coverage area as the central focal area in the canvas
display.

9. Click on the Toggle Editing tool:

10. Now click once on the Reshape features tool:

140
MODULE 4: CREATING VECTOR DATA

11. Start digitizing by clicking inside Mawira coverage area, then capture vertices
outside the Mawira coverage by clicking and inserting vertices around the area
you desire to add to the Mawira coverage area. When done, click inside the
Mawira coverage area then right inside the Mawira coverage area to finish the
extension.

Figure 1: Before and after Area Coverage addition

You can do the opposite, too:

Start digitizing by clicking outside Mawira coverage area, then capture vertices inside
the Mawira coverage through inserting vertices around the area you desire to deduct

141
QGIS DESKTOP TRAINING

from the Mawira coverage area. When done, click outside the Mawira coverage area
then right outside the Mawira coverage area to finish the deduction.

Figure 2: Deducting the coverage area of a polygon

The result of the above:

Figure 3: Before and after coverage area deduction

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and Save the map as Reshaping
features

Exit the desktop application.

142
MODULE 4: CREATING VECTOR DATA

2.7. Try yourself... The Split Features tool


The Split Features tool is similar to how you took part of the WRUA coverage area
away, except that it doesn’t delete either of the two parts. Instead, it keeps them both.

1. Launch the QGIS desktop if not already open.

2. Click on the Add Vector Layer tool.

3. Click on the Browse button in the popup window and Navigate the path C:/Q-
GIS Training data/Vector data/Polygon data/Kenya 6 basins/TCA/TCA.shp

4. Double click the file TCA.shp

5. Click Open in the Add Vector Layer window.

6. The TCA layer is Added to the map.

7. Click on the TCA layer to activate the Split features tool it in the Layer list
window.

8. Pick the select features tool by clicking on it once.

9. To select the TCA polygon, click on it with a single click within its boundaries.

10. Click on the Toggle Editing tool:

11. Click on the Split features tool to activate it.

12. Click outside the surface of the TCA coverage layer, within the canvas window
but next to the area you want to start the split. Then add vertices by clicking
across the TCA coverage area along the line you want to split. Finally click
outside the TCA coverage area then right click outside the TCA coverage area
to finish the split.

143
QGIS DESKTOP TRAINING

You will be presented with a multi-polygon comprising two polygons.

Click on the Save As button:

Navigate the path C:\Q-GIS Training data\Projects and save the map under it as
Splitting features.qgs.

Exit the desktop application.

NOTE: Try checking the Attributes of the split map to confirm that the layer has two
records. This is a split result but the attributes have to be updated as they are by
default duplicated.

144
MODULE 4: CREATING VECTOR DATA

2.8. Try yourself... The Merge Features tool


The Merge Features tool is used to join two adjacent polygons into one. This is a handy
tool to have, for example when two WRUAs are to be joined to form a single WRUA
coverage. We have to reopen the previous project where we split the TCA polygon.

Launch the QGIS desktop

Through the projects menu, navigate and click once on the path Projects\Open
Recent\C:\Q-GIS Training data\Projects\Splitting Features.qgs

The previous project is opened and displayed in the canvas.

1. Click on the TCA layer name to activate it in the layer list window.

2. Pick the select features tool by clicking on it once.

3. To select the split TCA polygon, click on it with a single click within the
boundaries of one of the split polygons.

4. Hold down the ctrl key on the keyboard and click on the second split polygon.
This selects both polygons.

145
QGIS DESKTOP TRAINING

5. Click once on the Zoom to selection tool. The display will zoom to the
TCA area as the central focal area in the canvas display.

6. Click once on the Toggle Editing button:

7. Click once on the Merge Selected Features tool .

8. Click OK in the popup Merge Feature attributes window.

146
MODULE 4: CREATING VECTOR DATA

The Polygons are merged into one polygon.

9. Click once on the Toggle Editing tool: this exits the editing mode.

10. Click Save on the popup notification.

11. Exit the desktop application.

2.9. In conclusion
Topology editing is a powerful tool that allows you to create and modify objects
quickly and easily, while ensuring that they remain topologically correct.

2.10. What’s next?


Now you know how to digitize the shape of the objects easily, but adding in the
attributes is still a bit of a headache! Next, we’ll show you how to use forms so that
attribute editing is simpler and more effective.

147
QGIS DESKTOP TRAINING

Lesson 3: Forms
When you add new data via digitizing, you’re presented with a dialog that lets you fill
in the attributes for that feature. However, this dialog is not, by default, very nice to
look at. This can cause a usability problem, especially if you have large datasets to
create, or if you want other people to help you digitize and they find the default forms
to be confusing.

Fortunately, QGIS lets you create your own custom dialogs for a layer. This lesson
shows you how.

The goal for this lesson:


To create a form for a layer.

3.1. Follow along: Using QGIS Form Design Functionality


Launch the QGIS desktop if not already open.

1. Click on the Add Vector Layer tool.


2. Click on the Browse button in the popup window and navigate the path C:/Q-
GIS Training data/Vector data/Poly_line data/Water_Way/Water_way.shp
3. Double click the layer Water_way.shp
4. Click Open in the Add Vector Layer window.
5. The Water_way.shp layer is added to the map.

6. Click once on the Water_way layer to activate it in the Layer list window.

148
MODULE 4: CREATING VECTOR DATA

7. Click once on the Toggle Editing tool to enter editing mode.


8. Right click the Water_way layer name in the Layer list window then click once
on the option: Open Attribute Table.
9. Right-click on any cell in the table. A short menu will appear, with the only
options being Select All and Open form.

10. Click on the Open form to see the form that QGIS generates for this layer.

Obviously, it would be nice to be able to do this while looking at the map, rather than
needing to search for a specific feature in the Attribute Table all the time.

11. Close the settings Open Attribute Table window.

12. Click once on the Identify Features tool. To activate the Identify Results
window:

13. Go to the View menu ‣ Panels menu then check on the Identify Results panel
with a single click on the check box if not checked on (see below).

149
QGIS DESKTOP TRAINING

14. Set the mode to Current Layer.

The Identify Results panel is added to display, check the Auto Open Form checkbox.

15. Click once on Water_way layer to activate the layer in the Layers list.

16. Using the Identify Features tool, click on any Water_way line in the
map.

Instead of the normal Identify dialog, you’ll see the now-familiar form:

150
MODULE 4: CREATING VECTOR DATA

17. Click on the Save As button:


18. Navigate the path C:\Q-GIS Training data\Projects and save the map under it
as Enabling Forms

Exit the desktop application; if not, proceed to the next exercise.

151
QGIS DESKTOP TRAINING

3.2. Using the Form to edit values


If you are in edit mode, you can use this form to edit a feature’s attributes.

1. Launch the QGIS desktop.


2. Through the project menu, navigate the path and click once on: Projects\Open
Recent\ C:\Q-GIS Training data\Projects\ Enabling Forms.qgs
3. The previous project is opened and displayed in the canvas.
4. Click on the Water_Way layer name in the Layer list window to activate it.

5. Click once on the Toggle Editing tool to enter editing mode.

6. Pick the Identify features tool by clicking on it once.

7. Click on any Water_Way in the display.

The Form window pops up for that particular feature.

8. Edit its fields entering the suitable entries.

9. Click OK on the form window when done with editing the attributes.

10. Click on the Save Layer Edits tool to save the current edits.

11. Click once on the Toggle Editing tool to exit editing mode.

152
MODULE 4: CREATING VECTOR DATA

12. Click Save in the popup window asking whether to save changes.
13. Open the Attribute Table for the Water_Way layer and trace to see your edits
there!

14. Click on the Save As tool:


15. Navigate the path C:\Q-GIS Training data\Projects and save the map as Editing
data using Forms.qgs.
16. Exit the desktop application.

153
QGIS DESKTOP TRAINING

Summary
We have reached the end of this Manual!

You are familiar now with the basic and fundamental approaches of a GIS. After
familiarising yourself with the interface of the QGIS application, you learned how to
create a basic map. This is the first analysis level of a GIS, because it enables you to see
different information levels (layers) combined in one map.

You are also able to proceed from the analysis level to publication level. You learned
that for a map for publishing there are certain crucial elements to be included to
enable the user to understand the information you want to transmit, such as a legend
or a scale bar.

In a fourth step, you created your own vector data layer. This procedure enables you
now to feed the GIS with your own data collected in the field and combine them with
other information layers.

There are many other functions that can be applied in the analysis of spatial data. Be
encouraged to take further steps on the way, now that you have already set foot on
the path!

The internet offers a wide selection of informative web pages, data downloads,
application and examples of analysis results and maps. There are also a number of
forums, where questions of all levels in GIS applications have been asked. And of
course, you can also ask your specific questions in these rooms.

On the next page we provide some links to further reading, but be aware that there is
much more when you start your own research.

We hope you have enjoyed our introduction to the world of GIS and will have a lot of
use and successful applications for it!

154
FURTHER READING

Recommended for further reading


GDAL-SOFTWARE-SUITE. Geospatial data abstraction library. http://www.gdal.org,
2013.

GRASS-PROJECT. Geographic resource analysis support system. http://grass.osgeo.org,


2013.

NETELER, M., AND MITASOVA, H. Open source GIS: A GRASS GIS approach, 2008.

OGR-SOFTWARE-SUITE. Geospatial data abstraction library. http://www.gdal.org/ogr,


2013.

OPEN-GEOSPATIAL-CONSORTIUM. Web map service (1.1.1) implementation


specification. http://portal.opengeospatial.org, 2002.

OPEN-GEOSPATIAL-CONSORTIUM. Web map service (1.3.0) implementation


specification. http://portal.opengeospatial.org, 2004.

POSTGIS-PROJECT. Spatial support for postgresql. http://postgis.refractions.net/, 2013.

155
QGIS DESKTOP TRAINING

Creative Commons Attribution 4.0


International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound
by the terms and conditions of this Creative Commons Attribution 4.0 International
Public License ("Public License"). To the extent this Public License may be interpreted
as a contract, You are granted the Licensed Rights in consideration of Your acceptance
of these terms and conditions, and the Licensor grants You such rights in consideration
of benefits the Licensor receives from making the Licensed Material available under
these terms and conditions.

Section 1 – Definitions.

a. Adapted Material means material subject to Copyright and Similar Rights that
is derived from or based upon the Licensed Material and in which the Licensed
Material is translated, altered, arranged, transformed, or otherwise modified in
a manner requiring permission under the Copyright and Similar Rights held by
the Licensor. For purposes of this Public License, where the Licensed Material is
a musical work, performance, or sound recording, Adapted Material is always
produced where the Licensed Material is synched in timed relation with a
moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar
Rights in Your contributions to Adapted Material in accordance with the terms
and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely
related to copyright including, without limitation, performance, broadcast,
sound recording, and Sui Generis Database Rights, without regard to how the
rights are labeled or categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
d. Effective Technological Measures means those measures that, in the absence
of proper authority, may not be circumvented under laws fulfilling obligations
under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996,
and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other
exception or limitation to Copyright and Similar Rights that applies to Your use
of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other
material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and
conditions of this Public License, which are limited to all Copyright and Similar
Rights that apply to Your use of the Licensed Material and that the Licensor has
authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this Public
License.

156
LICENSE

i. Share means to provide material to the public by any means or process that
requires permission under the Licensed Rights, such as reproduction, public
display, public performance, distribution, dissemination, communication, or
importation, and to make material available to the public including in ways that
members of the public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright resulting from
Directive 96/9/EC of the European Parliament and of the Council of 11 March
1996 on the legal protection of databases, as amended and/or succeeded, as
well as other essentially equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights under this
Public License. Your has a corresponding meaning.

Section 2 – Scope.

a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor
hereby grants You a worldwide, royalty-free, non-sublicensable, non-
exclusive, irrevocable license to exercise the Licensed Rights in the
Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part;
and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public License does
not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor
authorizes You to exercise the Licensed Rights in all media and formats
whether now known or hereafter created, and to make technical
modifications necessary to do so. The Licensor waives and/or agrees not
to assert any right or authority to forbid You from making technical
modifications necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective Technological
Measures. For purposes of this Public License, simply making
modifications authorized by this Section 2(a)(4) never produces
Adapted Material.
5. Downstream recipients.
A. Offer from the Licensor – Licensed Material. Every recipient of
the Licensed Material automatically receives an offer from the
Licensor to exercise the Licensed Rights under the terms and
conditions of this Public License.
B. No downstream restrictions. You may not offer or impose any
additional or different terms or conditions on, or apply any
Effective Technological Measures to, the Licensed Material if
doing so restricts exercise of the Licensed Rights by any recipient
of the Licensed Material.

157
QGIS DESKTOP TRAINING

6. No endorsement. Nothing in this Public License constitutes or may be


construed as permission to assert or imply that You are, or that Your use
of the Licensed Material is, connected with, or sponsored, endorsed, or
granted official status by, the Licensor or others designated to receive
attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this
Public License, nor are publicity, privacy, and/or other similar
personality rights; however, to the extent possible, the Licensor waives
and/or agrees not to assert any such rights held by the Licensor to the
limited extent necessary to allow You to exercise the Licensed Rights,
but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties
from You for the exercise of the Licensed Rights, whether directly or
through a collecting society under any voluntary or waivable statutory
or compulsory licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.

Section 3 – License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the following
conditions.

a. Attribution.
1. If You Share the Licensed Material (including in modified form), You
must:
A. retain the following if it is supplied by the Licensor with the
Licensed Material:
i. identification of the creator(s) of the Licensed Material
and any others designated to receive attribution, in any
reasonable manner requested by the Licensor (including
by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent
reasonably practicable;
B. indicate if You modified the Licensed Material and retain an
indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public
License, and include the text of, or the URI or hyperlink to, this
Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable
manner based on the medium, means, and context in which You Share
the Licensed Material. For example, it may be reasonable to satisfy the

158
LICENSE

conditions by providing a URI or hyperlink to a resource that includes


the required information.
3. If requested by the Licensor, You must remove any of the information
required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You
apply must not prevent recipients of the Adapted Material from
complying with this Public License.

Section 4 – Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that apply to Your use
of the Licensed Material:

a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract,
reuse, reproduce, and Share all or a substantial portion of the contents of the
database;
b. if You include all or a substantial portion of the database contents in a database
in which You have Sui Generis Database Rights, then the database in which You
have Sui Generis Database Rights (but not its individual contents) is Adapted
Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a
substantial portion of the contents of the database.

For the avoidance of doubt, this Section 4 supplements and does not replace Your
obligations under this Public License where the Licensed Rights include other Copyright
and Similar Rights.

Section 5 – Disclaimer of Warranties and Limitation of Liability.

a. Unless otherwise separately undertaken by the Licensor, to the extent


possible, the Licensor offers the Licensed Material as-is and as-available, and
makes no representations or warranties of any kind concerning the Licensed
Material, whether express, implied, statutory, or other. This includes, without
limitation, warranties of title, merchantability, fitness for a particular
purpose, non-infringement, absence of latent or other defects, accuracy, or
the presence or absence of errors, whether or not known or discoverable.
Where disclaimers of warranties are not allowed in full or in part, this
disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You on any
legal theory (including, without limitation, negligence) or otherwise for any
direct, special, indirect, incidental, consequential, punitive, exemplary, or
other losses, costs, expenses, or damages arising out of this Public License or
use of the Licensed Material, even if the Licensor has been advised of the
possibility of such losses, costs, expenses, or damages. Where a limitation of
liability is not allowed in full or in part, this limitation may not apply to You.

159
QGIS DESKTOP TRAINING

c. The disclaimer of warranties and limitation of liability provided above shall be


interpreted in a manner that, to the extent possible, most closely approximates
an absolute disclaimer and waiver of all liability.

Section 6 – Term and Termination.

a. This Public License applies for the term of the Copyright and Similar Rights
licensed here. However, if You fail to comply with this Public License, then Your
rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section
6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured
within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.

For the avoidance of doubt, this Section 6(b) does not affect any right the
Licensor may have to seek remedies for Your violations of this Public License.

c. For the avoidance of doubt, the Licensor may also offer the Licensed Material
under separate terms or conditions or stop distributing the Licensed Material at
any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.

Section 7 – Other Terms and Conditions.

a. The Licensor shall not be bound by any additional or different terms or


conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed
Material not stated herein are separate from and independent of the terms and
conditions of this Public License.

Section 8 – Interpretation.

a. For the avoidance of doubt, this Public License does not, and shall not be
interpreted to, reduce, limit, restrict, or impose conditions on any use of the
Licensed Material that could lawfully be made without permission under this
Public License.
b. To the extent possible, if any provision of this Public License is deemed
unenforceable, it shall be automatically reformed to the minimum extent
necessary to make it enforceable. If the provision cannot be reformed, it shall
be severed from this Public License without affecting the enforceability of the
remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to
comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation
upon, or waiver of, any privileges and immunities that apply to the Licensor or
You, including from the legal processes of any jurisdiction or authority.

160
Published under a Creative Commons Attribution
4.0 International License

Produced with the support of


Deutsche Gesellschaft für Internationale
Zusammenarbeit (GIZ) GmbH

GIZ Water Sector Reform Programme


Maji House, 4th floor, Ngong Road
P.O. Box 19512
00202 Nairobi, Kenya
T + 254 20 2719987/ 2730973
I www.giz.de

April 2017

Authors
Linfiniti Consulting CC:
Rüdiger Thiede
Tim Sutton
Horst Düster
Marcelle Sutton

GIZ contributors:
Abel Omanga
Nele Foerch
Daniela Arp
George Odhiambo
Tony Mwaniki
Justus Diang’a

Editing and layout


Peta Meyer / Tara Consultants Ltd
E. info@taraconsult.com

You may freely copy, modify and redistribute this work.


However, you may not represent this work as your own work,
or remove any authorship text or credits from this work.

Common questions

Powered by AI

QGIS Desktop Training recommends saving map projects immediately after creating or modifying a map. This is done by clicking on the "Save As" button and navigating to the desired directory path, such as C:\Q-GIS Training data\Projects, to save the map file under a specific name like INTERFACE MODULE or Map_print.qgs . This step is significant as it ensures that the user's work is preserved, providing a backup of the current project state and making it easier to return to the project later or continue working from where they left off .

To add Kenya's lakes layer and label it, users should begin by loading the kenya_lakes.shp file into QGIS using the Add Vector Layer tool. After ensuring the correct coordinate reference system, users should double-click the layer's name, access the Labels tab, check the 'Label this layer' checkbox, and choose NAME from the drop-down list for labeling. Clicking OK will display the labels on the map .

To modify line symbols in QGIS, you need to open the Layer Properties window by double-clicking the layer in the Layers list. Then, select the Style tab and open the Symbology selection window, where you can choose options such as Categorized for changing the layer's symbology by specific attributes. To remove lines between polygons, you modify the Border style by setting it to No Pen, ensuring no lines are visible between polygon features .

Sui Generis Database Rights are a form of legal protection distinct from traditional copyright, stemming from Directive 96/9/EC by the European Parliament and Council on the legal protection of databases. These rights protect the investment in obtaining, verifying, or presenting the contents of a database, allowing the right holder to prevent extraction and/or re-utilization of the whole or a substantial part of the database contents . These rights apply globally, extending beyond the European Union to countries with similar legal frameworks . The Public License allows users to exercise these rights globally, royalty-free, to extract, reuse, reproduce, and share the database contents . However, when sharing or adapting database content where Sui Generis Database Rights exist, one must comply with specific conditions outlined, such as providing appropriate attribution . The Sui Generis Database Rights supplement, but do not replace, other copyright and similar rights applied under the Public License ."}

Conflicts between the exercise of Licensed Rights and moral rights under a Creative Commons License arise because while Licensed Rights allow modification and adaptation of the material, moral rights such as the right of integrity, which are not licensed, may constrain how the material can be altered . The Licensor typically waives or agrees not to assert these moral rights to a limited extent, allowing the exercise of Licensed Rights without infringing on them . However, since moral rights are personal to the author and may not always be waived under the law of some countries, this can create potential conflicts, especially in jurisdictions where moral rights are inalienable."} 르 {{PL}}.json-tech-questions-json-pl.fm-SPAperPage-Ops.nper=0.5singleper=0.9split$ label-controlováni=intControl[

To add labels to a vector layer for Kenya's major rivers in QGIS, first, add the vector layer for the rivers by clicking on the Add Vector Layer tool and navigating to 'C:/Q-GIS Training data/Vector data/Poly_line data/ke_major-rivers/ke_major-rivers.shp', then click Open. Next, to enable labels, double-click the 'ke_major-rivers' layer name in the Layer List window to open the layer properties. Click on the Labels tab, check the 'Label this layer' checkbox, and select the desired field (such as "NAME") from the drop-down list that appears in the immediate entry field. Click OK to apply the changes, and the river names will now be displayed as labels on the map .

The Creative Commons License allows for technical modifications necessary to exercise the Licensed Rights in all media and formats, both existing and future. Furthermore, it includes the permission to make necessary technical modifications to circumvent Effective Technological Measures, with the Licensor waiving the right to forbid such modifications . These modifications are allowed without constituting Adapted Material as long as they are within the scope of exercising the Licensed Rights .

The QGIS Desktop Training guide addresses categorizing symbols for polygon data layers by using categorized symbology. Users are guided to select "Categorized Symbol" in the Symbology drop-down menu and choose a defining field, such as "WRUA_NAME" or "AreasqKm," for categorization. It also suggests setting a "Color Ramp" to "Random Colours" and clicking "Classify" to apply different colors to polygons based on their category fields, thus providing unique textures . Additionally, the guide explains how to add multiple symbol layers to create customized textures, such as changing fill styles and border styles .

The 'No Downstream Restrictions' clause in Creative Commons licensing prohibits licensees from imposing any additional terms or technological measures that would limit the rights granted by the original license to others who receive the Licensed Material. This ensures that all downstream recipients can freely exercise their Licensed Rights under the same conditions as the initial license, without facing any added restrictions or limitations . This is critical for maintaining the openness and accessibility intended by the licensor, ensuring consistent use of the Licensed Material throughout its distribution chain .

Rights under the Creative Commons Public License are automatically reinstated as of the date the violation is cured, provided it is cured within 30 days of the violator's discovery of the violation, or upon express reinstatement by the Licensor .

You might also like