Description Usage Arguments Value Author(s) Examples
Translate an S2 L2A scene into other raster format.
1 2 | S2_L2A_translate(S2_safe, band, resolution = c(10, 20, 60),
granules = "all", filename, sep = "_", ...)
|
S2_safe |
Chr. S2 SAFE folder (S2A_USER_PRD_MSIL2A_PDMC_....SAFE) |
band |
Chr[]. Band to extract, see |
resolution |
Num[]. Resolutions in m, allowed: 10, 20, 60. |
granules |
Chr[]. Granules to translate, prefixes with 'T' (e.g. 'T32ULD'), 'all' for all granules in the product (see https://sentinel.esa.int/documents/247904/1955685/S2A_OPER_GIP_TILPAR_MPC__20151209T095117_V20150622T000000_21000101T000000_B00.kml) |
filename |
Chr. Output filename; will be automatically suffixed with granuleID, band name and resolution |
sep |
Chr. Seperator for suffixed filenames |
... |
Additional arguments as for |
Named list of Chr[], containing the filenames. List names are granule identifiers.
Benjamin Brede
1 2 3 4 5 6 7 | # select appropriate GDAL installtion that can read JPG2000
gdal_setInstallation('/usr/bin/', rescan = TRUE)
S2 <- 'S2A_USER_PRD_MSIL2A_PDMC_20151001T124224_R008_V20151001T104705_20151001T104705.SAFE'
# use co argument to pass creation options for GTiff files (as in gdal_translate)
# use a_nodata argument to set NoData value
S2_L2A_translate(S2, band = c('B04', 'B8A'), resolution = 20, granules = 'T31UFU', 'test.tif', co = c('COMPRESS=LZW'), a_nodata = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.