Selecting features in QGIS is an important task you should know. Imagine if you have a layer with huge data inside it and you want to select some features that match with specific criteria. It is almost impossible to do it manually. You will need a smart way to do the selection. And the answer is using the expression. In other GIS software, it sometimes refers to SQL select. So theoretically, we use the SQL syntax or expression to select the features.
In the following example, I have a contour layer that contains thousands of line features that construct the contour. It has an “Alti” column which contains altitude information. For example, I want to select the contour lines which have an altitude of more than 300 meters.
Here is the original table with the attribute table
To select features using an expression, follow these steps
- From the attribute toolbar, click Select Features by Expression
- On the Select by Expression window, type or double click the column we want to use. In this case, I use “Alti” column.
- Type your criteria. In this example, I want to filter or select contour which has more than 300 meters.
Click OK and then you should see the selected features that match your criteria.
You can play with it and modify the query or expression with your own criteria. Have a try.
Klaudia
May 3, 2020I’m trying to select points for a polygon and a point is always not selected how do I solve that