These functions wrap 'sf' binary logical operators with a call to >= and <= -- verifying that a minimamal and maximal number of occurences of TRUE have been achieved.

st_any_intersects(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_contains(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_contains_properly(
  x,
  y,
  at_least = 1L,
  at_most = Inf,
  match_crs = TRUE,
  ...
)

st_any_covered_by(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_covers(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_crosses(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_disjoint(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_equals(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_equals_exact(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_is_within_distance(
  x,
  y,
  at_least = 1L,
  at_most = Inf,
  match_crs = TRUE,
  ...
)

st_any_overlaps(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_touches(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

st_any_within(x, y, at_least = 1L, at_most = Inf, match_crs = TRUE, ...)

Arguments

x

object of class sf, sfc or sfg

y

object of class sf, sfc or sfg; if missing, x is used

at_least

(integer) Minimal occurences of TRUE. Default is 1L.

at_most

(integer) Maximum occurences of TRUE. Default is Inf.

match_crs

(logical) Should the CRS of y be coerced to match the CRS of x? Default is TRUE.

...

(various) Arguments passed on to the underlying binary logical operator.

Examples

#> Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
data(ngp) data(states_map) # Works like normal 'sf' binary logical # operators, except it returns a vector. i <- ngp %>% st_any_intersects(states_map)
#> although coordinates are longitude/latitude, st_intersects assumes that they are planar
head(i)
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE