Select by Attributes
Overview
The Select by Attributes tool filters features by attribute conditions and outputs matching features as a new feature dataset. Conditional expressions support common SQL operators and pandas query syntax.
Use Cases
- Data filtering: Select features that meet a specific threshold or category condition, such as
population > 1000000. - Data cleaning: Quickly locate features with null values, outliers, or specific codes.
- Thematic map preparation: Export features with a specific attribute as an independent layer for symbolization.
Parameters
| Parameter | Description | Notes |
|---|---|---|
| Input features | The feature dataset to filter by attributes. | Supports point, line, polygon, and other feature types. |
| Query condition | The logical expression used for filtering. | Supports common SQL logical operators. |
| Output feature dataset | The output filtering result. | Supports common vector formats. |
Steps
- Start the tool: Open the Geoprocessing Toolbox > go to Vector Tools > Feature Processing > Select > start the Select by Attributes tool pane.
- Set the input: Select Input features.
- Configure parameters: Build a logical expression in Query condition.
- Configure the output: Set the output path and file name.
- Run and generate: Click Run and review the result.
Notes
- For string matching, single quotation marks are recommended, for example
Type == 'Residential'. - Because of precision issues in floating-point comparison, range conditions are recommended, such as
area > 9.9 and area < 10.1. - Make sure field names are spelled exactly as they appear in the expression.