Laboratory Manual Principles GIS Jan2022
Laboratory Manual Principles GIS Jan2022
Contents
QGIS practical training manual .......................................................................................................... 1
1. An Overview of the QGIS Interface ............................................................................................... 3
Goal ..................................................................................................................................................... 3
Description of the different parts of the QGIS user interface ............................................................. 3
Layers List ...................................................................................................................................... 3
Browser Panel ................................................................................................................................. 4
Toolbars .......................................................................................................................................... 4
Map canvas ..................................................................................................................................... 4
Status bar......................................................................................................................................... 4
Side toolbar ..................................................................................................................................... 4
Locator bar ...................................................................................................................................... 4
Tasks ................................................................................................................................................... 4
What is next?....................................................................................................................................... 5
2. Adding layers to QGIS .................................................................................................................... 5
Prepare a map ...................................................................................................................................... 5
Self-task .............................................................................................................................................. 8
Loading vector data from a GeoPackage Database............................................................................. 8
Loading vector data from a SpatiaLite Database with the Browser panel .......................................... 9
Self-task ............................................................................................................................................ 10
Reordering the layers ........................................................................................................................ 11
What is next?..................................................................................................................................... 11
3. Navigating the map canvas ........................................................................................................... 12
Basic Navigation Tools ..................................................................................................................... 12
4. Symbology ...................................................................................................................................... 15
Changing colors ................................................................................................................................ 15
Self-task ............................................................................................................................................ 16
Changing Symbol Structure .............................................................................................................. 16
Self-task ............................................................................................................................................ 17
Page 1 of 74
about:blank 1/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
Page 2 of 74
about:blank 2/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
Annotations ................................................................................................................................... 70
Map Components .............................................................................................................................. 70
Export Map ....................................................................................................................................... 73
Goal
To understand the basics of the QGIS user interface.
The following figure shows the elements of QGIS user interface.
Page 3 of 74
about:blank 3/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
Hovering over the layer will give you some basic information like 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 lots of extra options. You will be using
some of them so often.
Browser Panel
The QGIS Browser is a panel in QGIS that lets you easily navigate in your database. You can
have access to common vector files (e.g. ESRI Shapefile or MapInfo files), databases (e.g.
PostGIS, Oracle, SpatiaLite, GeoPackage or MSSQL Spatial) and WMS/WFS connections.
You can also view your GRASS data.
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.
Tip: It can happen that the folders added to Favorite item have a long name: do not worry right-
click on the path and choose Rename Favorite... to set another name.
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
customize 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 Project menu and then clicking on Save.
Map canvas
This is where the map itself is displayed and where layers are loaded. In the map canvas, you
can interact with the visible layers: zoom in/out, move the map, select features and many other
operations that we will deeply see in the next sections.
Status bar
It shows you information about the current map. It allows you to adjust the map scale, the map
rotation and see the mouse cursor’s coordinates on the map.
Side toolbar
By default, the Side toolbar contains the buttons to load the layer and all the buttons to create
a new layer. However, remember that you can move all the toolbars wherever it is more
comfortable for you.
Locator bar
Within this bar, you can access to almost all the objects of QGIS including: layers, layer
features, algorithms, spatial bookmarks, etc.
Tip: With the shortcut Ctrl+K you can easily access the bar.
Tasks
Try to identify the elements listed above on your own screen, without referring to the diagram
above. Check if you can identify their names and functions. You will become more familiar
with these elements as you use them in the coming sessions.
Page 4 of 74
about:blank 4/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
Try to find each of these tools on your screen. What is their purpose?
1.
2.
3.
4. Render
5.
Note: 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 is not 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.
What is next?
Now that you are familiar with the basics of the QGIS interface, in the next lesson we will
see how to load some common data types.
Page 5 of 74
about:blank 5/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
2. The Data Source Manager dialog allows you to choose the data to load depending on the
Open Data Source Manager
data type. We will use it to load our dataset: click the button.
If you cannot find the icon, check that the Data Source Manager Toolbar is enabled in the
View ⇒ Toolbars menu.
Page 6 of 74
about:blank 6/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
Click Add. The data you specified will now load: you can see a protected_areas item in the
Layers panel (bottom left) with its features shown in the main map canvas.
Page 7 of 74
about:blank 7/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
Congratulations! You now have a basic map. Now would be a good time to save your work.
Page 8 of 74
about:blank 8/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
1. Click on the Connect button. In the central part of the window, you should now see
the list of all the layers contained in the GeoPackage file.
2. Select the roads layer and click on the Add button.
A roads layer is added to the Layers panel with features displayed on the map canvas.
3. Click on Close.
Congratulations! You have loaded the roads layer from a GeoPackage.
Loading vector data from a SpatiaLite Database with the Browser panel
QGIS provides access to many other database formats. Like GeoPackage, the SpatiaLite
database format is an extension of the SQLite library. Adding a layer from a SpatiaLite
provider follows the same rules as described above: Create the connection –> Enable it –>
Add the layer(s).
While this is one way to add SpatiaLite data to your map, let us explore another powerful
way to add data: the Browser.
For example, click on the drop-down icon next to the GeoPackage entry. You will
see the training-data.gpkg file we previously connected to (and its layers, if expanded).
Page 9 of 74
about:blank 9/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
5. Navigate to the exercise_data folder, select the landuse.sqlite file and click Open.
Notice that a landuse.sqlite entry has been added under the SpatiaLite one.
Tip: Enable the Browser panel in View ► Panels ► and use it to add your data. It is a handy
shortcut for the Data Source Manager ► Browser tab, with the same functionality.
Note: Remember to save your project frequently! The project file does not contain any of the
data itself, but it remembers which layers you loaded into your map.
Self-task
Load the following datasets from the exercise_data folder into your map using any of the
methods explained above:
buildings
water
Page 10 of 74
about:blank 10/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 11/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 12/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 13/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 14/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 15/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 16/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 17/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 18/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 19/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 20/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 21/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 22/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 23/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 24/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 25/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 26/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 27/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 28/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 29/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 30/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 31/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 32/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 33/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 34/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 35/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 36/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 37/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 38/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 39/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 40/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 41/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 42/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 43/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 44/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 45/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 46/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 47/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 48/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 49/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 50/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 51/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 52/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 53/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 54/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 55/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 56/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 57/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 58/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 59/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 60/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 61/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 62/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 63/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 64/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 65/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 66/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 67/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 68/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 69/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 70/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 71/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 72/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 73/74
12/1/23, 10:22 AM Laboratory Manual Principles GIS Jan2022
about:blank 74/74