Skip to main content
15 votes
Accepted

Why is QGIS graphical modeler modal?

Good news is that it's been fixed for QGIS 3.0.
ndawson's user avatar
  • 27.9k
15 votes
Accepted

Listing multiple fields to be dropped at once in QGIS modeler?

You need to separate them via semi-colons: field1;field2;field3
ndawson's user avatar
  • 27.9k
14 votes

Modeling iterative processes in QGIS 3

You need to use the Vector Features input parameter if you want to iterate over all or selected features: Now when you run the model, you can choose whether to run the model once on all or selected ...
Joseph's user avatar
  • 76.3k
14 votes
Accepted

Merging multiple temporal inputs in QGIS Graphical Modeler

Change your input back to the 123 Button (="Value-Input"). If you then click on the three dots ... to the right of the input line, you can choose your layers. Here, all layers from your ...
MrXsquared's user avatar
  • 35.6k
13 votes
Accepted

Splitting vector layer based on attribute value in QGIS

A little dig in the processing algorithms and you can find Split vector layer geoalgorithm. It takes a vector layer and an attribute and generates a set of vector layers in an output folder. Each of ...
YoLecomte's user avatar
  • 3,340
12 votes
Accepted

Execute a field calculation on just selected records from Processing Toolbox in QGIS 3?

You can use is_selected() function in if statement to perform calculation on just selected features.
Kadir Şahbaz's user avatar
12 votes
Accepted

Graphical modeler calculator missing in QGIS3

You can use expression within a model. For instance, my distance is in kilometers. But I want to do my buffer with meters. Next to the distance field in the buffer algorithm, you can choose an ...
etrimaille's user avatar
  • 7,447
12 votes
Accepted

Defining the geometric predicate as a dropdown-input of a model

The geometric predicate input expects an index, starting from 0 as input as array or comma separated string. E.g. '1,3' or [1,3] for contains and touches. Since using numbers is not quite intuitive, I ...
MrXsquared's user avatar
  • 35.6k
11 votes
Accepted

Opening old QGIS model in current QGIS versions

Processing in QGIS 3 was refactored a lot and many algorithms were changed. So it is not possible to covert old models into new format. You need to recreate it. says Alexander Bruy, QGIS contributor, ...
Kadir Şahbaz's user avatar
11 votes
Accepted

Count number of features in a geopackage and write to a file

I had done something similar with python. The script loops recursive through the directories starting from the startdir and then opens each geopackage and reads the gpkg_contents table - containing ...
eurojam's user avatar
  • 11.9k
11 votes
Accepted

Refering to the input-layer of a QGIS model in field calculator expression

The trick to be able to refer to the layer-name of an input vector-layer inside an expression, using a model, is to rename the input layer. Add a Rename layer algorithm, for the layer use Model input ...
Babel's user avatar
  • 74.9k
11 votes
Accepted

Selecting features visible in map extent using QGIS

