100% found this document useful (1 vote)
93 views75 pages

QGIS TRAINING MANUAL v7

QGIS step by step manual

Uploaded by

SirChiiz Sawad
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
100% found this document useful (1 vote)
93 views75 pages

QGIS TRAINING MANUAL v7

QGIS step by step manual

Uploaded by

SirChiiz Sawad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 75

QUANTUM

GEOGRAPHIC
INFORMATION
SYSTEM
Training Manual

ISABELA STATE UNIVERSITY


Echague Isabela
QGIS Training Manual 2022

Quantum Geographic Information


System
(QGIS)
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

5.1. Using the Print Layout 45


5.1.1. Layout Manager 46
5.1.2. Basic Map Composition 47
5.1.3. Adding a Map Title 49
5.1.4. Adding a Legend 52
5.1.5. Adding a Scale Bar and North Arrow 54
5.1.6. Adding Grids 54
5.1.7. Exporting Maps 55
6. Plugins 57
6.1. Managing Plugins 57
6.2. Installing Plugins 58
6.3. Useful QGIS Plugins 59
6.3.1. The QuickMapServices Plugin 59
6.3.2. The QuickOSM Plugin 59
7. Creating Vector Data 60
7.1. Creating a New Vector Dataset 60
7.1.1. The Layer Creation Dialog 60
7.1.2. Adding a Reference Layer for QuickMapServices 61
7.1.3. Adding a Base Map 62
7.1.4. Digitizing / Creating a Vector Data 63
7.2. Feature Topology 65
7.2.1. Snapping 65
7.2.2. Advanced Digitizing Toolbar 65
7.3. Forms 67
7.3.1. The Field Calculator 68
8. Vector Analysis 71
8.1. Reprojecting and Transforming Data 71
8.1.1. Projections 71
8.1.1.1. Geographic Coordinate System (GCS) 71
8.1.1.2. Projected Coordinate System (PCS) 71
8.1.2. On-the-fly Projections 72
8.1.3. Saving a Dataset into another CRS 72
References 74

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

QGIS functions as geographic information system (GIS) software, allowing users


to analyze and edit spatial information, in addition to composing and exporting graphical
maps (QGIS, 2021).

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

2. Installing and Opening QGIS


Objective: To learn how to install and open the QGIS software.

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

11. Wait until the installation is finished.

8
QGIS Training Manual 2022

12. After that, click “Finish” to finish the installation.

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.

The QGIS Workspace / Interface

10
QGIS Training Manual 2022

3. Creating, Exploring and Saving a Basic Map


In this module, we are going to create a basic map and learn the basics as well as other
functionalities of the QGIS software.

3.1. Overview of the Interface


We shall explore the QGIS user interface in order to familiarize ourselves with the
Menus, Toolbars, Map Canvass and Layers List that form the basic structure of the
interface.

Objective: To understand the basics of the QGIS user interface.

3.1.1. The QGIS User Interface

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

3.1.2. The Layers List


The “Layers List” will provide, at any time, a list of
all the added layers in your canvass, be it visible or
not.

These layers can be collapsed (by clicking the arrow


or plus symbol beside them) and more information on
the layer’s current appearance will be made available
to you. On the other hand, hovering over the layer
will give you some basic information: layer name,
type of geometry, coordinate reference system and
the complete path of the location on your device.

Right-clicking on a layer will give you a menu with


various extra options. We will be using this panel
extensively later on.

3.1.3. The Browser Panel


The “Browser Panel” will let you navigate in your
database or local computer storage. You can access
common vector files (e.g., ESRI Shapefile or
MapInfo files), databases (e.g., PostGIS, Oracle,
SpatiaLite, GeoPackage or MSSQL Spatial) and
WMS/WFS connections.

If you have saved a project, the Browser Panel will


also give you quick access to all the layers stored in
the Project Home item.

Moreover, you can set one or more folder


as Favorites: search under your path and once you
have found the folder, right click on it and click

on Add as a Favorite. You should then be able to

see your folder in the Favorites item.

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.

3.1.5. The Map Canvas


This is where the map you are
building will be displayed. It’s
where most of the interactions
between you and the visible
layers will occur such as
zooming in/out, moving the map,
selecting features, and other
operations.

