if (sits_run_examples()) {
# Creating a sits cube from BDC
bdc_cube <- sits_cube(
source = "BDC",
collection = "CB4_64_16D_STK-1",
tiles = c("022024", "022025"),
bands = c("B15", "CLOUD"),
start_date = "2018-01-01",
end_date = "2018-01-12"
)
# Downloading images to a temporary directory
cube_local <- sits_cube_copy(
cube = bdc_cube,
output_dir = tempdir(),
roi = c(lon_min = -42.28469009,
lat_min = -14.95411527,
lon_max = -41.74745556,
lat_max = -14.65950650),
multicores = 2
)
}
Run the code above in your browser using DataLab