Chapter 9. Automating Workflows with the Graphical Modeler

This chapter will provide you with an overview of the graphical modeler (GM). First, we will introduce the modeler and explore the various inputs and algorithms available for models. Then, we will demonstrate via step-by-step examples how to develop a model that can be added to the Processing Toolbox. We will also cover more advanced topics, including nesting models and executing models iteratively. The specific topics that we will cover in this chapter are as follows:

  • An introduction to the graphical modeler
  • Opening the graphical modeler
  • Configuring the modeler and naming a model
  • Adding inputs
  • Adding algorithms
  • Running a model
  • Editing a model
  • Documenting a model
  • Saving, loading, and exporting models
  • Executing model algorithms iteratively
  • Nesting models
  • Using batch processing with models
  • Converting a model into a Python script

An introduction to the graphical modeler

A typical spatial analysis involves a series of GIS operations, with the output of one operation as the input for the next one, until the final result is generated. Using the graphical modeler, you can combine these individual steps into a single process. The interface to the GM allows you to visually draw inputs, GIS algorithms, and outputs. The entire analysis is then ready to run as a custom tool within the Processing Toolbox. The custom tool will look like other tools in the Processing Toolbox. After assigning the inputs and naming the outputs, the entire analysis will run in a single step.

A major benefit of this approach is that the completed analytical workflow can be modified and rerun. This allows stakeholders to understand how changing thresholds or input values affect the results of an analysis. Let's assume that you were assigned the task of developing a site-selection model for a new coffee shop. To match one of the site-selection criteria, you buffered railroads by one kilometer. However, a stakeholder later asks you how the result would change if the one-kilometer distance was changed to half a kilometer. If you had completed the original analysis with a traditional step-by-step approach, without using a model, you would have to start from scratch to answer this question. However, if you developed this problem as a model, you can simply change the distance parameter in the tool and rerun the entire site-selection model. Similarly, the site-selection model can also be run in a different city or neighborhood simply by pointing to different (but equivalent) input layers. The model can also be shared with others.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.41.187