3.1.6. The Status Bar

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.

3.1.7. The Locator Bar


With this bar, you can have access to almost all of the
objects in QGIS: i.e., layers, layer features, algorithms,
spatial bookmarks, etc. It is located at the bottom left of your window and can be easily
accessed by pressing “Ctrl + K”.

13
QGIS Training Manual 2022

3.2. Adding Layers


There are multiple ways to add layers into your canvass or project:

3.2.1. Drag and Drop Method


First is the drag and drop method wherein you use your computer’s file explorer
to navigate into the folder or directory where your files are stored.

In our case, our training files are stored in the “Desktop” folder > “QGIS
Training Files” > “CRB”.

Click and drag the “CRB_subbasins.shp” into the QGIS canvas.

14
QGIS Training Manual 2022

3.2.2. Using the Data Source Manager

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.

3.2.3. Using the Browser


Another method is utilizing the “Browser” Panel. Navigate into your
“Desktop” folder > “QGIS Training Files”. Click the drop-down arrow to reveal the
contents of the folder.

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.

Also, notice that when we were using


the drag and drop method earlier, it is
somehow challenging to directly find
and select the “.shp” files that we
needed, especially when you are
already working with hundreds or
maybe even thousands of them.
Using the “Browser” solves this
problem and just shows you the
“.shp” files (or other files that QGIS
can directly work on like .tiff files)

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.4. Reordering Layers


The layers in our “Layers” list are drawn
in a certain order. Depending on the sequence
or order, other layers might be blocked by the
latest layer added.

Simply drag the layer beneath or above a


layer depending on the desired order or
arrangement.

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

3.3. Navigating the Canvas


This section will teach you how to use basic navigation tools within your
canvas. These tools will enable you to visually explore the layers at different scales.

Objective: To learn how to use “Pan” and “Zoom” Tools and also learn about map
scale.

3.3.1. Zoom Tool

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

3.3.2. Pan Tool

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.

3.4.1. Changing Colors

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

By default, we can also access layer property by simply


double-clicking on the layer.

Click the color bar next to “Color”. A color window will


appear. Select a blue shade for our river.

You can then click “OK” and “Apply” to proceed.

23
QGIS Training Manual 2022

Additional features such as


Opacity or transparency, Units,
Symbol Layer type, stroke
width, and many more can be
accessed in this area. Feel free
to explore the capabilities of
this window.

Click “Ok” then “Apply” when


finished.

24
QGIS Training Manual 2022

3.4.2. Changing Symbol Structure


Next, you can make the canvas less
visually cluttered by temporarily
disabling other layers and modifying the
fill color and stroke width of the others.
Try to disable the “Stream1M_CRB”
and “CRB_subbasins” layers and
modify the “MRB_subbasins” layer properties to match the following:

25
QGIS Training Manual 2022

26
QGIS Training Manual 2022

3.4.3. Scale-based Visibility


This function is particularly useful when dealing with a combination of large map sets
and very fine details where in some layer is not suitable for viewing at certain scales.

For example:

Enable the “Stream1M_CRB” again.

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.

To do so, open the layer


properties for the
“Stream1M_CRB” layer and click
the “Rendering “tab. Enable the
“Scale-based rendering” by
clicking on the “Scale dependent
visibility” checkbox. Change the
minimum value to about 1300000.

Then click “Ok”.

27
QGIS Training Manual 2022

3.5. Saving your Project


To save your current project, simply click the
“Project” under the Menu bar, of which the “Save”
button can be selected. Otherwise, you can also press
“Ctrl + S” to save your changes.

Additional options such as “Save As..” and “Save


To” options are also available.

Furthermore, another method can also be used. This includes clicking the icon in
the toolbars.

28
QGIS Training Manual 2022

4. Classifying Vector Data


Classifying vector data enables you to give different symbols to features (different
objects in the same layer), depending on their attributes. This will allow anybody who uses the
map to easily see the attributes of various features.

4.1. Vector Attribute Data


Vector data can be deemed arguably as the
most common kind of data in any GIS software.
A vector model can be a representation of the
location and shape of geographic features by
using a combination of points, lines, and
polygons, while their other properties are
incorporated as attributes and is shown as tables
in QGIS.

GIS specializes not only in direct


