Delete geometry using QGIS graphical modeler

QGIS Graphic Modeler

There is no algorithm to remove a geometry on the QGIS graphical modeler filtering by a parameter. To delete a geometry from QGIS graphical modeler, apply 2 algorithms:

  1. Select by Expression
  2. Save Selected Features

For example, let's assume that you want to delete a geometry with "City" = 'Barcelona' on the attribute table. As you can't delete the element directly, you'll need to use the opposite expression.

In this example, you'll need to select the elements where "City" != 'Barcelona'.

Select By Expression

Save the selected features.

Save selected features

After executing the algorithm, the city of Barcelona won't be in the output layer.

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.