25.1.8. Modeler tools
Figyelem
These tools are only available in the Graphical Modeler. They are not available in the Processing Toolbox.
25.1.8.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.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Mező |
|
[string] |
Name of the condition |
Mező |
|
[expression] |
Kiértékelendő kifejezés |
Eredmények
None.
Python kód
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.2. Könyvtár létrehozás
Creates a new directory on a file system. Directories will be created recursively, creating all required parent directories in order to construct the full specified directory path. No errors will be raised if the directory already exists.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Directory path |
|
[string] |
Folder path to create |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Output |
|
[folder] |
Created folder |
Python kód
Algorithm ID: native:createdirectory
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.3. Feature filter
Filters features from the input layer and redirects
them to one or several outputs.
If you do not know about any attribute names that are common to all
possible input layers, filtering is only possible on the feature
geometry and general record mechanisms, such as $id
and uuid
.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Input réteg |
|
[vector: any] |
Az input réteg. |
Outputs and filters (one or more) |
|
[same as input] |
The output layers with filters (as many as there are filters). |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Output (one or more) |
|
[same as input] |
The output layers with filtered features (as many as there are filters). |
Python kód
Algorithm ID: native:filter
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.4. Szűrés geometria típussal
Filters features by their geometry type. Incoming features will be directed to different outputs based on whether they have a point, line or polygon geometry.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Input réteg |
|
[vector: any] |
Layer to evaluate |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Point features Optional |
|
[vector: point] |
Layer with points |
Vonalelemek Optional |
|
[vector: line] |
Layer with lines |
Polygon features Optional |
|
[vector: polygon] |
Layer with polygons |
Features with no geometry Optional |
|
[table] |
Geometry-less vector layer |
Python kód
Algorithm ID: native:filterbygeometry
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.5. Filter layers by type
Filters layers by their type. Incoming layers will be directed to different outputs based on whether they are a vector or raster layer.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Input réteg |
|
[layer] |
Generic Map Layer |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Vector features Optional |
|
[vector] |
A Vector Layer of the input, if compatible |
Raster layer Optional |
|
[raster] |
A Raster Layer of the input, if compatible |
Python kód
Algorithm ID: native:filterlayersbytype
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.6. Load layer into project
Loads a layer to the current project.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Réteg |
|
[layer] |
Layer to load in the legend |
Betöltött réteg neve |
|
[string] |
Betöltött réteg neve |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Réteg |
|
[same as input] |
The (renamed) loaded layer |
Python kód
Algorithm ID: native: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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.7. 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.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Üzenet |
|
[string] |
Message to display |
Feltétel Optional |
|
[expression] |
Expression to evaluate if true |
Eredmények
A message in the log panel.
Python kód
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.8. 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.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Üzenet |
|
[string] |
Message to display |
Feltétel Optional |
|
[expression] |
Expression to evaluate if true |
Eredmények
A message in the log panel.
Python kód
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.9. Rename layer
Renames a layer.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Réteg |
|
[layer] |
Layer to rename |
New name |
|
[string] |
The new name of the layer |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Réteg |
|
[same as input] |
The (renamed) output layer |
Python kód
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.10. Save log to file
Saves the model’s execution log to a file. Optionally, the log can be saved in a HTML formatted version.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Use HTML |
|
[Boolean] Default: False |
Use HTML formatting |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Fájl |
|
[string] |
Destination of the log |
Python kód
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.11. Set project variable
Sets an expression variable for the current project.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Variable name |
|
[string] |
Name of the variable |
Variable value |
|
[string] |
Value to be stored |
Eredmények
None.
Python kód
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.12. String concatenation
Concatenates two strings into a single one in the Processing Modeler.
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Input 1 |
|
[string] |
First string |
Input 2 |
|
[string] |
Second string |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Concatenation |
|
[string] |
The concatenated string |
Python kód
Algorithm ID: native: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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.
25.1.8.13. Variable distance buffer
Figyelem
This algorithm is deprecated and can be removed anytime. Prefer using Buffer algorithm instead.
Computes a buffer area for all the features in an input layer.
The size of the buffer for a given feature is defined by an attribute, so it allows different features to have different buffer sizes.
Lásd még
Paraméterek
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Input réteg |
|
[vector: any] |
Input vector layer |
Distance field |
|
[tablefield: numeric] |
Attribute for the distance radius of the buffer |
Segments |
|
[number] Default: 5 |
Controls the number of line segments to use to approximate a quarter circle when creating rounded offsets. |
Dissolve result |
|
[boolean] Default: False |
Choose to dissolve the final buffer, resulting in a single feature covering all input features. |
End cap style |
|
[enumeration] Default: Round |
Controls how line endings are handled in the buffer. |
Join style |
|
[enumeration] Default: Round |
Specifies whether round, miter or beveled joins should be used when offsetting corners in a line. |
Miter limit |
|
[number] Default: 2.0 |
Only applicable for mitered join styles, and controls the maximum distance from the offset curve to use when creating a mitered join. |
Eredmények
Címke |
Név |
Típus |
Leírás |
---|---|---|---|
Buffer |
|
[vector: polygon] |
Buffer polygon vector layer. |
Python kód
Algorithm ID: qgis:variabledistancebuffer
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 Using processing algorithms from the console for details on how to run processing algorithms from the Python console.