representation of objects or things in certain
locations but also provide information about
those objects.

Objective: To understand the structure of


vector data and explore the attribute data of any
object.

From the opened layers from previous


sections, locate “MRB_subbasinss”. Right click
and then select “Open Attribute Table”.

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.

The Column is called a Field (or an Attribute) and is commonly


accompanied by a name that describes it (A name, id, or a header).

In our example, “Basin_Name” is the id and “Alimit”, “Ibulao”,


“Lamut”, “Sub watershed 2”, “Matuno”, “Santa Fe”, and Sub
watershed 1” are attribute values of the selected layer.

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.

Objective: To apply useful labels to a layer.

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

Your canvas should now look like this:

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.

In nominal classification, objects can be classified according to their names, with no


specific orders. Symbols used have no order and magnitude.

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 interval classification, objects to be categorized are placed on a scale with positive,


negative and zero values. Example: the temperature (in Celsius or Fahrenheit), the height
above sea level, etc. symbols to be used to denote classification should indicate order and
magnitude.

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:

This makes the labels difficult to


read and even overwhelming if
there are numerous different
landuse areas on the map.

Remember to undo the effect by


changing the “Labels” back to “No
Labels”.

4.3.1. Nominal Data Classification


The problem above can be solved by categorization. Open the layer properties for
“LandCover_UTM”. Then go to “Symbology” tab. Click on the dropdown that says:
“Single Symbol” then select “Categorized”.

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

It should now look something like this:

38
QGIS Training Manual 2022

Now, if you wish to see the classified areas, just click the arrow beside the “LandCover_UTM).

Our “LandCover” polygons are colored


and are classified so that areas with the
same land use are of the same color now.

Additionally, the symbol of each


classification can be further modified in
the layer’s property.

4.3.2. Ratio Classification


From the previous section, the land use in the MRB sub-basin have been classified
according to land use (Nominal). This time we are going to classify it according to size or area.

But first, make sure to save the previous


classification by opening the properties of the
layer > Style > Save Style.

39
QGIS Training Manual 2022

To classify according to area, change symbology from “Categorized” to “Graduated”.


Change “Value” to “area”, then change the color ramp to “Spectral”. Set the “Mode” to
“Equal Interval”, increase “classes” to 10 then click “Classify”.

40
QGIS Training Manual 2022

Our canvas should now look something like this:

4.3.3. Rule-based Classification


From previous sections, we were able to classify objects but was limited to one criterion
only. That’s where rule-based classification comes in.

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

Just Click “OK”, then change fill color to


bright red and stroke width to 0.4600.

Next, we are going to add another Rule, but


this time, click on “Else – Catch for other
features”.

Enter “Others” on the label and give it a


pale-yellow green color.

We can then proceed to click “Ok” to apply


the changes.

Our canvas should now look like this:

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.

5.1. Using the Print Layout


QGIS allows us to create several maps using the same map file. For this. a tool called
the Layout Manage is used.

But first, we are going to do some


tweaking and finalize our map. (A little
review of all the sections we learnt from the
previous ones)

First, we are going to re-order the layers to


match the image shown:

Now that the “MRB_subbasins” is above


everything else, we can further modify its
layer properties and change “Stroke Style”
to “No Pen”.

Now, our canvas should look like this and is ready for lay outing!

45
QGIS Training Manual 2022

5.1.1. Layout Manager


To begin lay outing, click “Project” > “Layout Manager” to open the tool. A blank
“Layout Manager” shall open.

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

5.1.2. Basic Map Composition


To begin, right click in the central part of the blank sheet and choose “Page Properties”.

Make sure that the size and orientation are set to “A4”
and “Landscape”.

After that, click the button.

Now, click and drag to create a


rectangle where your map will
appear.

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.

Try to copy the position of the map shown below:

After positioning the map, scroll


down the “Items Properties” window the
tick the box beside the “Frame” to add one.

We have to leave some space for the


titles, legend, and other map components
alter on. Also, don’t forget to save.

48
QGIS Training Manual 2022

5.1.3. Adding a Map Title


First, click on the “Add label” button.

And, just like earlier, click and drag


your mouse to create a rectangle.

49
QGIS Training Manual 2022

Then, to edit our title, click on the “Lorem Ipsum” inside our canvas.

