Introduction to the QGIS Processing Toolbox

“In this lesson will look at the QGIS Processing Toolbox which provides a collection of spatial analysis tools”

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 to understand the concept.

You try:

Goal: To practice and understand the process of using processing algorithms

We are going to extract vertices from a polygon layer, create a randomised subset of those vertices and then generate a minimum convex hull of the subset.

  • Add the provided polygon.geojson to an empty QGIS project
  • Open the toolbox from the QGIS Processing menu
  • Carry out the analysis as per the specification table below
  • For the minimum convex algorithm step, we are leaving it up to you to choose appropriate options

Remember that where you see 'algorithm' you will need to locate the relevant tool (algorithm in QGIS terminology) either by using the toolbox search function or by browsing around in the toolbox algorithm list.

Name Expectation

Algorithm

Extract nodes

Input layer

polygon

Output layer

[Create temporary layer]

Algorithm

Random extract

Method

Number of selected features

Number / percentage of selected features

10

Algorithm

Minimum convex hull

More about

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. What does the processing toolbox in QGIS do?:
    1. It is a general purpose set of tools for performing spatial analysis.
    2. It is used only with vector data when you need to process it from one file format to another.
  2. Is it possible to connect multiple processing algorithms in a processing chain?:
    1. yes
    2. no

Further reading:

Click here to download the sample data for the lesson.