I have a problem with the QGIS modeler:
The idea is to extract attributes ("DN" between 40 and 44) out of one layer.
I want to use the outcoming layer for further algorithms.
I calculated with the field calculator a new field named "selection2" using the following formula:
"DN" >= 40 AND "DN" <= 44
Then I extracted by attribute for selection2=1.
The attribute table is empty, as in the original layer exists no DN between 40 and 44.
The problem is that the fied calculator is not able to use empty attribute tables for further algorithms (here: "extract by location"). Therefore this error is displayed:
Error executing algorithm Extract by location float division by zero See log for more details
It would be good to avoid the error and have a layer algorithms can work with.
Is there a algorithm in the modeler which functions like an if/else-function?
If there is none I have the following approach: Fill in the attribute table any value, e.g. 9999, in order to not have an empty one. The question is then how to create this command?
As I do not have any experience with python, I cannot use it.