The trick is to create a function that access QGIS graphical interface, and that is piped to the query of the select by expression. Open a function editor (from anywhere, including from field ...
JGH's user avatar
  • 43.1k
10 votes
Accepted

Conditions in modeler field calculator

Create a new script from: Processing Toolbox > Scripts > Tools > Create new script Use something like the following: ##Example=name ##Layer=vector from qgis.core import QgsField from ...
Joseph's user avatar
  • 76.3k
10 votes

Selecting polygon with the largest area in QGIS

You would be better off using "Select by expression" instead of "Select by attribute". Your expression should be something like: "AREA" = maximum("AREA") ...
nash's user avatar
  • 1,986
10 votes
Accepted

Why "Export as Python script" button is unaccessible in QGIS 3.0/3.1 Modeler by default?

This was intentionally disabled by commit 4f2a464 [processing] remove obsolete code and disable exporting models as script until we update it so support new scripts format @alexbruy alexbruy ...
user2856's user avatar
  • 69.6k
10 votes
Accepted

Using variable in graphical modeler for raster calculation? (QGIS 3.8)

SAGA For the SAGA raster calculator, you can set the Formula option to read the value from your Number Input parameter: In the Formula option, set the drop-down menu to Pre-calculated Value. The ...
Joseph's user avatar
  • 76.3k
10 votes
Accepted

Processing tool to invert/switch selection in Graphical Modeler

Yes, you can use "select by expression" tool and insert if(is_selected() is false,true,false) as expression. This will allow inverting your selection in graphical modeler. Result:
MrXsquared's user avatar
  • 35.6k
10 votes

Adding a point to an existing layer

Create a new point using Geometry by expression, than Merge vector layers to merge this newly created point layer with the inital points layer. Here you can download the model for this workflow. For ...
Babel's user avatar
  • 74.9k
9 votes
Accepted

QGIS Modeler if/else condition, custom script for Modeler

As mentioned in my comment, a custom script may be the way to go in this situation. You can create one from: Processing Toolbox > Scripts > Tools > Create new script The following script ...
Joseph's user avatar
  • 76.3k
9 votes
Accepted

How to delete features selected by expression using graphical modeler in QGIS3

I believe it is not possible to delete features in the modeler, in this case use the extract by expression and put an expression that generates the opposite result of your current selection. This ...
Herbert Santos's user avatar
9 votes

Workflow automation for populating QGIS Attribute table

There are several options I may refer you to: "Field calculator" : qgis:fieldcalculator Opens the field calculator. You can use all the supported expressions and functions. A new layer is ...
Taras's user avatar
  • 34k
9 votes

Merging multiple temporal inputs in QGIS Graphical Modeler

I'm on QGIS 3.18.2, array() works for me. Consider this model: You are on the right track with expression, in my case it looks like following the hint "Expected input: an array of layer paths, ....
Jochen Schwarze's user avatar
9 votes

Joining dangling end in the vector layer using QGIS

You can use "Snap Vertices to Nearest Points by Condition" Processing tool from ProcessX PlugIn. It is made for this purpose. Before running it, just extract the vertices of your lines via &...
MrXsquared's user avatar
  • 35.6k
9 votes
Accepted

How to create a Virtual Layer using the QGIS Modeler?

You can use the tool Execute SQL. It is not a Virtual Layer per se, but hopefully it allows you to do what you need.
Matt's user avatar
  • 17.9k
9 votes
Accepted

Accessing layer properties for expression syntax in QGIS Modeler

You can use Raster layer properties: @Raster_layer_properties_PIXEL_HEIGHT > 15 The conditions are used as dependencies to the following tools: If the input raster has a pixel size above 15: ...
Bera's user avatar
  • 77.8k
8 votes

Using QGIS 2 processing model in QGIS 3

I fear there is no simple way to convert geoprocessing models from QGIS 2 to 3. Simply converting it from json to xml can be done with services like http://www.utilities-online.info/xmltojson/ but the ...
Jochen Schwarze's user avatar
8 votes
Accepted

Import csv with x y coordinates in QGIS 3 modeler

This workflow needs the csv-layer added into the layer panel before. QGIS 2.18 Workflow from Inputs you add a Table (Picture Nr 1. - 2.) add "Points layer from table" (Nr. 4) 2a. define x and y ...
Dirk's user avatar
  • 836
8 votes
Accepted

Writing comments in QGIS Graphical Modeler

You can use the help text editor (button next to green "play" button) to edit informational metadata with your model:
Spacedman's user avatar
  • 66.5k
8 votes
Accepted

QGIS 3 Graphical Modeler field calculator with attribute's parameters

Use the normal Field Calculator and in the Formula option, select Pre-calculated Value. Then use the expression: '(' || @a || ' + ' || @b || ') / 2' where the parameters @a and @b are the fields you ...
Joseph's user avatar
  • 76.3k
8 votes

Converting Model in Plug-in in QGIS

To create a plugin from a model, use the "Plugin Builder" plugin. By following THIS tutorial, you can build a basic structure. On the third screen for plug-in creation, define the template as Process ...
Herbert Santos's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible