Which wells fall inside the flood zone? Which parcels touch the proposed road? Which sightings were recorded inside the reserve, and which just outside it? These are the questions GIS exists to answer, and in QGIS the tool that answers them is Select by Location, under Vector, Research Tools. It performs no surgery on your data. It simply looks at one layer's features, compares their geometry against another layer's features using a relationship you choose, and selects the ones that qualify, highlighting them for whatever you do next: count them, export them, delete them, feed them to another tool. This guide teaches the tool's vocabulary, the spatial predicates, carefully, because the difference between within and intersects is the difference between a right answer and a plausible wrong one, and it teaches the selection modes that turn one query into a staged investigation.
Home / GIS and Open Map Data for Beginners
Select by Location in QGIS: Pick Features by Where They Sit

Photo: Vladimir Srajber / Pexels
Word the Question First: The Select by Location Checklist
Check off each step as you finish it. Your progress stays on this page.
0 of 8 complete
0% done
The Predicates, in Plain Language
The tool's heart is a checklist of geometric predicates, and each is a precise claim about how two shapes relate. Intersects is the generous one: the features share any space at all, an overlap, a crossing, a shared edge, even a single shared point, and the feature is selected. It is the correct predicate far more often than beginners expect, because it never misses a relationship. Within is strict containment: the feature lies entirely inside the comparison feature, and a feature that pokes one vertex outside fails, which is why a building straddling a zone boundary is not within the zone even if ninety percent of it is. Contains is within read backwards: your layer's feature completely contains a comparison feature, the question you ask when the container is in your layer and the contained things are in the other. Touches is the narrowest of all: the features meet at their boundaries and share no interior, the parcel that abuts the road without overlapping it, the district that borders but never crosses. Overlaps requires the features to cross into each other, each partly inside and partly outside the other, same-dimension shapes only. Disjoint is the negation, everything that does not intersect, the select-everything-else switch. You may tick several predicates at once, and the tool selects features satisfying any of them, so intersects alone is usually the honest starting point, with the stricter predicates reserved for questions whose wording truly contains them: completely inside means within, any contact at all means intersects, and confusing the two is the classic way this tool produces confident nonsense.
Running the Tool and Building a Selection in Stages
Open Vector, Research Tools, Select by Location. Choose the layer to select from, tick the predicates, choose the layer to compare against, and run: the qualifying features light up in the canvas and in the attribute table, and the status bar reports how many of how many are selected. The dialog's second half is where investigations get interesting, the Modify current selection options. The default creates a new selection, discarding the old. But you can also add to the current selection, running the tool again with a second comparison layer or predicate set and unioning the results; remove from it, carving away exceptions; and select within the current selection, intersecting the old selection with the new query's results. Staged this way, real questions decompose naturally. All parcels intersecting the flood zone, then remove those that also intersect the protected levee strip, then within the remainder keep only those touching a public road: three runs, one refined answer, and at no point did you alter a single feature. Selections are also the natural input to the rest of QGIS: most tools offer to operate on selected features only, and saving a selection as a new layer, right-click, Export, Save Selected Features, is how an answer becomes a dataset when you finally want one.

