Buffering & Overlay Analysis in QGIS
Turn-in for grading: This lab includes material that must be turned in for grading. Complete the required deliverables and submit them as instructed by the course.
Overview
This lab introduces two foundational vector-analysis workflows in QGIS:
- buffering, which creates zones around features based on distance
- overlay analysis, which combines multiple spatial criteria into a new analytical result
You will use both techniques to build a simple suitability analysis. The scenario is that we want to identify potential recreation or campground areas that are:
- close to roads
- close to lakes
- outside the lakes themselves
In the second part of the workflow, you will combine the road and lake criteria to identify candidate polygons that satisfy both conditions.
Concept note: Buffering is one of the most common GIS operations because many spatial questions are really proximity questions. Overlay analysis matters because real site-selection problems usually depend on more than one criterion at the same time.
Getting Ready
You will need the workshop dataset:
Download and unpack the data
- Download L10.zip.
- Unzip it somewhere stable on your computer.
- Create a project folder for this lab.
- Save a new QGIS project in that folder as
buffering_overlay_analysis.qgz.
Data for This Exercise
The original lab uses three main layers:
roads.shplakes.shppublic_Hugo.shp
This workflow focuses primarily on the roads and lakes layers. The public-lands layer may be used later if you extend the suitability analysis further.
Suitability Criteria
The suitability logic in this lab is:
- areas must be within
300 metersof a road - areas must also be close to lakes, but the lake buffer distance depends on lake size
- candidate sites should be on land, not inside the lake polygons
Use these lake-buffer distances:
50 metersfor lakes in size class1150 metersfor lakes in size class2500 metersfor lakes in size class3
Part 1: Create a Fixed-Distance Buffer Around Roads
Start with a standard fixed-distance buffer.
- Add
roads.shpto your QGIS project. - Open the Processing Toolbox.
- Search for Buffer and open Vector geometry > Buffer.
- Set:
- Input layer:
roads - Distance:
300
- Input layer:
- Check Dissolve result.
- Save the output to your project folder with a name such as
roadsBuffer300m.gpkg. - Run the tool.
You should now have a dissolved road buffer that represents all land within 300 meters of a road.
Concept note: A dissolved buffer merges overlapping buffer polygons into one generalized zone. That is useful when the analytical question is simply "inside or outside the road buffer," rather than "which individual road segment created this buffer."
Compare dissolved and undissolved results
Now repeat the buffer once more, but compare the geometry and table structure.
- Open the Buffer tool again.
- Use
roadsas the input layer. - Keep the distance at
300. - This time, leave Dissolve result unchecked.
- Leave the output as a temporary layer or save it as a clearly named test layer.
- Run the tool.
- Open the attribute table for both buffer outputs and compare them.
As you compare them, ask:
- How does the geometry differ?
- How does the number of rows differ?
- In what kinds of analysis would dissolved versus undissolved results matter?
After you inspect the difference, you can remove the undissolved test layer.
Workflow note: Temporary layers are useful for experiments and intermediate results, but they are not a safe place to keep anything you need long-term. Save permanent outputs when the result will matter later in the workflow.
Part 2: Create a Variable-Distance Buffer Around Lakes
Now build a buffer whose distance depends on each lake's size class.
Create the buffer-distance field
- Use Select features by expression to select lakes where:
"SIZE_CLS" = 1
- Open the Field Calculator.
- Create a new integer field named
buffdist. - Check Only update selected features.
- Assign the value:
50
- Apply the calculation.
Now repeat the same logic for the other size classes:
- select
"SIZE_CLS" = 2and assign150tobuffdist select
"SIZE_CLS" = 3and assign500tobuffdistClear the selection.
- Save your edits.
Concept note: This is a common GIS pattern: use attribute values to drive geometry creation. Instead of one universal buffer distance, the lake size class determines how much surrounding area counts as "near" that lake.
Run the variable-distance buffer
- Open the Buffer tool again.
- Use
lakesas the input layer. - For the Distance parameter, use the data-defined option and choose the
buffdistfield. - Check Dissolve result.
- Save the output as something like
VarBuffLakes.gpkg. - Run the tool.
Arrange the road, road-buffer, lake, and lake-buffer layers so you can see how the two proximity criteria differ spatially.
Placeholder image: QGIS map canvas with roads and lakes on top of their dissolved road and variable-distance lake buffer polygons.
Deliverable 1
Create and export a map layout showing:
Include:
Part 3: Prepare the Buffer Layers for Overlay
The dissolved buffer outputs are useful analytically, but before overlay we need to prepare them so the result is easier to interpret.
Convert multipart buffers to singlepart features
- Open the attribute table for
VarBuffLakes. - Notice that the dissolved buffer may contain many polygons but very few rows.
- Open Multipart to singleparts from the Processing Toolbox.
- Use
VarBuffLakesas the input. - Save the output as
SingleLakeBuffers.gpkg. - Run the tool.
Open the new attribute table and confirm that the multipart geometry has been separated into individual polygons.
Repeat the same process for the dissolved road buffer:
- Run Multipart to singleparts on the road-buffer layer.
- Save the result as something like
SingleRoadBuffers.gpkg.
Concept note: Multipart features can be awkward for overlay analysis because one table row may represent several disconnected polygons. Converting to singlepart features makes later selection and interpretation much clearer.
Clean the buffer tables and create inside-buffer flags
For each of the new singlepart buffer layers:
- Open the attribute table.
- Toggle editing on.
- Delete the existing fields if they are not helpful for the overlay result.
- Use the Field Calculator to create a simple indicator field:
inlakebuffforSingleLakeBuffersinroadbuffforSingleRoadBuffers
- Assign a value of:
1
- Save edits and stop editing.
Concept note: These fields act like logical flags. After the overlay, they let you identify which polygons are inside the lake buffer, the road buffer, or both.
Part 4: Remove the Lake Interior from the Lake Buffer
The lake buffer currently includes the lake polygons themselves, but a campsite or recreation site should be on land near the lake, not in the water.
- Open the Difference tool from the Processing Toolbox.
- Set:
- Save the output as
LakeBuffersOnly.gpkg. - Run the tool.
Verify that the result shows the buffered land near lakes, with the lake interiors removed.
Concept note: In many overlay workflows, a criterion needs to be interpreted carefully. "Near a lake" is not the same as "inside the lake polygon." Difference helps turn that conceptual distinction into the geometry you actually want.
Part 5: Use Union to Combine the Lake and Road Criteria
Now combine the land-near-lakes layer with the road-buffer layer.
- Open the Union tool in the Processing Toolbox.
- Set:
- Save the output as
BufferUnion.gpkg. - Run the tool.
Open the attribute table for BufferUnion and inspect the inlakebuff and inroadbuff fields.
You are looking for polygons where:
inlakebuff = 1inroadbuff = 1
Those are the polygons that satisfy both proximity criteria.
Part 6: Select and Export the Candidate Areas
"inlakebuff" = 1 AND "inroadbuff" = 1
- Apply the selection.
- Inspect the selected polygons on the map.
- Right-click
BufferUnionand choose Export > Save Selected Features As... - Save the output as
Candidates.gpkg.
This new candidate layer represents places that are both:
Concept note: This is the core logic of suitability analysis. Instead of asking whether one condition is true, you are asking where several spatial conditions are true at the same time.
Placeholder image: QGIS map showing the final selected candidate polygons that meet both lake and road proximity criteria.
Deliverable 2
Create and export a second map layout showing the candidate recreation areas.
Include:
- the final candidate polygons
- enough context layers to interpret the result
- a clear title
- your name
- a scale bar
- a legend
What You Should Understand After This Lab
By the end of this exercise, you should be able to explain:
- the difference between fixed-distance and variable-distance buffers
- why dissolved and undissolved buffers produce different analytical structures
- why multipart-to-singlepart conversion can matter before overlay analysis
- why
Differencewas needed before combining the lake and road criteria - how
Unionplus attribute selection produces a simple suitability analysis result