st_crop.sftime | R Documentation |
sftime
object to a specific rectangleCrop an sftime
object to a specific rectangle
## S3 method for class 'sftime'
st_crop(x, y, ...)
x |
An object of class |
y |
A numeric vector with named elements |
... |
Additional arguments; Ignored. |
See st_crop
.
x
cropped using y
.
# modified from sf:
box <- c(xmin = 0, ymin = 0, xmax = 1, ymax = 1)
pol <- sf::st_sfc(sf::st_buffer(sf::st_point(c(0.5, 0.5)), 0.6))
pol_sftime <- st_sftime(a = 1, geom = pol, time = Sys.time() + 1:2 * 1000)
pol_sftime_cropped <- sf::st_crop(pol_sftime, sf::st_bbox(box))
class(pol_sftime_cropped)
plot(pol_sftime_cropped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.