Feature request #19143

Processing algorithm for filtering attribute ranges

Added by Magnus Nilsson over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Processing/Modeller
Pull Request or Patch supplied:No Resolution:invalid
Easy fix?:No Copied to github as #:26973

Description

I noticed that there is a new algorithm, the Feature filter, in QGIS 3.2.0. I would like to see a similar algorithm in the modeller for filtering features for ranges for an attribute, such as attribute value = 0-20, 20-40, 40-60 and so on. That way, I could easily filter the features based on their properties without specifying every single value.

History

#1 Updated by Matthias Kuhn over 2 years ago

  • Status changed from Open to Feedback

That's possible with the feature filter algorithm:

`"attr" > 0 AND "attr" <= 20`

Do you need something more than this?

#2 Updated by Magnus Nilsson over 2 years ago

I would like to filter the features into different groups, so I would need to use something like:

"attr" > 0 AND "attr" <= 20
"attr" > 20 AND "attr" <= 40
"attr" > 40 AND "attr" <= 60

I thought that "Feature Filter" would let me filter features into different groups for further processing, but I can´t get that to work. I only see one output.

#3 Updated by Matthias Kuhn over 2 years ago

See the following blog post for an exaplanation how to create multiple outputs:

http://www.opengis.ch/2018/05/28/how-to-filter-features-in-qgis-using-the-graphical-processing-modeler/

If that is not working for this use case, please provide more details so we can see what's wrong (a model, screenshots, ...).

#4 Updated by Magnus Nilsson over 2 years ago

Yes, that helped. I guess I´m still not used to how Processing models work. I did of course have to catch the output in the following algorithm.

#5 Updated by Nyall Dawson over 2 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Also available in: Atom PDF