More about Selections
This tutorial covers filtering existing selections and finding selection tools in the Processing Toolbox.
Included in this tutorial:
Selecting within a Selection
Selection through Geoprocessing tools.
Software version in examples: QGIS-LTR 3.40.5-Bratislava
Tutorial Data: The tutorial includes demonstration with sample data available here.
Credits: Sally Kaye and L. Meisterlin (2025)
Related Tutorials: The software skills in this tutorial build upon the tools and options described in the Querying by Attribute and Querying based on Spatial Relationships tutorials.
Selecting within a Selection
Querying an already selected subset of features is commonly referred to as “selecting within a selection” and one way of refining query results in QGIS.
The Select Features by Value, Select Features by Expression, Select Within Distance, and Select by Location dialogues have selection method options. In the Select Within Distance and Select by Location dialogues, the relevant option is called “selecting within current selection.”
Below, we demonstrate selecting within a selection from Select Features by Value.
NOTE: These are selections made in the Querying based on Spatial Relationships tutorial. Here we already have the 98 features in the “Points1_Table1_Join” layer within 500 feet of a subway entrance.
Now we narrow down the selected features based on their attribute values to isolate those with a value of B in the “type_ab” field.
With the previous steps completed, we access the Select Features by Value dialogue box from the icon in the Selections Toolbar. Next to the “type_ab” field, we type “B” in the text box and select “Equal To (=)” from the dropdown menu. Then, we open the dropdown menu next to Select Features at the bottom of the dialogue box and select Filter Current Selection.
The result only includes the 50 features (from the 98 within 500 feet of a subway entrance) with a value of ‘B’ in the “type_ab” field.
selecting within a selection
Selection through Processing Tools
The selection operations are also available as tools within the Processing Toolbox. These are useful when automating steps using QGIS’s Model Designer.
Select by Attribute, Select by Expression, Select by Location, and Select within Distance tools
The Select by Location and Select within Distance tools are the toolbox equivalents of their respective operations through the interface. The Select by Attribute and Select by Expression tools are toolbox equivalents of Select Features by Value and Select Features by Expression in the interface, respectively.
These tools can be found in the Processing Toolbox, under Vector Selection.
Selection tools in the Processing Toolbox are equivalent to respective functions in the interface.
Extract tools
Unlike other methods which create temporary selections from attribute queries, Extract tools extract selected features into a new output feature class in a single step. These tools use the same sets of parameters as their equivalent Select tools.
There are Extract equivalents for the four select tools highlighted above. These tools can also be found in the Processing Toolbox, under Vector Selection. By default, these tools generate a temporary layer and open (or add) it in the current project. You can also choose to create a new dataset file by clicking the three-dot button to the right and specifying a name and location for saving the new file.
finding and viewing options for Extract tools