Unit 08 - Modeler¶
The Graphical Modeler allows creating, editing, and managing complex models in an easy-to-use graphical user interface. Using the Graphical Modeler, a chain of tools (ie. GRASS modules) can be wrapped into one process (a model). A model can be executed repeatedly with slightly different inputs or parameters.
Our first model will be based on Unit 05 - Raster processing. Actually the model will perform two operations:
Graphical Modeler can be launched from menu Graphical Modeler from the main toolbar (or alternatively as g.gui.gmodeler module from console).
or byGRASS tools can be added to the model from menu Add GRASS tool (module) to model from the main toolbar.
or byImportant
Graphical Modeler sometimes has a problem with rendering the model. In this case it helps to redraw model canvas by Redraw model canvas.
After adding r.mask module to the model let’s open its properties dialog by double-click and enter vector map to be used as a mask. Don’t forget to enable inverse mask by -i flag in Create tab.
In similar way will be added to model the i.vi tool. Properties dialog for this command is open automatically because there are required options which must be set.
It’s a good idea to set metadata for the model and enable overwriting data produced by model (
). Resultant NDVI raster map may be also shown automatically in the map window.Now let’s run our model by Run model. Progress is printed into Command output.
Task
Run the model repeatedly using different computation regions.
Tip
Current computation region can be changed easily by Set computation region extent interactively from Various zoom options in Map Display.
Important
Before changing the region it’s a good idea to remove mask if exists.
r.mask -r
Sample model to download: ndvi-v1.gxm