s2_angles | R Documentation |
The function extracts sun angle rasters from a SAFE archive, reshaping the original information (5 km resolution) to the desired Sentinel-2 output resolution. It was not exported because it is intended to be called by s2_translate.
s2_angles(
infiles,
outdir = ".",
subdirs = NA,
tmpdir = NA,
rmtmp = TRUE,
prod_type = c("SZA", "OZA", "SAA", "OAA"),
res = "10m",
method = "bilinear",
format = "VRT",
compress = "DEFLATE",
bigtiff = FALSE,
overwrite = FALSE
)
infiles |
Full paths of the input SAFE folders. |
outdir |
(optional) Full name of the output directory where
the files should be created (default: current directory).
|
subdirs |
(optional) Logical: if TRUE, different output products are
placed in separated |
tmpdir |
(optional) Path where intermediate files will be created.
Default is a temporary directory.
If |
rmtmp |
(optional) Logical: should temporary files be removed? (Default: TRUE). |
prod_type |
(optional) Vector of types (angles) to be produced as outputs.
Default is all the possible types
( |
res |
(optional) Spatial resolution (one between |
method |
(optional) A method used to resample the output rasters
(accepted values are valid values accepted by |
format |
(optional) Format of the output file (in a
format recognised by GDAL). Default value is |
compress |
(optional) In the case a GeoTIFF format is chosen, the compression indicated with this parameter is used. |
bigtiff |
(optional) Logical: if TRUE, the creation of a BigTIFF is forced (default is FALSE). This option is used only in the case a GeoTIFF format was chosen. |
overwrite |
Logical value: should existing output files be overwritten? (default: FALSE) |
A vector with the names of the created output files (just created or already existing).
License: GPL 3.0
Luigi Ranghetti, phD (2022)
Marina Ranghetti (2022)
L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). "sen2r": An R toolbox for automatically downloading and preprocessing Sentinel-2 satellite data. Computers & Geosciences, 139, 104473. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.cageo.2020.104473")}, URL: https://sen2r.ranghetti.info/.
## Not run:
s2_l2a_example <- file.path(
"/existing/path",
"S2B_MSIL2A_20200801T100559_N0214_R022_T32TNR_20200801T135302.SAFE"
)
# Create all products
s2_angles(s2_l2a_example, outdir = tempdir())
# Create only Viewing Incidence Angles at Azimuth, at 60 m resolution,
# with cubic interpolation, in ENVI format
s2_angles(
s2_l2a_example,
outdir = tempdir(),
prod_type = "OAA",
res = "60m",
method = "cubic",
format = "ENVI"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.