You are on page 1of 8

TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A

Laboratory Exercise 1: Familiarization with QGIS and Vector Data

Objectives:
(1) To utilize an open-source GIS software such as Quantum GIS (QGIS) Desktop
(2) To be able to familiarize with the interface and tools in QGIS Desktop
(3) To explore the capabilities of QGIS Desktop in displaying shapefiles and editing its properties
(4) To create a map layout in QGIS Desktop

Materials:
▪ Shapefile with filename Barangays (with file extensions .shp, .sbn, .sbx, .dbf, .prj, .shx, .xml)

Requirements for Submission DUE TODAY:


Zipped folder with filename TC25_LabEx1A_Surname containing the following:
1. Short report (.doc or .pdf) containing answers to questions and the required snapshots and
information (Save your file as TC25_LabEx1A_Surname.doc or pdf). Discuss any problems
encountered and how you resolved them.
2. Exported map layout output (Saved as TC25_LabEx1A_Map_Surname.jpeg).

How to submit requirements via Google Classroom:


1. Open Google Classroom. From Classwork Tab, select corresponding “Day” category and posted
assignment (laboratory exercise).

Deadline of laboratory exercise is on the upper left side. Class comments posted will be visible to your
fellow classmates and lecturer. Private comments posted will be visible only to you and your lecturer.
2. From “Your work” dialogue box (upper right portion), click “+ Add or create” and select “File” from
the dropdown. You can drag your zipped folder to the upload interface or you can click “Select file
from your device”. Locate your file path where you stored your zipped folder for submission. Select
zipped folder and click “Open”.
3. Click “Upload”. Upon, submission of required laboratory output, click “Mark as done” in the “Your
work” dialogue box.

UP Department of Geodetic Engineering – TCAGP Page 1


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A
Procedures:
A. Installation and Familiarization with the Software
1. Download the QGIS (long-term release) installer from:
https://qgis.org/en/site/forusers/download.html (Note if your PC has 32-bit or 64-bit processor)
2. Install in your PC/laptop. Other than the file installation path, maintain all default settings. Once
installation is complete, a QGIS 3.10.3 folder will be created in your desktop containing these icons:

3. Click on the icon of QGIS Desktop to start working with the interface and tools in QGIS.
4. The initial interface will show recent QGIS projects. Click the New project icon . The QGIS interface
will look similar to the figure below.
MENU BAR
TOOLBARS

BROWSER
PANEL MAP VIEW
PROCESSING
TOOLBOX

LAYERS
DATA
PANEL
FRAME
AND
STATUS
BAR
Figure 1. QGIS Desktop Interface and panels

5. The different parts of the interface are the following:


▪ Menu Bar
There are twelve (12) default menus found in this portion of the interface. Explore each menu
and you can access different tools through drop-down selections.

▪ Toolbars
There are several toolbars displayed on the interface and can be found below the Menu Bar
and beside the Table of Contents window. These toolbars contain icons with their
corresponding functions. These are equivalent icons of the functions under each menu. Hover
the mouse cursor and inspect the names of the icons.

You can drag these toolbars anywhere by clicking on the leftmost part (the space with vertical
dotted lines). A white crosshair will appear prompting you to drag the toolbar.
▪ Layers Panel

UP Department of Geodetic Engineering – TCAGP Page 2


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A
The Layers Panel serves as Table of Contents (TOC) window that contains your datasets that
are loaded into QGIS.

Question 1: What are the icons included in the Layers Panel?

▪ Data Frame and Status Bar


This part of the interface contains the data frame properties of your input data such as
coordinate system, scale and rotation values. The rendering or displaying option for your data
is also included in this portion.

▪ Map View
This is the large window that displays the input data. You can view and select layers/features
in this window if the layers are enabled in the Layers Panel.

Question 2: What happens if the cursor is moved within the Map View? What is/are being changed or
displayed at what specific part of the interface?

B. Displaying shapefiles
Adding data in QGIS can be done through the Menu Layer > Add Layer.

Question 3: How many types of layers can be added on your QGIS workspace as seen under Menu
Layer > Add Layer? Please enumerate (or take snapshot).

6. Go to Layer → Add Layer → Add Vector Layer. The Data Source Manger window (see Figure 2) will
open.
7. Set “Source Type” to File and “Encoding” as: System
8. Under “Source” click the button and browse to the file: Barangays.shp.
9. Click Add and Close