Notice that a new “Item Properties”


window appears. Highlight the
“Lorem Ipsum” text inside “Main
Properties” box the and delete it. Then
type in “Magat River Basin”.

While still in “Item Properties” window, in “Appearance”


section, modify the font style and size, Horizontal and Vertical
Alignment to match the following properties shown below. Click
the “Font” to edit the Text Format. Click “OK” when finished.

50
QGIS Training Manual 2022

Here’s what our page looks so far:

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

5.1.4. Adding a Legend


To actually know what the map displays, the map reader must have a kind of a reference.

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.

To do so, in the “Items Properties” tab, find the “Auto


Update box under the “Legend Items” group and untick 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

5.1.5. Adding a Scale Bar and North Arrow


From the Side toolbar, select the “Add a Scalebar” then the “Add a North Arrow” icons and
position it to match the layout below:

Feel free to tweak the Scalebar and


North Arrow Properties and get yourself
familiarized in the process.

Don’t forget to lock the items in


place.

5.1.6. Adding Grids


Still under the “Item Properties”, scroll
down and enable the “Grids” tab. Click the

button to add a Grid then click the


“Modify Grid” button. Change the X and Y
interval under the “Appearance” tab to a
value of “0.5”, the “Frame Style” to
“Interior Ticks”, then click the “Draw Coordinates”. Change Format to “Degree, Minute”,
and the Left and Right to Vertical Ascending”.

54
QGIS Training Manual 2022

Our map should now look something like this:

5.1.7. Exporting Maps


After saving your project, it is now ready for export.

Under the “Layout” menu, several options are available


such as “Export as Image, Export as SBG, or Export as
PDF”.

For this section, we are going to export our map as an


Image.

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.

6.1. Managing Plugins


To begin, click “Plugins from the toolbar and select “Manage and Install Plugins…”.

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

6.2. Installing Plugins


The list of plugins that you can activate and deactivate depends from the plugins that
you currently have or already installed. To install new plugins, select the “Not Installed’ tab
in the Plugin Manage Dialog. A list of plugins ready to be installed will be listed here. If you
click one, details will be displayed in the details window beside it.

To install a plugin, simply click the “Install Plugin” button which is located at the
bottom right of the plugin manager window.

If successfully installed, a toast with a message “Plugin installed successfully” will be


displayed.

Note: An internet connection is required when installing/ downloading new plugins.

58
QGIS Training Manual 2022

6.3. Useful QGIS Plugins


After learning how to install and manage plugins, let us see some really useful plugins
in action.

6.3.1. The QuickMapServices Plugin


The QuickMapServices plugin is a useful in adding base maps into your QGIS
project and offers several options and settings.

In the Plugins Manager, click the search box and type “QuickMapServices” and
hit “Install Plugin”.

6.3.2. The QuickOSM Plugin


With this plugin, Open Street Map (OSM) data can be readily downloaded and added
into your project.

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

7. Creating Vector Data


Maps can be created from already existing data. However, there will be times when some
data needed are not available yet, especially in new or specialized projects. This section will enable
you to create entirely new datasets for yourself and your projects.

Objective: To create a new Vector Dataset

7.1. Creating a New Vector Dataset


7.1.1. The Layer Creation Dialog
We shall begin by creating a new blank project by Clicking “Project” > “New”, or
simply pressing “Ctrl + N”.

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.

Navigate into a folder named “New Shape files”


in our training Folder and enter “ISU School
Facilities” as the file name. Then click on
“Save”.

For the “Geometry Type”, select “Polygon” and


leave the default CRS (Coordinate Reference
System) as is (EPSG:4326-WGS 84).

Click “Ok”.

60
QGIS Training Manual 2022

Your QGIS workspace should now look like this:

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.

7.1.2. Adding a Reference Layer for QuickMapServices


To start, we have to add another layer first into our canvas. In our QGIS Training Files
folder > New Shape Files, there is a shp file called “ISU_ Echague”. Add it into your canvas.

61
QGIS Training Manual 2022

Notice that a new layer has


been added into our canvass with a
name “ISU_Echague”. Right click
into it and select “Zoom to Layer”.

Canvas should now look like this:

What we just added was a reference for our QuickMapServices plugin.

