# NOT RUN {
s2_l1c_example <- file.path(
"/existing/path",
"S2A_MSIL1C_20170603T101031_N0205_R022_T32TQQ_20170603T101026.SAFE")
s2_l1c_example <- file.path(
"/existing/path",
"S2A_MSIL2A_20170603T101031_N0205_R022_T32TQQ_20170603T101026.SAFE")
# Create a single TOA GeoTIFF in the same directory
s2_translate(s2_l1c_example, format="GTiff")
# Create a single BOA VRT with a custom name
s2_translate(
s2_l2a_example,
"/new/path/example_sentinel2_sr.vrt",
vrt_rel_paths = TRUE
)
# Create three products (ENVI) in the same directory at 60m resolution
s2_translate(
s2_example,
format = "ENVI",
prod_type = c("BOA","TCI","SCL"),
res = "60m",
subdirs = TRUE
)
# }
Run the code above in your browser using DataLab