Graphical Modeller in Context

“GIS workflows typically consist of running multiple steps before reaching a solution. This is cumbersome in situations where you have to do it over again. The graphical modeller is useful for defining”

In this module, we will build upon the concepts we covered in module qgis_intersect from section 10.

You try:

Goal: To update points (cities and towns) that lie within the each aggregate municipality layer with a column that depicts the location of the town relative to the municipality.

  • Open the project geoprocessing from the sample data.
  • Activate processing toolbox
  • Activate the graphical modeller.
  • Drag the Vector Layer input and populate the dialogue.
  • Select the algorithm that filter layers based on an expression.
  • Populate the Select by Expression dialogue. Use the given sample expression.
  • Select the dissolve algorithm and save the models in their default location.
  • Run the model and view the results in QGIS.
  • Proceed to filter, dissolve for all provinces and create a union that shows provincial boundaries.

Name Expectation

Layers

cities_and_towns /municipalities

Expression

"province" = 'WC'

More about

Models are very powerful as they allow GIS task to be easily automated. The model builder is a visual tool that allows users to build geoprocessing workflows. The model is represented as a diagram that links together inputs and algorithms to produce a single/multi outputs.

The advantages of using the model builder are:
It is intuitive.

  • Vector features or raster cells are alterable using the model.
  • The processing steps are visual and each individual step can be run separately to test a process before combining them into a bigger complex workflow.
  • The model can be converted into a python script.
  • The model can be used as an algorithm in another model.
  • Models can be run multiple times using different parameters.
  • Models can be made generic by using parameter when defining workflows i.e. a buffer model that accepts input from either point, line or polygon data.

Check your knowledge:

  1. Which of the following statements is true:

    1. You can run algorithms from external programs in the modeller
    2. Rasters cannot be used in the modeller
  2. What is the effect of hard coding values in the model. I.e. defining the buffer distance within the model:

    1. It speeds up the speed of the model.
    2. Model can only be used for that specific task.
    3. Models cannot be exported as python scripts
  3. Can model be used as an algorithm within another model:

    1. True
    2. False