10. Your workspace should look


like the image in Figure 1,
with the Barangays layer
enabled in Layers Panel with
the corresponding vector data
displayed in the map view.
.
.
.

Figure 2. Data Source Manager

C. Zooming tools
The zoom tools are useful for focusing and looking at the spatial aspect of your geographic data. Inspect
the different Zoom tools:

Question 4: Explain what the different icons above do.

UP Department of Geodetic Engineering – TCAGP Page 3


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A

D. Viewing and editing shapefile properties


11. Double click on the filename of the Barangays layer in the Layers Panel window.
12. The Layer Properties window (see Figure 3) will appear.
13. The 19 properties included are the following (shown on the tabs on the left of the window):
a. Information
b. Source
c. Symbology
d. Labels
e. Diagram
f. 3D view
g. Source Fields
h. Attributes Form
i. Joins
j. Auxilliary Storage
k. Actions
l. Display
m. Rendering
n. Variables
o. Metadata
p. Dependencies
q. Legend
r. QGIS Server
s. Digitizing

Figure 3. Layer Properties window


14. Under the Information Tab, the layer’s general info are displayed, including: name, source, coordinate
reference system (CRS), and extent.

Question 5: What is the coordinate reference system of the shapefile?

15. In the Symbology Tab, you can select


any color scheme for the display of
your data through the drop-down tab.
The default option is “Single Symbol”.
Take a snapshot of this symbology
style in the map view.

16. Set the symbology style to Categorized.


17. Set “Column” to BARANGAYS. Click the Classify button, click Apply then click OK.
18. Take a snapshot of the Categorized layer in the map view.
19. Go back to the Layer properties window. Try the symbology style: Graduated, and Set “Column” to
AREA_SQKM.
20. Click the Classify, Apply, then OK.
21. Take a snapshot of the Graduated layer.

UP Department of Geodetic Engineering – TCAGP Page 4


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A
Question 6: What is/are the difference/s in the three (3) layer styles? Describe the snapshots taken and
include them in your report.

22. In the Layer properties window, go to Labels Tab. Labels can show names or description of your
features.
23. Click the drop-down button to enable the Single labels option,
24. For the “Value” option, select BARANGAYS from the drop-down menu. Click Apply then OK.
25. Zoom-in to the lowest/southern part of your data.
26. Take a snapshot of the island/group of barangays that include Brgy. Rabor.

Question 7: What are the barangays surrounding Brgy. Rabor?

27. Go back to the Layer Properties window. In the Source Tab, the layer (attribute/column) name
contained in the attribute table of the shapefile are listed.

Question 8: How many fields are there and what are their names and data type (type name)? Tabulate
your answer.

E. Viewing Attribute Tables


28. In the Layers panel, right-click on the Barangays layer name and select Open Attribute Table.
29. The Attribute table will appear.
30. Inspect the icons/buttons shown at the top of the window.

Question 9: What are the names of the icons shown in the Attribute Table window?

F. Making a Map Layout


