QGIS TRAINING MANUAL v7
QGIS TRAINING MANUAL v7
GEOGRAPHIC
INFORMATION
SYSTEM
Training Manual
1
QGIS Training Manual 2022
Table of Contents
Table of Contents 2
1. Introducing QGIS 4
2. Installing and Opening QGIS 5
3. Creating, Exploring and Saving a Basic Map 11
3.1. Overview of the Interface 11
3.1.1. The QGIS User Interface 11
3.1.2. The Layers List 12
3.1.3. The Browser Panel 12
3.1.4. Toolbars 13
3.1.5. The Map Canvas 13
3.1.6. The Status Bar 13
3.1.7. The Locator Bar 13
3.2. Adding Layers 14
3.2.1. Drag and Drop Method 14
3.2.2. Using the Data Source Manager 15
3.2.3. Using the Browser 17
3.2.4. Reordering Layers 19
3.2.5. Exercise 19
3.3. Navigating the Canvas 20
3.3.1. Zoom Tool 20
3.3.2. Pan Tool 21
3.3.3. Scale 22
3.4. Symbology 23
3.4.1. Changing Colors 23
3.4.2. Changing Symbol Structure 25
3.4.3. Scale-based Visibility 27
3.5. Saving your Project 28
4. Classifying Vector Data 29
4.1. Vector Attribute Data 29
4.2. Labels 31
4.3. Classification 35
4.3.1. Nominal Data Classification 36
4.3.2. Ratio Classification 39
4.3.3. Rule-based Classification 41
5. Laying-out Maps 45
2
QGIS Training Manual 2022
3
QGIS Training Manual 2022
1. Introducing QGIS
Quantum Geographic Information System (QGIS) or formerly known as Quantum
GIS, is a free and open-source cross-platform desktop geographic information system (GIS)
application that provides the ability to view, edit, and analyze geospatial data. It is an
official project of the Open-Source Geospatial Foundation (OSGeo). It can be run on Linux,
Unix, Mac OSX, Windows and Android and supports various vector, raster, and database
formats and functionalities (QGIS, 2021).
QGIS can support raster data, shapefiles, databases, coverages, dxf, MapInfo,
PostGIS and other formats (Gray, 2008). Web services, such as Web Map Service and Web
Feature Service have also been included to permit the use of data from external sources
(Cavallini, 2009).
Furthermore. QGIS can be also integrated with other open-source GIS packages
like PostGIS, GRASS GIS, MapServer, SAGA GIS and Kosmo (Cavallini, 2009).
4
QGIS Training Manual 2022
Note: If the software is already installed, please skip and proceed to the next section.
1. The application installer can be readily downloaded at the official QGIS.org webpage. See
https://qgis.org/en/site/forusers/download.html.
2. In the download page, users are given an option to download either the “Latest release”
(richest on features, that means new tools and capabilities) or the “Long term release”
(which is the most stable).
3. Scroll down until the “Standalone installer for long term release (continued with
dependencies from old OSGeo4W):” section.
5
QGIS Training Manual 2022
4. Depending on your preferences and your system, choose whether to install the latest or the
long-term release version and between the 32-bit or the 64-bit versions.
5. Wait for the download to finish then click to open the installer.
6. As of date, the current long-term release version is QGIS 3.16.15 “Hannover”, and the latest
version is QGIS 3.22.2 “Białowieża”. We are going to install the long-term version for
now.
7. Click “Yes” at the prompt and then click “Next” to continue.
8. Read the “License Agreement” and if you accept, click “I Agree” to continue.
6
QGIS Training Manual 2022
9. Click “Browse to select a destination folder or simply click “Next” to accept the default
folder.
7
QGIS Training Manual 2022
10. Check that the “QGIS” component is ticked and leave the rest as is, (we won’t need those
data sets anyway) then click “Install”.
8
QGIS Training Manual 2022
13. After the installation has finished, proceed to open the application. Upon first time
opening, the window welcome screen (shown below) appears. Just click “Let’s get
started!” to begin.
9
QGIS Training Manual 2022
14. The window shown below will welcome you upon first opening. Click the “New Empty
Project” button.
10
QGIS Training Manual 2022
2
4
1
6 5
The Basic Parts of the QGIS User Interface
1. Layers List
2. Browser Panel
3. Toolbars
4. Map Canvas
5. Status Bar
6. Locator Bar
11
QGIS Training Manual 2022
12
QGIS Training Manual 2022
3.1.4. Toolbars
Your most often used sets of tools can be turned into toolbars for faster and
more efficient access. For example, the File toolbar allows you to save, load, print, and
start a new project. You can easily customize the interface to see only the tools you use
most often, adding or removing toolbars as necessary via the View ► Toolbars menu.
Even 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 Project menu and then
clicking on Save.
The Status Bar will show (bottom right of your window) various information
about your current map. Information such as Coordinates, Scale, Rotations and current
Coordinate Reference System. You can also access the Log Messages through the
Messages button.
13
QGIS Training Manual 2022
In our case, our training files are stored in the “Desktop” folder > “QGIS
Training Files” > “CRB”.
14
QGIS Training Manual 2022
The Data Source Manager allows you to choose and add any data type that
QGIS can support. The list includes Vectors, Raster, Mesh, Delimited Texts,
GeoPackages, WCS, XYZs, and more.
For our manual, click on “Vector” tab to add a vector data. Here we are going
to add “MRB_subbasins.shp”.
Make sure that the “File” source type is selected. Then click the three dots
beside the “Vector Dataset(s)” bar.
15
QGIS Training Manual 2022
With this tool, you can also add multiple items at a time for faster and more efficient workflow.
16
QGIS Training Manual 2022
Note: The program assigns random color for the layers upon adding, these can be changed later on.
17
QGIS Training Manual 2022
Notice that it takes some clicks to reach the target folder. For this, we can
actually use the “Add to Favorites” function of the browser panel. Just Right Click on
“QGIS Training Manual” Folder and click “Add to Favorites”. Now you can access
your folder directly under the “Favorites” section.
Here, we are going to add the “Stream1M_CRB.shp” file. You can either click and
drag the file into the canvas or right click instead and select “Add Layer to project”.
18
QGIS Training Manual 2022
3.2.5. Exercise
Select a method above and try to add another layer. Locate the “PHL_adm1.shp” from our
training folder and add it to your canvas. Also, re-order the layers according to this format:
19
QGIS Training Manual 2022
Objective: To learn how to use “Pan” and “Zoom” Tools and also learn about map
scale.
In the “Map Navigation” toolbar, click the button. Move your mouse towards the
upper left side of the Magat Watershed. Left click and hold, then drag the mouse, which
will generate a rectangle, and then proceed to cover the hole Magat Watershed. Release
the left click. This will zoom in into the area you have just selected. You can also use the
mouse wheel button by scrolling up to zoom in and down to zoom out.
20
QGIS Training Manual 2022
In the “Map Navigation” Toolbar, click the button to activate it. With this tool,
you can move the canvass by doing a left-click and hold then drag the mouse in any
direction to pan the map. Another way is to click and hold the mouse wheel button
while dragging the mouse.
21
QGIS Training Manual 2022
3.3.3. Scale
As we zoomed in and out, notice that the scale value in the Status Bar changes. The
Scale value represents the Map Scale. In general, the number to the right of “:” represents how
many times smaller the object you are seeing in the Map Canvas is to the actual object in the
real world.
We can also use this field to manually re-scale our map canvas. In the “Scale
“text field, type: 1000000 and press enter. This will redraw the displayed
features in our map. Another way to do this is to click on the options arrow
on the scale field to reveal various preset scales.
22
QGIS Training Manual 2022
3.4. Symbology
In any GIS application, “Symbology “is the visual representation of a map in a canvas.
Map symbology is very important in a way that it enables easier understanding and
appreciation of what a map represents.
Objective: To be able to generate any symbology you want for a vector layer.
In our canvas, notice that the river network is not that visible
because of the default color that QGIS used. To change the
layer’s color, right click on the “Stream1M_CRB” layer and
choose “Properties”.
23
QGIS Training Manual 2022
24
QGIS Training Manual 2022
25
QGIS Training Manual 2022
26
QGIS Training Manual 2022
For example:
In this case, we may want to hide the “Stream1M_CRB” at low scales. This is useful
in decreasing the computing load your computer have to do in terms of rendering whenever you
are zooming in or out of your canvas, as well as decreasing the clutter within.
27
QGIS Training Manual 2022
Furthermore, another method can also be used. This includes clicking the icon in
the toolbars.
28
QGIS Training Manual 2022
Another way of opening the Attribute Table is to click the icon in the toolbar or
simply pressing “F6”.
29
QGIS Training Manual 2022
A Row is called Record and is connected with a feature in our Map Canvas.
30
QGIS Training Manual 2022
4.2. Labels
Labels can be directly added to a map to show various information about an object that
you want to show. Any vector layer can display labels associated with it. These labels depend on
the attribute data of a layer for their content.
Temporarily disable the “Stream1M_CRB” and PHL_adm1” layers. Leave the “MRB
and CRB Subbasins” enabled.
To display a Label, go again to the “MRB_subbasins” layer properties but this time,
select “Labels”. Click the drop-down button and select “Single labels”.
31
QGIS Training Manual 2022
Beside the “Value” tab, click the drop-down button and select the id “Subbasins. This
based on the attribute table above wherein we want to show the names of the different
sub basins in the Magat Watershed.
After choosing appropriate id to display, we can now proceed to modify font styles
and formatting according to our liking.
Try to modify the “Text” formatting options to match those shown in here:
32
QGIS Training Manual 2022
Next, try to modify the “Buffer” options to match the items shown below:
33
QGIS Training Manual 2022
Notice that only the “MRB_subbasins” layer was labeled since it was the layer that we just
worked on.
34
QGIS Training Manual 2022
4.3. Classification
Labels are a good way to communicate information such as the names of individual
places, but they can’t be used for everything. For example, let us say that someone wants
to know what each landuse area is used for.
There are four types of classification: nominal, ordinal, interval and ratio.
If we were to classify objects nominally, we can use symbols of different shape for
points, hatchings or different colors for polygons, and various dash patterns for lines.
On the other hand, in ordinal classification, the categories can be arranged in a certain
order. For example, cities and municipalities in the Philippines have specific classes
(Class A, B, etc.), and therefore can be ranked accordingly. Symbols to be used must
signify order but not magnitude.
We can use symbols with light to dark colors for points, and then graduated colors
(i.e. light to dark) for polygons and lines.
In classifying intervally, we can opt to use symbols with varying size (from small to
big) for points, lines, and polygons.
Lastly, the categories in ratio classification are limited to positive and zero values
only. No negative numbers allowed. Take a distance from one point to another as an
example, or the temperature above absolute zero (0 degrees Kelvin). Like the interval
classification, symbols to be used must also imply order and magnitude.
In this section we are going to add another layer called “LandCover_UTM.shp”. Add
it into your canvas. Disable the “CRB_subbasins”.
35
QGIS Training Manual 2022
If we were to add labels into this layer, it’s going to look something like this:
36
QGIS Training Manual 2022
Click the dropdown arrow for the “Value” tab and select “AGG12”.
Then change the color ramp to Random Colors. After that, click “Classify”.
Click “Ok”.
37
QGIS Training Manual 2022
38
QGIS Training Manual 2022
Now, if you wish to see the classified areas, just click the arrow beside the “LandCover_UTM).
39
QGIS Training Manual 2022
40
QGIS Training Manual 2022
In this section, we area going to represent all the lands with “Annual Crops” differently
so as to easily spot or identify them.
First, open the “Properties” of the “Landover_UTM” > “Symbology” tab > switch
“Classification Style” to “Rule-based”.
41
QGIS Training Manual 2022
These rules have been generated from the previous exercises, so we have to remove
them. Select all of the rules by highlighting them and then click the icon to remove them.
We should have a clean slate by now.
Click the “Add rule” button then an “Edit rule” dialog shall appear.
42
QGIS Training Manual 2022
Enter “Annual Crops” as: Label, then click the icon to open the “Expression
String Builder”. Enter “AGG12” = “Annual Crop” and click “Ok”.
43
QGIS Training Manual 2022
What we just did was highlight all the lands with annual crops (or agricultural lands) with red
then color the rest with light green.
And that’s how we can use rules to classify objects in QGIS. Feel free to explore other
capabilities and rule-based classifications.
44
QGIS Training Manual 2022
5. Laying-out Maps
In this section, we are going to learn how to use the QGIS print layout to produce quality
maps with all the map components.
Now, our canvas should look like this and is ready for lay outing!
45
QGIS Training Manual 2022
Hit the “Create” button and type “Magat River Basin” as the name.
A New “Print Layout Window” shall now open:
You could also create this new layout via the Project > New Print Layout menu.
46
QGIS Training Manual 2022
Make sure that the size and orientation are set to “A4”
and “Landscape”.
47
QGIS Training Manual 2022
Move and position the map by dragging it around. You can resize it by d
ragging the boxes around the edges of the map.
You can zoom in and out on the page (but not the map) by using these buttons:
. You can also pan the map using the tool. If the map doesn’t update
automatically, you can manually refresh the page by clicking the refresh button.
48
QGIS Training Manual 2022
49
QGIS Training Manual 2022
Then, to edit our title, click on the “Lorem Ipsum” inside our canvas.
50
QGIS Training Manual 2022
Note: To make sure that you don’t accidentally move these elements, we must lock them in place for
now. To do so, tick the box under the lock icon ion our “Items” windows.
51
QGIS Training Manual 2022
That’s what the legend is for. To add a Legend, click the “Add Legend” button. Just
like earlier, click and drag your mouse to create a rectangle. Drag the legend to match the
position below:
Also, notice that some items displayed in the legend are not
necessary or is actually not displayed in our map. Items like the
“MRB_subbasins, PHL_adm1, Stream1M_CRB and CRB
subbasins” are not necessary in our current map. Furthermore,
beneath the “Perennial Crop”, is actually a blank item, so we
have to remove it.
52
QGIS Training Manual 2022
Select the unnecessary items mentioned above and delete them by pressing the button
We can also rename any item we want that will be displayed in our legend. For example,
double click the “LandCover_UTM” and rename it to “Land Cover 2015”.
Try to weak the Font styles and formatting in your liking. Lastly, add a frame for the legend
and don’t forget to lock the items in place.
53
QGIS Training Manual 2022
54
QGIS Training Manual 2022
55
QGIS Training Manual 2022
Click on “Export as Image” and then select a target folder and click save.
After which, an “Image Export Options” window pops out. Simply click on “Save” to continue.
Wait for a toast that says” “Successfully exported layout to…” then you have successfully
exported your map into an image file.
56
QGIS Training Manual 2022
6. Plugins
Installing Plugins will enable you to do more functions aside from the built-in ones from
QGIS. In this module, you are going to learn how to install and use plugins including ones
which will be used later on in this training manual.
Notice that the “DB Manager” is ticked and is therefore activated. To Enable/disable any plugin,
simply tick/untick the box before it.
57
QGIS Training Manual 2022
To install a plugin, simply click the “Install Plugin” button which is located at the
bottom right of the plugin manager window.
58
QGIS Training Manual 2022
In the Plugins Manager, click the search box and type “QuickMapServices” and
hit “Install Plugin”.
OSM is a collaborative project designed to create a free and editable geographic version
of the real world (Anderson, 2006). Data from the OSM can be used in several ways such as
the production of paper and electronic maps, geocoding of address and place names as well as
route planning (Maier, 2014).
Things and objects in the real world such as buildings, even lakes and such, can be
added in to your canvas, provided that the data is available for the area concerned.
59
QGIS Training Manual 2022
Navigate to “Layer” > “Create Layer”>” New Shapefile Layer” where a “Shapefile
Layer” dialog will appear wherein you can define your new layer.
First, select a destination folder where you want your file to be saved by clicking the three dots beside
the “File Name” box.
Click “Ok”.
60
QGIS Training Manual 2022
Based on the file name that we created earlier, we want to create vector files or
shapefiles that represent real-world facilities of ISU-Echague. So, we need an actual base map
that we could work on as a reference for the said objects.
For this, the QuickMapServices Plugin that we installed earlier will be useful.
61
QGIS Training Manual 2022
Just like that, a base map has been added into our canvas:
62
QGIS Training Manual 2022
We can now click the “Toggle Editing button” in our toolbar. It is in the form of a
63
QGIS Training Manual 2022
You have successfully created a new vector data for the school oval. To stop editing, click the
64
QGIS Training Manual 2022
7.2.1. Snapping
This snapping tool makes topological editing much
easier and faster. This makes your cursor “snap” to
objects as you digitize them.
65
QGIS Training Manual 2022
It offers tools such as “Move”, “Rotate”, “Simplify Features”, “Add Ring”, “Add Part”, “Fill
Ring”, and a lot more. Feel free to explore the tools present and their capabilities.
With the digitizing tool still enabled, try to trace the bleachers (type “2” for the id) and the
grandstand (“3” for the id) around the oval.
66
QGIS Training Manual 2022
7.3. Forms
Whenever we add new data through
digitizing, we are always presented with a dialog that
enables us to fill in attributes for that particular
feature.
Objective: To create a form for a layer/ understand editing the attribute table.
67
QGIS Training Manual 2022
Remember that we input id no. 1, for the oval, 2 for the bleachers, and 3 for the
grandstand. Enter names of each feature in the “Name” column accordingly.
That is how the features and their corresponding attributes table are created.
While still in the attributes table window, click the “Field Calculator” button.
Check the “Create New Field” option, and enter “Area” as the “output field name”.
Additionally, click the arrow down to pull the other options under “Geometry”. After which,
double click “$area” then hit “Ok”.
68
QGIS Training Manual 2022
After hitting “OK”, a new column is now created containing the area of each
corresponding features. This area is expressed in square meters. You can also check the units
by navigating to “Projects” > “Properties” > “General Tab”. In the General Tab, and under
the “Measurements” Section.
69
QGIS Training Manual 2022
In here, you can also change preferred Measurement units as well as other
project properties.
70
QGIS Training Manual 2022
8. Vector Analysis
With vector analysis, we can also answer various real-world, scientific questions. For
example, if we were tasked in choosing a suitable site to construct sediment-collecting dams (Sabo)
within the Magat River Watershed, we can prepare some criteria that must be satisfied: like distance
to access road, the width of the river, distance to communities, watershed area to be serviced, etc.
within the following modules, we’ll try to utilize the power of QGIS to locate a suitable area for
the said application.
Objective: To understand projections, and learn how to reproject and transform vector datasets.
8.1.1. Projections
Here’s a short differentiation of the two coordinate systems available in mapping:
In a GCS, we are working on a sphere, but our screen is flat and whenever we try to
represent a sphere on a flat surface, distortion will occur. What this means on a map is that the
longitude lines stay equally far apart from each other, even at the poles (where they are
supposed to meet). This means that, as you travel away from the equator on your map, the scale
of the objects that you see gets larger and larger. What this means for us, practically, is that
there is no constant scale on our map (Thiede et. al, 2021).
To solve this, a Projected Coordinate System (PCS) is used instead. A PCS “projects”
or converts the data in a way that makes allowance for the scale change and corrects it.
Therefore, to keep the scale constant, we should reproject our data to use a PCS (Thiede et. al,
2021).
71
QGIS Training Manual 2022
We can change CRS of the project by clicking on the “Current Projection” button
located at the bottom right corner of QGIS window.
72
QGIS Training Manual 2022
Enter a File Name and navigate into target folder. Click The dropdown arrow for the
CRS and select desired projection type, then click “Ok”.
Additionally, you can also opt to add that saved layer into your map or not by ticking
the “Add saved file to map” box.
73
QGIS Training Manual 2022
References
Anderson, M. (2006). Global Positioning Tech Inspires Do-It-Yourself Mapping Project. National
Geographic News.
Maier, G. (2014). OpenStreetMAp, the Wikipedia Map. 1(1), R3-R10. REGION.
doi:10.18335/region.v1i1.70.
Smith, H. (2020, February 27). Geographic vs Projected Coordinate Systems. ArcGIS Pro. Retrieved
January 5, 2022, from https://www.esri.com/arcgis-blog/products/arcgis-
pro/mapping/gcs_vs_pcs/#:~:text=A%20GCS%20defines%20where%20the,map%20or%20a
%20computer%20screen.
Thiede, R., Sutton, T., Düster, H., & Sutton, M. (2021, December 27). QGIS Training Manual.
Retrieved from QGIS Documentation:
https://docs.qgis.org/3.16/en/docs/training_manual/index.html
74