Selection Is Not a Join, and Not a New Layer
Two confusions follow this tool around, and clearing them saves real grief. First, a selection creates nothing. Close the project without saving and the selection evaporates; it is a state of the layer, a highlight, not an edit and not an output. That ephemerality is a feature during exploration, you can ask reckless questions at zero cost, and a trap only if you mistake a screenshot of highlighted features for saved work. When the answer matters, export the selected features to a file deliberately. Second, Select by Location is not a spatial join, though the two are cousins. A join copies attributes from one layer's features onto another's based on the same spatial predicates, producing a new, enriched dataset, every parcel now carrying the name of the zone it intersects. A selection answers which ones; a join answers which ones, and what comes with them. If your next step needs the zone's name in the parcel's row, you want the join. If your next step is counting, mapping, or exporting the qualifying parcels themselves, the selection is the lighter and clearer tool. Choosing between them is mostly a matter of stating your question precisely, and precise questions are, not coincidentally, the entire skill this article has been teaching under the cover of one dialog box.
Worked Patterns: Three Questions You Will Actually Ask
The compliance sweep. A regulator asks which properties in a district fall inside the noise contour of a planned road. Select from the parcels layer, predicate intersects, compare against the contour polygon layer. Intersects, not within, is the legally honest choice, because a parcel clipped by the contour's edge is affected whether or not it is wholly inside; then export the selection as the notification list. The field shortlist. A survey team can visit twenty sites this week and wants the ones inside the study area but outside the protected core. Run one: select from sites, within the study area polygon, creating the selection. Run two: modify by removing from the current selection everything that intersects the protected core layer. What remains is exactly the visitable set, and the two-stage shape of the query, include by one relationship, exclude by another, is the pattern behind most real shortlists. The border audit. A region suspects its boundary file disagrees with its neighbors'. Select from the region's settlements layer with disjoint against the region polygon: everything selected is a settlement the boundary claims is outside itself, a list of either data errors or genuinely exclaved communities, and either way a list worth a meeting. Notice what all three patterns share: a precisely worded question, a predicate chosen because the wording demands it, and a staged refinement instead of one heroic query. That is the whole craft, and it transfers unchanged to every layer pair you will ever meet.
When Selection Is Not Enough: Distance and Its Tools
Select by Location tests relationships between shapes, and one family of questions sits just outside its reach: the distance questions. Which homes lie within five hundred meters of the new road is not, strictly, an intersects question until you make it one, by buffering the road, drawing the five-hundred-meter zone as a polygon, and then running the selection against the buffer. That two-step, buffer then select, is the standard bridge, and it teaches something worth knowing about GIS thinking generally: most "near" questions become "inside" questions once you draw the nearness as a shape. Beyond that bridge stand the heavier instruments, distance matrices that price every pair, nearest-neighbor tools that find each feature's closest counterpart, and hub lines that draw the connections, each with its own place in a fuller workflow. The selection tool remains the right first move even there, because it is the fastest way to learn the shape of your question: how many features are we even talking about, and does the answer's size make sense. Ask Select by Location first, while the asking is free, and let its counts tell you whether the heavier machinery is worth wheeling out.
Performance and Honest Expectations
Select by Location is fast because it asks a coarse question first. Behind the scenes, QGIS narrows candidates with bounding boxes before it tests true geometry, so even large layers usually answer in seconds. The exceptions teach the tool's limits honestly. Very complex polygons, a coastline boundary with tens of thousands of vertices, tested against tens of thousands of features, will make any engine work, and the professional responses are patience, simplification of the comparison layer where the question allows it, or a spatial index on the layer, which QGIS can build and which turns the coarse first pass from helpful to ruthless. The other expectation to keep honest is precision: predicates are computed on the geometries as stored, so a selection is only as truthful as the data's geometry, and two layers digitized from different sources will disagree at their edges in ways no predicate can forgive. A feature that "should" be within and is not is usually a data biography problem, not a tool failure, and the map canvas, zoomed to the boundary in question, will show you the gap the numbers already confessed. Trust the tool's answers about the data you have. Reserve your suspicion for the data itself.
Related Guides
The closest companions to this guide are the GIS and open map data guides below. Each one picks up a thread this page starts:
- QGIS Atlas: One Layout, Forty Maps, or However Many Features You Have: Atlas is the QGIS print layout feature that turns one designed map into a series: point the layout at a coverage layer, set the map item to...
- How to Export a Shapefile From QGIS: Save Features As, Without Losing Data: Sooner or later someone asks for your layer as a shapefile: a client, a portal, a legacy system that speaks nothing else.
- QGIS LTR vs Latest: Which Version to Install, and Why Plugins, Not Features, Should Decide: QGIS ships a new version every four months, and every third one becomes the Long Term Release, supported with bug fixes for at least a year.
Frequently Asked Questions
Where is Select by Location in QGIS?
Under Vector, Research Tools, Select by Location. You choose the layer to select from, the spatial predicates to test, and the layer to compare against, and the qualifying features are selected in place.
What is the difference between intersects and within?
Intersects selects a feature if it shares any space with the comparison feature, even a single touching point. Within requires the feature to lie entirely inside, so a feature crossing the boundary fails within but passes intersects. Most real questions mean intersects.
Can I refine a selection with several queries?
Yes. The tool's modify options let you create a new selection, add to the current one, remove from it, or select within it. Chaining runs with different layers and predicates builds complex spatial questions in stages without editing any data.
Does Select by Location create a new layer?
No. It only changes which features are selected, a temporary state of the layer. To keep the result, export the selected features: right-click the layer, Export, Save Selected Features As.
How is Select by Location different from a spatial join?
A selection answers which features qualify, and changes nothing else. A spatial join also uses spatial relationships, but it produces a new dataset with attributes copied across, such as each parcel gaining the name of the zone it falls in. Use the join when you need the other layer's data in your rows.
Photo credits: Vladimir Srajber (Pexels); Radoslaw Sikorski (Pexels). Photos are served from this site; follow the credit to the library page for the original.