1. Continuing from the previous QGIS project, go to menu Project > New Print Layout.
2. You will be prompted to enter a title for the Create Print Layout. You can set any preferred name, e.g.,
TC25_Lab1 and click OK. (Leaving the “Create print layout Title” empty will assign a default name such
as Layout 1.
3. Now we would have to bring the map view that we see in the QGIS Canvas to the composer. Go to
menu Add Item > Add Map.
4. The cursor will change to a cross sign which means the Add Map button is active. Hold the left mouse
button and drag a rectangle where you want to insert the map.

UP Department of Geodetic Engineering – TCAGP Page 5


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A

5. We will be making a map for the island groups containing barangay Rabor (Municipality of Balabac).
If the rendered map is not covering the full extent of our interest area, we can move the map view.
Select Edit > Move content to pan the map in the window and center it in the composer.
6. You can adjust the zoom level for the given map. Click on the Item Properties tab (located at the right
panels) and enter your desired Scale. Try: 200000

7. We can add an inset map to our layout. Go back to QGIS desktop and zoom out to the whole extent
of the BARANGAYS layer (Province of Palawan).
8. Go back to Composer and go to Add Item > Add Map. Drag a rectangle at the place where you want
to add the map inset. You will now notice that we have 2 map objects in the Print Layout, similar to
image below:

9. Select the new map object that we just added from the Items panel (Map 2). Select the Item properties
tab (Note: When making changes, make sure you have the correct map (item) selected). To avoid
confusion, you can rename the items in in the map layout. Select specific item (map) in “Items”. Click
on the “Item Properties” tab and scroll down to “Item ID”. Enter preferred name of the item (i.e., map
inset or main map or etc.)
10. To create a frame for the inset object, select the specific item in the “Items” panel and click “Item
Properties”. Scroll down to the Frame panel and check the box next to it. You can change the color
and thickness of the frame border so it is easy to distinguish against the map background.

UP Department of Geodetic Engineering – TCAGP Page 6


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A

11. The current labels may appear to clutter the inset


map, but we want the labels to appear in our main
map object. We can adjust our labels to be scale-
dependent. Go back to the QGIS Desktop window.
12. Open the Layer properties of the Barangay layer, go
to Labels Tab
13. Select the option for Rendering.
14. Check the box for Scale dependent visibility
15. Set the minimum and maximum zoom levels as:
1:250000 and 1:1000 respectively.
16. Click Apply and OK.

17. Go back to the Print Layout window (Note: Be sure to click Refresh from the View tab to see the result
of the previous steps). To automatically highlight the area in our inset (Map 2) that represents our
main map object (Map 1), select Map 2 in the Items panel. In the Item properties tab, scroll down to
the Overviews section. Click the Add a new overview button .
18. Select Map 1 as the Map Frame. What this is telling the Print Layout is that it must highlight in our
current object Map 2 with the extent of the map shown in the Map 1 object.

19. Now that we have the map inset ready, we will add a grid and zebra border to the main map. Select
the Map 1 object from the Items panel. In the Item properties tab, scroll down to the Grids section.
Click the Add a new grid button
20. To configure the settings for the grid, click on the Modify grid... button.
21. In the Map grid properties view, click the button beside CRS. In the Coordinate Reference System
Selector window select WGS 84 EPSG:4326. Click OK
22. Set “Interval units” to: Map unit.
23. Select the Interval values as 0.1 in both X and Y direction. You can adjust the Offset to change where
the grid lines appear.
24. Scroll down to the Frame section and select a frame style that suits your taste (e.g. Zebra). Also check
the Draw coordinates box.
25. You can adjust the Distance to map frame till the coordinates are legible. You can also change font
type and size through the Font button.
26. Change the Coordinate precision to 1 so the coordinates are displayed only up to the first decimal.

27. To add a North Arrow to the map, click Add Item > Add North Arrow. Holding your left mouse
button, draw a rectangle on the top-right corner of the map canvas. On the right-hand panel, click on
the Item Properties tab and expand the Search directories section and select the North Arrow image
of your liking.
28. Add a scale bar. Click on Add Item > Add Scalebar. Click on the layout where you want the scalebar
to appear. In the Item Properties tab, make sure the correct map object (Map 1) is selected for which
to display the scalebar.
29. Choose the Style that fit your requirement.
30. Set scale bar units: Kilometers. Label unit multiplier: 1. Label for units: KM
31. In the Segments panel, you can adjust the number of segments and their size (e.g. Map units per bar
unit: Segments: L=0, R=4; Fixed width=5units, Height=2mm).

UP Department of Geodetic Engineering – TCAGP Page 7


TC 25 Geographic Information Systems (GIS) Laboratory Exercise 1A
32. To add a label to our map, Click on Add Item > Add Label. Click on the map and draw a box where
the label should be. In the Item Properties tab, expand the Label section and enter the text as:
MUNICIPALITY OF BALABAC, PALAWAN. Adjust the Font (click button “Font…”) and alignments based
on your preference.
33. You can add another text label to add the data source, software credits and/or your names, (e.g. Data
Source: Philippine GIS Data Clearinghouse (PhilGIS), http://philgis.org/. Mapped using QGIS 3.10.3
Cartographer: <YourName>)
34. Once you are satisfied with the map, you can export it as Image, PDF or SVG. Export it as an image.
Click Layout > Export as Image. Save as TC25_LabEx1A_Map_<Surname>.jpg
35. Save the composer layout as a map template, Layout > Save as template,
TC25_LabEx1_MapTemp_<YourSurnames>.qpt

SAMPLE MAP OUTPUT:

UP Department of Geodetic Engineering – TCAGP Page 8

You might also like