Buffer analysis using processing toolbox

“QGIS Processing Toolbox provides a collection of spatial analysis tools. These tools are grouped into * native* QGIS tools and third part software ie GRASS GIS”

The processing framework in QGIS provides a general analysis toolbox. The tools provided include native QGIS analysis routines and 'wrappers' for analytical functions provided by third-party software such as GRASS, SAGA and Orpheo Toolbox. More providers can be used via a plugin architecture.

Each tool (in QGIS terminology these are called algorithms) in the toolbox is intended to carry out a specific task. When you use a tool it will define the required inputs - for example, one or more raster or vector layers, and generally, create a new output dataset containing the result of the analysis. These tools can also be 'chained' together in a workflow which we will cover in a separate lesson. In this lesson, we will try out the basic usage of the processing toolbox

You try:

Goal: To solve a spatial problem using processing algorithms

You are a city official and you have been instructed to investigate the effect of expanding OR Tambo International Airport by identifying facilities within 50km of the airport.

  • Load the layers from the exercise data.
  • Activate the processing toolbox. In order to use an algorithm, you can navigate to the relevant selection or search for it.
  • Using the Airports select OR Tambo International Airport. Check on the map the chosen airport should be in highlighted in yellow or any other color depending on your settings.
  • Create a buffer using the Airports layer. Use the buffer options.
  • Using the buffer generated from above perform an intersection against the Urban Areas.
  • Symbolize the final output layer.
  • Using the knowledge you have gained so far, label the output to indicate the area in meters or hectares. Use the label options defined below

Name Expectation

Buffer Options

Buffer distance

50 km

Dissolve

Yes

Label Options

Font Size

14

Buffer

Yes and Buffer fill #d4dae3

Label Text

round(($area),2)

More about processing toolbox

Here are a few key things to remember when using processing algorithms:

Help system: Almost all of the processing algorithms have useful help in the help panel to the right of the algorithm dialogue. Be sure to review this help when trying to understand what the algorithm does.

Logs: Sometimes an algorithm may not run correctly. This may be because of a bug in the algorithm itself, or a problem with your input data. If you have a problem, reviewing the logs can provide helpful information for you to correct the issue or report a bug if needed.

Per-feature repeats: Sometimes it is useful to treat each input feature as a separate analysis task. Pressing the green 'iterate over this layer' button will do this. For example, if you run the fixed distance buffer algorithm on your random points subset with the 'iterate over this layer' option enabled, you will see that a new layer is generated for each of the original input features.

Output destinations: QGIS will automatically create a new temporary layer for the output produced by an algorithm. You can optionally specify your own output layer path for the analysis results if you wish.

Advanced users may want to look at the numerous options for processing in the processing menu (QGIS 2.x) or in the settings menu (QGIS 3.x). In some cases using processing algorithms may require that you install third-party software. For example, the Orpheo Toolbox algorithms will only work if you have actually installed Orpheo Toolbox separately.

Check your knowledge:

  1. Is it possible to specify the buffer distance in km using the buffer algorithm:

    1. No
    2. Yes
  2. We labelled the final output using the $length. Do you think we could have used an algorithm to calculate the area.:

    1. Yes
    2. No

Download the sample data for the lesson.