st_join | R Documentation |
sftime
objectsSpatial join, spatial filter for sftime
objects
## S3 method for class 'sftime'
st_join(
x,
y,
join = st_intersects,
...,
suffix = c(".x", ".y"),
left = TRUE,
largest = FALSE
)
## S3 method for class 'sftime'
st_filter(x, y, ..., .predicate = st_intersects)
x |
An object of class |
y |
An object of class |
join |
A geometry predicate function with the same profile as
|
... |
for |
suffix |
length 2 character vector; see merge |
left |
logical; if |
largest |
logical; if |
.predicate |
A geometry predicate function with the same profile as
|
Alternative values for argument join
are:
st_contains_properly
st_contains
st_covered_by
st_covers
st_crosses
st_disjoint
st_equals_exact
st_equals
st_is_within_distance
st_nearest_feature
st_overlaps
st_touches
st_within
any user-defined function of the same profile as the above
A left join returns all records of the x
object with y
fields
for non-matched records filled with NA
values; an inner join returns
only records that spatially match.
An object of class sftime
, joined based on geometry.
g1 <- st_sfc(st_point(c(1,1)), st_point(c(2,2)), st_point(c(3,3)))
x1 <- st_sftime(a = 1:3, geometry = g1, time = Sys.time())
g2 <- st_sfc(st_point(c(10,10)), st_point(c(2,2)), st_point(c(2,2)), st_point(c(3,3)))
x2 <- st_sftime(a = 11:14, geometry = g2, time = Sys.time())
## st_join
# left spatial join with st_intersects
st_join(x1, x2)
# inner spatial join with st_intersects
st_join(x1, x2, left = FALSE)
## st_filter
st_filter(x1, x2)
st_filter(x2, x1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.