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_dea <- 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"
)
# --- Access to CDSE open data Sentinel 2/2A level 2 collection
# It is recommended that `multicores` be used to accelerate the process.
s2_cube <- sits_cube(
source = "CDSE",
collection = "SENTINEL-2-L2A",
tiles = c("20LKP"),
bands = c("B04", "B08", "B11"),
start_date = "2018-07-18",
end_date = "2019-01-23"
)
## -- Sentinel-1 SAR from CDSE
roi_sar <- c("lon_min" = 33.546, "lon_max" = 34.999,
"lat_min" = 1.427, "lat_max" = 3.726)
s1_cube_open <- sits_cube(
source = "CDSE",
collection = "SENTINEL-1-RTC",
bands = c("VV", "VH"),
orbit = "descending",
roi = roi_sar,
start_date = "2020-01-01",
end_date = "2020-06-10"
)
# --- Access to AWS open data Sentinel 2/2A level 2 collection
s2_cube <- sits_cube(
source = "AWS",
collection = "SENTINEL-S2-L2A-COGS",
tiles = c("20LKP", "20LLP"),
bands = c("B04", "B08", "B11"),
start_date = "2018-07-18",
end_date = "2019-07-23"
)
# -- Creating Sentinel cube from MPC
s2_cube <- sits_cube(
source = "MPC",
collection = "SENTINEL-2-L2A",
tiles = "20LKP",
bands = c("B05", "CLOUD"),
start_date = "2018-07-18",
end_date = "2018-08-23"
)
# -- Creating Landsat cube from MPC
roi <- c("lon_min" = -50.410, "lon_max" = -50.379,
"lat_min" = -10.1910 , "lat_max" = -10.1573)
mpc_cube <- sits_cube(
source = "MPC",
collection = "LANDSAT-C2-L2",
bands = c("BLUE", "RED", "CLOUD"),
roi = roi,
start_date = "2005-01-01",
end_date = "2006-10-28"
)
## Sentinel-1 SAR from MPC
roi_sar <- c("lon_min" = -50.410, "lon_max" = -50.379,
"lat_min" = -10.1910, "lat_max" = -10.1573)
s1_cube_open <- sits_cube(
source = "MPC",
collection = "SENTINEL-1-GRD",
bands = c("VV", "VH"),
orbit = "descending",
roi = roi_sar,
start_date = "2020-06-01",
end_date = "2020-09-28"
)
# --- Create a cube based on a local MODIS data
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
modis_cube <- sits_cube(
source = "BDC",
collection = "MOD13Q1-6",
data_dir = data_dir
)
}
Run the code above in your browser using DataLab