This file is exclusive to our class. Do not distribute nor upload to any online platforms.
GIS Application in ABE – Laboratory Exercise 7: Vector Overlay
Spatial analysis using vector data provides an effective means of determining classified areas (depending on
what you want to represent) on a regional scale. An example application is determining erosion potential or erosion
risk in the specified study sites. In this exercise, you will be identifying high, moderate, and low risk areas by
overlaying the slope and soil maps of Agusan Del Norte. In this analysis, it is assumed that areas with steeper slopes
and looser soil grains have higher erosion risk.
𝑺𝒂𝒎𝒑𝒍𝒆 𝑫𝒂𝒕𝒂𝒔𝒆𝒕𝒔:
• AgusanDelNorte_slope
• AgusanDelNorte_soil
• AgusanDelNote_municipalities
Requirement for submission:
Submit the following files for this exercise:
a. Short report saved as GISABE_LabEx7_YourSurname.pdf containing a flowchart showing the processes you
implemented in this exercise. A sample illustration guide in preparing your flowchart is given in the last page
of this document.
b. An erosion risk map with complete map elements saved as ErosionRiskMap_YourSurname.jpg
Send the files via email at paulojay_rivera@psau.edu.ph
Procedures:
A. Creating new fields
1. Open QGIS. Create a new project and save it as Exercise7.
2. Browse through the folder where you saved the datasets for this exercise and add the slope and soil vector
files.
3. Explore each vector data by looking at their corresponding attributes and projection. You may modify the
individual styles for better representation and visualization.
As an initial step, you will need to create Slope and Soil Erodability levels (i.e. new fields) for each set of
vector data.
4. Open the attribute table of AgusanDelNorte_slope then click on the Toggle editing mode button.
5. Click on the New field button.
6. The Add field dialog box will appear. Set Name: SLOPE_ER and Type: Whole number (integer). Leave the
width with a value of 1.
7. A new column will be added on the rightmost part of the table containing NULL values.
8. Click on the Save Edits button and minimize the attribute table.
9. Repeat steps 4-8 for the AgusanDelNorte_soil. Use SOIL_ER for the new field name.
B. Setting the erodibility levels
Assign the erodibility level corresponding to each slope and soil types (1=low, 2-moderate, 3=high risk).
Refer to table below in setting the reclassified values for the two datasets.
Page 1 of 7
This file is exclusive to our class. Do not distribute nor upload to any online platforms.
10. Display again the attribute table of the slope data. Make sure that it is still in the editing mode.
11. Examine the values under column SLOPE. Select all features that have a slope value of less than 30% using
the Select features using an expression tool (recall steps from attribute querying exercise).
12. Use the Open field calculator tool.
13. Make sure that the options "Only update selected features" and "Update existing field" are checked.
14. In the Expression value, type 1. Click OK.
15. Notice that the SLOPE_ER column on all the slope values less than 30% is populated with the value "1."
16. Clear selected features using the Deselect all button.
17. Repeat steps 11-16 for slope values that are between 30-50% and above 50%.
18. Populate the SLOPE_ER field with the appropriate values (2 and 3, respectively) as indicated in the table
above. 19. All rows in the attribute table should have SLOPE_ER values when you finished. Save the changes
you have made. 20. Close the attribute table of slope.
21. Open the attribute table of soil data and enable Toggle editing mode.
22. Examine values under SOILDESC. Refer to Table 1 and note the erosion risk value for each type of soil.
23. Select all values with soil type = CLAY.
24. Use the Open field calculator tool.
25. Make sure that the options "Only update selected features" and "Update existing field" are checked.
26. In the Expression value, type 1. Click OK.
27. Notice that the SOIL_ER column on all the soil type = CLAY is populated with the value "1."
28. Clear selected features using the Deselect all button.
29. Repeat steps 23-28 for values Loam, Silt Loam and Clay Loam. Use a query with operator OR to select all
3 values with the specified soil types.
30. All rows with the 3 soil types should contain value under SOIL_ER column equal to "2".
31. Repeat the same steps for soil types Hydrosol, Mountain Soil and Rubble Land. Set erosion risk value to
"3".
32. Save your edits, disable Toggle editing mode and close the attribute table.
C. Performing Vector Overlays
Now that each parameter has been properly classified based on their contribution to the risk of erosion, you
will then use the tool Intersection to overlay the two datasets and obtain an output containing the areas
common to both datasets.
33. Go to menu Vector→ Geoprocessing Tools → Intersection.
34. In the Intersection dialog box, set Input layer: AgusanDelNorte_slope and Overlay layer:
AgusanDelNorte_soil.
35. Save output file as AgusanDelNorte_SlopeSoil.shp. Click OK.
36. A new shapefile will be created containing the combined attributes of the slope and soil layer.
37. Inspect the attributes of the resulting layer AgusanDelNorte_SlopeSoil.shp.
D. Setting Risk Erosion Risk Classes
You will now categorize the overall erosion risk within the study site using the assumption that areas
with steeper slopes and looser soil grains have higher erosion risk. Refer to Table 2 for the erosion risk
assignment.
Page 2 of 7
This file is exclusive to our class. Do not distribute nor upload to any online platforms.
38. Open the attribute table of the layer AgusanDelNort_SlopeSoil.shp (result from part C) and click on the
Toggle editing mode.
39. Add a new field and set name to ERO_RISK. Set Type: Text (string) and Width: 10. This field will then
contain the erosion risk classes of LOW, MODERATE, or HIGH.
40. Hide all the other columns in the AgusanDelNorte_SlopeSoil attribute table first so you can easily check if
you are assigning the correct erosion risk. To do this, click the Organize Columns button as shown below and
uncheck other fields (enable only SLOPE_ER, SOIL_ER and ERO_RISK) then click OK.
41. Edit the ERO_RISK field and populate with the correct values from Table 2.
42. Start with the LOW erosion risk and use this query expression in the Select features using an expression
window:
"SLOPE_ER" = 1 AND "SOIL_ER" = 1 OR "SLOPE_ER" = 1 AND "SOIL_ER" = 2 OR "SLOPE_ER" = 1 AND
"SOIL_ER" = 3 OR "SLOPE_ER" = 2 AND "SOIL_ER" = 1
43. The features satisfying the conditions are now selected. These selected features should be populated
with a value of LOW under the ERO_RISK column.
44. Use the Open field calculator tool and assign selected features in the Expression value equal to "LOW".
45. Make sure that the options "Only update selected features" and "Update existing field" are checked. Click
OK.
46. Close the Field Calculator window and inspect the updated attribute table. The selected features should
now contain value of "1" under the ERO_RISK column.
47. Clear selected features using the Deselect all button.
48. Repeat step 42 with the appropriate expression to obtain only the values that will correspond to
MODERATE erosion risk using values from Table 2.
Page 3 of 7
This file is exclusive to our class. Do not distribute nor upload to any online platforms.
49. When all rows are selected, edit the ERO_RISK column. Repeat steps 44-47 but with value "MODERATE".
50. Repeat same steps for the values corresponding to HIGH erosion risk based on the table below.
51. Save all your edits, disable Toggle editing mode and close the attribute table.
E. Calculating area of erosion risk levels
52. Go to menu Vector→ Geoprocessing Tool→ Dissolve. This tool merges features based on an input field. All
features with identical input field values are combined to form one single feature.
53. Set Input layer: Agusan Del Norte SlopeSoil and Dissolve field: ERO_RISK. Save file as SlopeSoil_Dissolved
then click OK.
54. Open attribute table of resulting layer SlopeSoil_Dissolved and enable Toggle editing mode.
55. Create a new field and set Name: ER_Area and Type: Whole number (integer).
56. Use the Open field calculator tool to compute for the area of each class/erosion risk level.
57. Make sure to set the field ER_Area as the field being updated.
58. In the Field Calculator window, look for the function $area (refer to figure below). Double-click this
function and click OK.
59. The ER_Area should now contain the area values for the LOW, MODERATE and HIGH erosion risk
polygons.
60. Save your edits, disable Toggle editing mode and close the attribute table.
61. To visualize where these classified erosion risk areas are located, add the Agusan Del Norte_municipalities
data.
62. Use Select by Location tool (Vector → Research Tools → Select by Location) to inspect the location of each
area per risk level. Recall steps from Exercise 6 to do this.
Explore on computing the area percentage of the erosion risk areas per municiplity. Use appropriate
geoprocessing tools and the processes above (creating new fields, attribute querying and field calculation)
to do this.
Page 4 of 7
This file is exclusive to our class. Do not distribute nor upload to any online platforms.
F. Map Layout
In this part of the exercise, generate the erosion risk map containing the necessary map elements and your
results from the previous steps. Map components are essential to end users because these are the keys to
understanding and interpreting the information contained in a map. When creating maps, the layout must
not only be visually pleasing but can provide sufficient information on what the map is all about. The
following map components are required when creating maps for presentation purposes:
• Title of the Map: The title provides users with a brief description of the information presented in a
map. The title must be concise but fully characterizes the map's purpose.
• Scale of the Map: Scale is the main reference for measurement. It defines the relationship between
the map units and the actual ground measurements. The map scale is represented by a scale bar and
a text indicating the map to ground ratio (e.g. 1:10,000).
• North Arrow: The north arrow provides information on the map's orientation and is useful when
defining directions. North arrows are significant, particularly in cases where the map cannot be easily
understood when oriented towards the north. North arrows are also useful when creating efficient
map layouts that fit on common paper sizes and for other aesthetic purposes.
• Legend: Maps provide information by using symbols. These symbols can be figures, lines, shapes,
lines and colors that correspond to specific information contained in the map.
• Coordinate System: Map features are true representations of objects in the real world and must be
associated with their actual locations on the ground. The spatial information about map features are
referenced to a standard coordinate system.
• Grid lines: Grid lines aid users in location the geographical location of the features on a map.
• Author: The name of the author is also an important map component because it allows users to credit
the source of the maps.
63. Go to menu Project → New Print Layout.
64. In the Create print layout Title dialog box, input Erosion Risk Map. Click OK.
65. The Print Layout window will appear. Maximize this window. This tool provides growing layout and
printing capabilities. It allows you to add elements such as the QGIS map canvas, legend, scale bar, images,
basic shapes, arrows and text labels. You can size, group, align and position each element and adjust the
properties to create your layout. The layout can be printed or exported to image formats.
66. In the Print Layout window, right-click on the empty map view and click Page Properties. In the Item
Properties panel, set Page Size→ Orientation: Portrait.
Page 5 of 7
This file is exclusive to our class. Do not distribute nor upload to any online platforms.
67. Go to menu Add Item → Add Map. Drag a rectangle to set the map extent. The layers will then appear
within the extent of the defined rectangle.
68. Right-click on the map and select Item Properties. Under Main Properties, set Scale to 1300000. Note: You
may change the value of scale. Check appropriate value to view all your features.
69. Go to menu Add Item → Add Legend and drag a window where to place in the map. You may use the tool
Select/Move item to adjust the placement of your legend.
70. Click on the legend box and go to the Item Properties panel. Under Legend Items, check the option Auto
update.
Note: You may edit the symbology of your layers for simplicity (instead of Categorized, you can set them back
to Single symbol classification). You may switch between the main interface and the print layout window.
Click on the map layout to see the changes.
71. Go to menu Add Item→ Add Scale and drag a window where to place the scale bar. In Item Properties
panel, change settings for background color, font size, segments etc.
72. Go to menu Add Item→ Add North Arrow and drag a window where to place the north arrow. In Item
Properties panel expand the Search Directories section and choose your preferred north arrow symbol.
73. Go to menu Add Item→ Add Label and drag a window where to place the label text box. In Item Properties
panel, add the text for your title. Change font size and colors as preferred.
74. You may add other map components (e.g. grid lines, frames, etc). In the Item Properties panel, scroll down
and look for the Grids option. Click Add a new grid and modify settings as preferred using the Modify grid
button.
Note: Explore on the different options available in the Item Properties panel and apply appropriate settings
for your map layout.
Page 6 of 7
This file is exclusive to our class. Do not distribute nor upload to any online platforms.
75. Finalize your map and export as image. Go to menu Layout→ Export as Image. Save map in .jpeg format
on your working directory.
76. In the Image Export Options window, you may adjust export settings (e.g. increase map resolution to 1000
dpi). Click Save. Your map (.jpeg) will then be available on your defined export location.
77. End this exercise by saving your map layout and QGIS project. In the Print Layout window, Go to menu
Layout → Save project then close the window. In the QGIS interface, Go to menu Project→ Save.
𝑺𝒂𝒎𝒑𝒍𝒆 𝒅𝒊𝒂𝒈𝒓𝒂𝒎 𝒇𝒐𝒓 𝒚𝒐𝒖𝒓 𝒇𝒍𝒐𝒘𝒄𝒉𝒂𝒓𝒕
Prepare a flowchart of the erosion risk mapping implemented in this exercise (Parts A to E). Include the
flowchart illustrating the connectivity of your data inputs, GIS tools/processes and outputs (use actual names
of vector layers) on your report.
Page 7 of 7