if (sits_run_examples()) {
# --- Access to the Brazil Data Cube
# create a raster cube file based on the information in the BDC
cbers_tile <- sits_cube(
source = "BDC",
collection = "CBERS-WFI-16D",
bands = c("NDVI", "EVI"),
tiles = "007004",
start_date = "2018-09-01",
end_date = "2019-08-28"
)
# --- Access to Digital Earth Africa
# create a raster cube file based on the information about the files
# DEAFRICA does not support definition of tiles
cube_deafrica <- sits_cube(
source = "DEAFRICA",
collection = "SENTINEL-2-L2A",
bands = c("B04", "B08"),
roi = c(
"lat_min" = 17.379,
"lon_min" = 1.1573,
"lat_max" = 17.410,
"lon_max" = 1.1910
),
start_date = "2019-01-01",
end_date = "2019-10-28"
)
# --- Create a cube based on a local MODIS data
# MODIS local files have names such as
# "TERRA_MODIS_012010_NDVI_2013-09-14.jp2"
# see the parse info parameter as an example on how to
# decode local files
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
modis_cube <- sits_cube(
source = "BDC",
collection = "MOD13Q1-6.1",
data_dir = data_dir,
parse_info = c("satellite", "sensor", "tile", "band", "date")
)
}
Run the code above in your browser using DataLab