Wichtig
Übersetzen ist eine Gemeinschaftsleistung Sie können mitmachen. Diese Seite ist aktuell zu 46.38% übersetzt.
28.1.9. Modellierungswerkzeuge
Warnung
Diese Werkzeuge sind nur in der Grafischen Modellierung verfügbar. Sie sind nicht in der Verarbeitungs-Toolbox verfügbar.
28.1.9.1. Calculate expression
NEW in 3.34
It calculates the result of a QGIS expression and eliminates the need to use the same expression multiple times throughout a model when the same result is required more than once. Additionally, it enables use cases that would otherwise not be possible. For instance, you can generate a timestamp value once and use it multiple times within the model, if the timestamp were recalculated every time, the values would vary during the model’s runtime.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Input |
|
[expression] |
Expression to calculate |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Value |
|
[Result Value] |
Calculated result value, the data type of the output will vary based on the specific expression used in the algorithm. |
Pythoncode
Algorithm ID: native:calculateexpression
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.2. Bedingte Verzweigung
Fügt einem Modell eine bedingte Verzweigung hinzu, so dass Teile des Modells auf der Grundlage des Ergebnisses eines Ausdrucks ausgeführt werden können. Meistens durch die Verwendung von Werkzeugabhängigkeiten, um den Ablauf des Modells zu steuern.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Field |
|
[string] |
Name of the condition |
Field |
|
[expression] |
Expression to evaluate |
Ausgaben
None.
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.3. Create directory
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.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Directory path |
|
[string] |
Folder path to create |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Ergebnis |
|
[folder] |
Created folder |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.4. 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
.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Input layer |
|
[vector: any] |
The input layer. |
Outputs and filters (one or more) |
|
[same as input] |
The output layers with filters (as many as there are filters). |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Ergebnis (one or more) |
|
[same as input] |
The output layers with filtered features (as many as there are filters). |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.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.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Input layer |
|
[layer] |
Generic Map Layer |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Vector features Optional |
|
[vector] |
A Vector Layer of the input, if compatible |
Raster layer Optional |
|
[raster] |
A Raster Layer of the input, if compatible |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.6. Load layer into project
Loads a layer to the current project.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Layer |
|
[layer] |
Layer to load in the legend |
Loaded layer name |
|
[string] |
Name of the loaded layer |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Layer |
|
[same as input] |
The (renamed) loaded layer |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.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.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Message |
|
[string] |
Message to display |
Condition Optional |
|
[expression] |
Expression to evaluate if true |
Ausgaben
A message in the log panel.
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.8. Raise message
Raises an information message in the log. The message can be customized, and optionally an expression based condition can be specified. If an expression condition is used, then the message will only be logged if the expression result is true. A false result indicates that no message will be logged.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Information message |
|
[string] |
Message to display |
Condition Optional |
|
[expression] |
Expression to evaluate if true |
Ausgaben
A message in the log panel.
Pythoncode
Algorithm ID: native:raisemessage
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.9. 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.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Message |
|
[string] |
Message to display |
Condition Optional |
|
[expression] |
Expression to evaluate if true |
Ausgaben
A message in the log panel.
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.10. Rename layer
Renames a layer.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Layer |
|
[layer] |
Layer to rename |
New name |
|
[string] |
The new name of the layer |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Layer |
|
[same as input] |
The (renamed) output layer |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.11. Save log to file
Saves the model’s execution log to a file. Optionally, the log can be saved in a HTML formatted version.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Use HTML |
|
[Boolean] Default: False |
Use HTML formatting |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
File |
|
[string] |
Destination of the log |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.12. Set project variable
Sets an expression variable for the current project.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Variable name |
|
[string] |
Name of the variable |
Variable value |
|
[string] |
Value to be stored |
Ausgaben
None.
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.13. String concatenation
Concatenates two strings into a single one in the Processing Modeler.
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Input 1 |
|
[string] |
First string |
Input 2 |
|
[string] |
Second string |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Concatenation |
|
[string] |
The concatenated string |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.
28.1.9.14. Variable distance buffer
Warnung
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.
Siehe auch
Parameter
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Input layer |
|
[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. |
Ausgaben
Bezeichnung |
Name |
Typ |
Beschreibung |
---|---|---|---|
Buffer |
|
[vector: polygon] |
Buffer polygon vector layer. |
Pythoncode
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 Verarbeitung Algorithmen von der Konsole aus verwenden for details on how to run processing algorithms from the Python console.