7.1.3. Adding a Base Map


To open the QuickMapServices Plugin, click “Web” in our menu bar >
QuickMapServices > OSM > OSM Standard.

Just like that, a base map has been added into our canvas:

62
QGIS Training Manual 2022

Before we start to “digitize” or create new vector


layer, we can now temporarily disable our reference
layer “ISU_Echague” for the time being. Simply untick
the checkbox beside the said layer

7.1.4. Digitizing / Creating a Vector Data


Before starting make sure the “ISU School
Facilities” layer is highlighted. If not, simply click the
layer to activate it.

We can now click the “Toggle Editing button” in our toolbar. It is in the form of a

little yellow pencil and looks like this:

63
QGIS Training Manual 2022

Once clicked, notice that the other toolbar beside


it is now available. Now click on “Add Polygon Feature”
button.

Notice that our mouse cursor has

changed into something like this: .

With this, we can now start drawing


in our canvas. Use your mouse scroll to zoom
in or out of a feature and middle mouse click-
hold-drag to pan.

Try to zoom in to the school oval and


trace its outline. Left click to start tracing and
right click to stop.

Once you have traced the whole oval, right


click, type in “1” and simply click “OK”.

You have successfully created a new vector data for the school oval. To stop editing, click the

icon again and click “Save”.

64
QGIS Training Manual 2022

7.2. Feature Topology


Topology is a very handy feature of vector data layers, as it minimizes errors such as
overlap and gaps. For instance: if two features share a border, and we are going use topology to
edit the border, then we won’t have to edit each feature individually so they match. Instead, we
can edit them together (the border that they share) and both features will be edited at the same
time.

Objective: To understand and appreciate the use of topology through examples.

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.

To enable this, navigate to the menu bar “Project” >


“Snapping Options”

This will open the “Snapping Options” dialog.

Try to match the properties below and then click the

icon again to start editing/digitizing.

7.2.2. Advanced Digitizing Toolbar


We can enable the “Advanced Digitizing”
toolbar for more tools and options. Go to Menu
bar > View > Toolbars > Advanced Digitizing.

65
QGIS Training Manual 2022

The “Advanced Digitizing” toolbar looks like this:

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.

However, it is still limited to only one which is the “id”.

Objective: To create a form for a layer/ understand editing the attribute table.

To start, open the “Attributes


Table” of “ISU School Facilities”. It
looks like this for now:

Click the “New Field” button or simply press “Ctrl + W”.

In the “Name” Field, Type in “Name”,


change Type to “String”, max "Length” to 50
characters.

It should look like this now:

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.

7.3.1. The Field Calculator


However, the QGIS attributes table is not limited to manual input of data for the
features. We can also calculate the “approximate” area for the features that we have just 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.

8.1. Reprojecting and Transforming Data


In this section. the practical meaning and uses of Coordinate Reference System (CRS) will be
discussed.

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:

8.1.1.1. Geographic Coordinate System (GCS)


A GCS describes where the data is positioned on the earth’s surface. It is
usually measured in angular units since it defines a location based on a model of the
earth’s shape (which is more or less, round). It employs a network of imaginary lines
(longitude and latitude) to define locations and is called a graticule (Smith, 2020).

8.1.1.2. Projected Coordinate System (PCS)


A PCS on the other hand, tells how the data is to be drawn (or projected) onto
a flat surface, like on a paper map or a computer screen. A PCS is flat, so it expresses
locations in linear units (usually in meters) (Smith, 2020).

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

8.1.2. On-the-fly Projections


QGIS reprojects data “on the fly” by default. This means that even if the data itself is
in another CRS, QGIS can project it as if it were in a CRS of your choice.

We can change CRS of the project by clicking on the “Current Projection” button
located at the bottom right corner of QGIS window.

Try to change the current projection to”WGS 84/UTM zone 51N”.

8.1.3. Saving a Dataset into another CRS


Sometimes, downloaded datasets or
even the ones we are working on, differ
in CRS with another dataset that we need.
For this, we can save and export an
existing dataset with another CRS.
Furthermore, whenever we do an area
calculation, it is always better to have the
layer we are working on in a projected
coordinate system.

To export a layer into, right click on


the layer and select “Export” > “Save
Layer As”.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy