13

I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I have to manually sift through a large number of features. Is there a quicker way to do this?

I am using both shapefiles and postGIS best, dietmar

11

In QGIS you should be able to filter your data with an SQL expression in the Query Builder dialog. Just right click your layer in the table of contents and select "Query" ("Filter..." in the more recent versions).

1
  • 7
    In recent versions the dialog option "Query" has been renamed to "Filter..." – the_skua Nov 29 '16 at 17:02
0

Tested on QGIS 3.10.2-A Coruna

How to apply a filter
* Right-click on the layer listed in panel Layers
* Choose Filter...
* The window Query Builder is displayed

How to build a query in Query Builder
* Double click on a field in Fields list
* Select All in Values
* Choose a operator from Operators
* Double click on a value in Values list
* Your expression is shown at the bottom of the window
* Click Test to have a preview of how many rows are returned
* Click OK to apply the filter
* The layer is displayed according to the filter applied (you see a filter icon aside the layer name in panel Layers)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.