24.1.6. Modeler tools
These tools are only available in the Graphical Modeler. They are not available in the Processing Toolbox.
24.1.6.1. Conditional branch
Adds a conditional branch into a model, allowing parts of the model to be executed based on the result of an expression evaluation. Mostly by using tool dependencies to control the flow of a model.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Field |
|
[string] |
Name of the condition |
Field |
|
[expression] |
Expression to evaluate |
Çıkışlar
None.
Python code
Algorithm ID: native:condition
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.2. Load layer into project
Loads a layer to the current project.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Layer |
|
[layer] |
Layer to load in the legend |
Loaded layer name |
|
[string] |
Name of the loaded layer |
Çıkışlar
Label |
Name |
Type |
Tanım |
---|---|---|---|
Layer |
|
[same as input] |
The (renamed) loaded layer |
Python code
Algorithm ID: qgis:loadlayer
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.3. Raise exception
Raises an exception and cancels a model’s execution. The exception message can be customized, and optionally an expression based condition can be specified. If an expression condition is used, then the exception will only be raised if the expression result is true. A false result indicates that no exception will be raised, and the model execution can continue uninterrupted.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Message |
|
[string] |
Message to display |
Condition |
|
[expression] |
Expression to evaluate if true |
Çıkışlar
None.
Python code
Algorithm ID: native:raiseexception
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.4. Raise warning
Raises a warning message in the log. The warning message can be customized, and optionally an expression based condition can be specified. If an expression condition is used, then the warning will only be logged if the expression result is true. A false result indicates that no warning will be logged.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Message |
|
[string] |
Message to display |
Condition |
|
[expression] |
Expression to evaluate if true |
Çıkışlar
None.
Python code
Algorithm ID: native:raisewarning
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.5. Rename layer
Renames a layer.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Layer |
|
[layer] |
Layer to rename |
New name |
|
[string] |
The new name of the layer |
Çıkışlar
Label |
Name |
Type |
Tanım |
---|---|---|---|
Layer |
|
[same as input] |
The (renamed) output layer |
Python code
Algorithm ID: native:renamelayer
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.6. Save log to file
Saves the model’s execution log to a file. Optionally, the log can be saved in a HTML formatted version.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Use HTML |
|
[Boolean] Default: False |
Use HTML formatting |
Çıkışlar
Label |
Name |
Type |
Tanım |
---|---|---|---|
File |
|
[string] |
Destination of the log |
Python code
Algorithm ID: native:savelog
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.7. Set project variable
Sets an expression variable for the current project.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Variable name |
|
[string] |
Name of the variable |
Variable value |
|
[string] |
Value to be stored |
Çıkışlar
None.
Python code
Algorithm ID: native:setprojectvariable
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.
24.1.6.8. String concatenation
Concatenates two strings into a single one in the Processing Modeler.
Parametreler
Label |
Name |
Type |
Tanım |
---|---|---|---|
Input 1 |
|
[string] |
First string |
Input 2 |
|
[string] |
Second string |
Çıkışlar
Label |
Name |
Type |
Tanım |
---|---|---|---|
Concatenation |
|
[string] |
The concatenated string |
Python code
Algorithm ID: qgis:stringconcatenation
import processing
processing.run("algorithm_id", {parameter_dictionary})
The algorithm id is displayed when you hover over the algorithm in the Processing Toolbox. The parameter dictionary provides the parameter NAMEs and values. See Konsoldan işleme algoritmalarını kullanma for details on how to run processing algorithms from the Python console.