Selecting and filtering features lets you work with a subset of your data — finding specific records, reviewing them, and exporting them for further use. These are among the most frequently used GIS operations.
Features and Selections
A feature is a single geographic object in a layer — one park, one road segment, one library. When you select features, they are highlighted on the map and in the attribute table. A selection is a temporary state: it does not change the data, and it is cleared when you deselect or close the project.
Attribute Selection
Attribute selection finds features based on the values in their attribute fields. You write an expression that describes the condition you want to match. For example:
- Find all parks where
park_type = 'natural area' - Find all libraries where
year_opened >= 2000 - Find all community centres where
capacity > 100
Expression syntax varies by software. The concept — matching field values against conditions — is universal.
Spatial Selection
Spatial selection finds features based on their geographic relationship to other features. Common spatial relationships include:
- Intersects — features that overlap or touch another layer.
- Within — features entirely inside a polygon.
- Within a distance — features within a specified distance of another feature.
Example: select all transit stops within 500 metres of a community centre.
Selections vs. Filters
A selection highlights matching features while keeping all features visible in the layer. A filter (sometimes called a query or definition query) hides non-matching features from the map and attribute table entirely. Both are temporary and do not modify the source data. Filters are useful when you want to work with a subset without the distraction of other features.
Checking Your Results
After running a selection or filter, always check:
- How many features were selected? Does the count match your expectation?
- Do the selected features appear in the right locations on the map?
- Open the attribute table and review the selected records.
- Are there unexpected results — features that should not be included, or features that are missing?
Exporting Selected Features
You can export selected features to a new file, creating a permanent subset. Before exporting:
- Confirm the selection is correct.
- Choose an appropriate output format and location.
- Name the output file clearly so its contents are obvious.
- Verify the exported file after saving — open it and check the record count and attributes.
Avoid overwriting source data. Export to a new file in a clearly named output folder.
Practical Example
You want to find all parks in Riverton larger than 2 hectares that are within 800 metres of a transit stop. You first select parks where area_ha > 2 using an attribute selection. You then refine the selection spatially, keeping only those parks within 800 metres of the transit stops layer. You check the count — 14 parks match. You review them in the attribute table and export the result to a new GeoJSON file named riverton_parks_near_transit.geojson.
Common Mistakes
- Forgetting to clear a selection before running a new one, which can produce unexpected combined results.
- Exporting without verifying the selection first.
- Overwriting source data with an export.
- Confusing a filter with a permanent deletion — filters are temporary.
- Not documenting the query conditions used to create a subset.
Key Takeaways
- Selections highlight features temporarily without changing source data.
- Attribute selection uses field values; spatial selection uses geographic relationships.
- Filters hide non-matching features from view without deleting them.
- Always verify selection results before exporting.
- Export to a new file; never overwrite source data.
- GIS select by attribute expression
- GIS select by location spatial
- GIS filter definition query
- export selected features GIS