Professional Documents
Culture Documents
___________________________________________________________________________
Contents
PRE-PRAC VIDEOS ................................................................................................................................... 1
INTRODUCTION ....................................................................................................................................... 1
OBJECTIVES AND SKILLS ......................................................................................................................... 2
DATA AND SOFTWARE ............................................................................................................................ 2
ADDITIONAL HELP ................................................................................................................................... 2
MAIN TASKS ............................................................................................................................................ 3
1. TASK 1- GIS Basics: Explore data properties; set a CRS; project layers........................................... 3
1.1. Examine the data .................................................................................................................... 3
1.2. Re-project the two layers which are not in UTM 36S projection. .......................................... 4
2. TASK 2 – CREATE A STUDY AREA for a project ................................................................................ 5
2.1. Create a Fetakgomo polygon layer ......................................................................................... 5
2.2. Create the layer with the required vegetation land cover areas............................................ 6
2.3. Clip the vegetation areas ........................................................................................................ 7
2.4. Dissolve the boundaries .......................................................................................................... 7
3. TASK 3 – VECTOR DATA ANALYSIS – OVERLAY, SELECTION AND BUFFER ...................................... 7
3.1. Open a new QGIS project and add the relevant data layers: ................................................. 8
3.2. Spatial selection: Select by Location ....................................................................................... 9
3.3. Attribute selection (Attribute query) ...................................................................................... 9
3.4. Creating and using buffers .................................................................................................... 10
3.5. Select by Location and Inverting a selection......................................................................... 11
4. TASK 4 – DISPLAYING VECTOR DATA CATEGORIES AND PROCESSING UNION AND INTERSECT
OVERLAYS.............................................................................................................................................. 11
4.1. Find Area 1 (Overlay - Union)................................................................................................ 12
4.2. Find Area 2 (Overlay – Intersect) .......................................................................................... 13
5. TASK 5: EXAMINE and INTERPRET attribute FIELD STATISTICS ..................................................... 14
6. TASK 6: PRACTICAL 8 QUIZ ............................................................................................................ 16
CONCLUSION......................................................................................................................................... 16
PRE-PRAC VIDEOS
Prescribed: Videos 1 to 5 under Basic Spatial Analysis videos (available under Videos and help files
on clickUP)
INTRODUCTION
In this exercise you will explore a small selection of the many analysis tools offered in QGIS
Desktop. You will conduct basic spatial analysis procedures to answer spatial questions
based on different scenarios. Finally, you will use the understanding and skills that you
gained to complete an online quiz.
For this project you can work with the shapefiles (and not the QGIS Geopackage format). That
means that you will save all outputs that you create “As a file” and then make sure that you save as
a shapefile.
Note: If you want to use the Geopackage format – you will have to change all
the data layers to that format. You may also pursue the Geopackage format in
the individual project later in the semester.
ADDITIONAL HELP
GGY 283 clickUP page – Videos and help files – QGIS videos and the QGIS manual.
The manual is also available online at https://docs.qgis.org/3.16/en/docs/user_manual/index.html.
MAIN TASKS
For this practical exercise you must complete SIX tasks:
1. TASK 1- GIS Basics: Explore data properties; set a CRS; project layers.
Purpose: This task is designed to review basic skills that you acquired in previous practical exercises.
Answer all the questions in this activity as you may need these insights in the subsequent clickUP
quiz. This activity covers:
GIS Data properties – vector
GIS Data properties – Raster
GIS Data Attributes and Attribute tables.
1.1. Examine the data
I. Use the QGIS Browser window or panel to study the properties of each of the shapefiles
listed below, record/write down the geometry type and the number of features:
F_SchoolUTM.shp
o Geometry: ……………….
o Number of features: …………….
F_Mainroad.shp
o Geometry: ………….
o Number of features: ……………
F_Municipality.shp
o Geometry: ……………….
o Number of features:
FetaUseUTM.shp ……………………………
o Geometry: ………………..
o Number of features: ………….
II. Note the file format and pixel dimensions of the Feta90mDEM1.tif raster dataset below.
File format: …………………
Cell Dimensions: ………………..
III. Use the Browser window to check the coordinate system and projection under the Source
tab in the Layer Properties of all the data layers. Also check the Preview and Attributes tabs
for the layers.
IV. You will see that most of the layers are projected to EPSG: 32736 – WGS 84 / UTM zone 36S.
Two of the layers (the energy substations and transmission lines) are different and have a
geographic coordinate system and datum assigned, e.g.
1.2. Re-project the two layers which are not in UTM 36S projection.
Note: When using spatial analysis functions, the projection properties of the data layers must be
the same. Simply altering the projection information in the layer properties is not suitable and
will not alter the actual properties of the data layer - you must re-project these before starting
your new project.
You can do this separately for each layer or you can do a batch process to project both
layers at the same time:
In the QGIS menu bar, select Vector Data Management Tools Reproject layer
Option 1: Re-projecting each layer separately
e) You can create a selection by selecting the record in the attribute table, or by applying an
f) Right click on the municipality layer, choose Export and Save Selected Features As –
navigate to your data folder and give it a suitable, but short, name, e.g. FetaMuni. (In
earlier versions of QGIS – right click - choose Save as and make sure that you tick the option
to save only the selected feature)
2.2. Create the layer with the required vegetation land cover areas
a) Add the vegetation layer (FetaVegUTM36S.shp)
b) Then select the specified vegetation land cover areas where the LC_VALUE in the attribute
table equals 3. (You can use and Select by expression function or just select the records in
the attribute table.) The selected features is displayed in yellow:
The objective of this activity is to ensure that you understand how different types of vector analysis
can be applied in a geospatial analysis.
Notes:
1) Remember to constantly rename newly created map layers as you go through the different
processes. This will help you to keep track of what each layer represents.
2) In some cases you can make continuous selections on the same data set. If not, it is useful to
clear a previous selection before starting a new selection.
Scenario: The Sekhukhune district is implementing a project to urgently upgrade all primary schools
in the Fetakgomo municipal region that have no proper road access and water.
Research questions:
Question 1) Which schools in the Fetakgomo municipal region needs urgent upgrades?
Criteria: The schools must be:
in the Fetakgomo municipal area AND the schools must be
primary schools without water and with poor gravel road access.
Question 2) How many of the schools selected for upgrades in Question 1 are close to a main road
(within 5 km) and how many are further than 1km away from a main road?
a. Identify and locate schools for upgrade that are within five kilometres of a main road.
b. Identify and locate schools for upgrade that are further than five kilometres from a
main road.
Data required:
Schools, Main roads and the Fetakgomo region (as created in the previous task)
Analysis model:
3.1. Open a new QGIS project and add the relevant data layers:
Add the Fetakgomo area, the schools and the main roads. Save the project in your data
folder with a logical name, e.g. School upgrade project in Fetakgomo.
Note: The Clip function will render a similar result, but the output will be a new layer. The Select by
Location tool just creates a selection. You can save the selected features or continue working with the
active selection.
NOTE: Make sure to select Filter Current Selection to select only the relevant schools from
the previous active selection of schools in the Fetakgomo area.
Do NOT try to count the selected schools – Open the attribute table and read from the top bar:
NB* Now create a new layer from this selection. Export and save the selected
features in your data folder and give the layer a suitable name e.g.
SchoolsForUpgrades. You will use it again later.
Question: How many of the schools for upgrades are within a 5 km distance (buffer) from the
main road?
a. As your first step towards finding the answer, you will create a 5 km buffer around the
main Road
Tool: Vector Geoprocessing tools Buffer (Select the main road as the input, set the
distance and unit - select your Fetakgomo data folder for the output and give your layer
an appropriate name. Then select “Run”)
b. Display the main road above the buffer so that you can use the measure tool
to check whether the buffer process completed correctly.
c. Make some changes to the buffer symbol, e.g. set the Buffer layer transparency to 50%
or use a “hashed” symbol.
OR
NB* Keep the saved buffer layer, you will use it again later.
NB! Do not count on the screen! Read the answer from the relevant attribute table:
b. Now you must find a way to answer the following question yourself:
How many primary schools in the Fetakgomo municipal area are outside
the 5 km (buffer) from the main road?
Hint: You can invert the previous selection in the attribute table by using
the “Invert selection” option -
Or
You can try to use the Vector Geoprocessing tools Difference tool
The objective of this activity is to ensure that you understand the difference between Union and
Intersect operations in a geospatial analysis.
Scenario: For community based programmes, you need to find two areas:
Area 1: For an ecological project you need to identify an area / areas in the region where the
land use is Subsistence farming or the vegetation is Sourish mixed bushveld.
Area 2: For an agricultural-community project you need to identify an area / areas in the
region where the land use Subsistence farming and the vegetation is Sourish mixed Bushveld,
4.1.2. Add the land use and vegetation data to a QGIS project (Use the same project as before
or start a new project).
a) To understand your data better, display the types of land use and vegetation types
respectively.
4.1.3. To find the area (Area 1) where the land use is Subsistence farming or the vegetation is
Sourish mixed bushveld, you will use a Union function.
a) To use the union function with only the two relevant areas, you must first create these
areas as separate layers. (Hint: As in previous practical exercises - Use Select by Expression
Export selection to a new layer and save the new layer with a suitable name in your data
folder)
b) Then use: Vector Geoprosessing Tools Union to complete the union overlay.
(Save the result as a shapefile, and with a suitable name, in your data folder)
Union
(OR) =
Note: To use an Intersect function with only the two relevant areas, you will use the
layers that you created as before
4.2.3. Save the result as a shapefile with a suitable name, in your data folder)
Intersect
(AND) =
Note: Typically, an overlay using UNION will have a ’bigger’ output, but on the other
hand, an overlay using INTERSECT will have a reduced output.
5.3. Then select the Field to calculate statistics on (e.g. LEARNERS) and if you just want to get
an overview or lookup something, let it just “Save to a temporary file”.
5.4. Examine the result (note that there is an Html file that you can open as well):
Note: Alternatively you may use the Show Statistical Summary tool in the
Attributes Toolbar. You still have to select the relevant layer and field.
CONCLUSION
In this practical exercise, you used several basic spatial analysis techniques to prepare data for analysis
and conduct the analysis. You explored and extracted data, conducted a dissolve operation, used
attribute and spatial selections and created a buffer. You applied spatial analysis tools in a logical
sequence to identify schools or areas based on certain criteria. Finally, you created overlays to answer
spatial questions.
Note: While none of these individual operations are necessarily complex, the sequence in
which they are combined will influence your workflow. The goal is to work as economically as
possible to achieve a result without any unnecessary steps.
END