geo-registry

Select By Location

Keeps the features of a layer that meet a spatial relationship with another layer's features.

Pitfall. Features are kept whole, not cut to the mask (that is clip).
About this operation
Also called Extract By Location, spatial filter, select features by location
Group vector/selection
Checks crs.agreement
Pitfalls 1 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Name Type Required Default Values Note
predicate enum no intersects intersects, within, contains, touches, crosses, overlaps, disjoint Not stated

Inputs and outputs

Direction Name Type Geometry Note
Input layer vector Not stated Not stated
Input mask vector Not stated Not stated
Output output vector Not stated Not stated

In each engine

Engine Tool Parameters Differences
grass v.select
  • predicate → operator : intersects = intersects; within = within; contains = contains; touches = touches; crosses = crosses; overlaps = overlap; disjoint = disjoint
  • layer → ainput
  • mask → binput
  • output → output
  • The default operator is overlap (GRASS's own test); intersects, within and the other GEOS predicates need GRASS built with GEOS.
qgis native:extractbylocation
  • predicate → PREDICATE : intersects = 0; contains = 1; disjoint = 2; touches = 4; overlaps = 5; within = 6; crosses = 7
  • layer → INPUT
  • mask → INTERSECT
  • output → OUTPUT
  • PREDICATE takes a list; features meeting any of them are kept.
sf sf::st_filter
  • predicate .predicate = st_within (or another st_ predicate function), passed through ...; st_intersects by default.
  • layer → x
  • mask → y
  • Needs the dplyr package installed (sf only suggests it); without it the call fails.