4.3 SLIDE Vectors Spatial Subsetting
subsets of sf dataframes - select and return only features related in space to another object
square bracket (
[
) operator using the syntaxx[y, , op = st_intersects]
st_intersects - is default
- ‘catch all’ topological relation that will return features in the target that touch, cross or are within the source ‘subsetting’ object
op = st_disjoint - is opposite - points that DO NOT intersect with source
4.2.1 Demo of Spatial subsetting - view code and output in main book 04 RMD doc
book example - spData for sample data - NZ high points - point features and regions as polygons
book uses dplyr filter function (tidyverse) for example
![](images/nz-subset-1.png)
Fig 4.1 NZ Spatial Subset example