| sits_cube_copy {sits} | R Documentation |
Copies the metadata and data of a cube to a different directory. This function can be use to transfer data on the cloud to a local machine. The region of interest (roi) should be either an "sf" object, a box in XY coordinates ("xmin", "xmax", "ymin", "ymax") or a box in lat-long coordinates ("lon_min", "lon_max", "lat_min", "lat_max").
sits_cube_copy(cube, name, dest_dir, bands = sits_bands(cube), roi = NULL)
cube |
Input data cube |
name |
Output cube name |
dest_dir |
Destination directory |
bands |
Bands to include in output (optional) |
roi |
Region of interest (either "sf", "xy", or "latlong") |
Output data cube
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
modis_cube <- sits_cube(
source = "LOCAL",
name = "modis_sinop",
origin = "BDC",
collection = "MOD13Q1-6",
band = "NDVI",
data_dir = data_dir,
parse_info = c("X1", "X2", "tile", "band", "date")
)
modis_cube_copy <- sits_cube_copy(modis_cube,
name = "modis_sinop_cp",
dest_dir = tempdir()
)