View source: R/compute_s2_paths.R
compute_s2_paths | R Documentation |
compute_s2_paths
is an internal function
(to be used within sen2r()
)
which computes the names of the required output image files
(see details).
The function was split from sen2r()
because this code
is called twice (and to shorten the main function).
list_sen2r_paths
is a wrapper of sen2r()
, which runs
sen2r()
until compute_s2_paths()
is called, returning the same list.
It is a simple way to call compute_s2_paths()
with the same arguments
if sen2r()
.
compute_s2_paths(
pm,
s2_list_l1c,
s2_list_l2a,
tmpdir,
list_prods,
force_tiles = FALSE,
check_tmp = TRUE,
ignorelist
)
list_sen2r_paths(
param_list = NULL,
gui = NA,
preprocess = TRUE,
s2_levels = c("l1c", "l2a"),
sel_sensor = c("s2a", "s2b"),
online = TRUE,
apihub = NA,
downloader = "builtin",
overwrite_safe = FALSE,
rm_safe = "no",
step_atmcorr = "auto",
max_cloud_safe = 100,
timewindow = NA,
timeperiod = "full",
extent = NA,
extent_name = "sen2r",
s2tiles_selected = NA,
s2orbits_selected = NA,
list_prods = c("BOA"),
list_rgb = NA,
list_indices = NA,
index_source = "BOA",
rgb_ranges = NA,
mask_type = NA,
max_mask = 100,
mask_smooth = 0,
mask_buffer = 0,
clip_on_extent = TRUE,
extent_as_mask = FALSE,
reference_path = NA,
res = NA,
res_s2 = "10m",
unit = "Meter",
proj = NA,
resampling = "near",
resampling_scl = "near",
outformat = "GTiff",
rgb_outformat = "GTiff",
index_datatype = "Int16",
compression = "DEFLATE",
rgb_compression = "90",
overwrite = FALSE,
path_l1c = NA,
path_l2a = NA,
path_tiles = NA,
path_merged = NA,
path_out = NA,
path_rgb = NA,
path_indices = NA,
path_subdirs = TRUE,
thumbnails = TRUE,
parallel = TRUE,
processing_order = "by_step",
use_python = TRUE,
tmpdir = NA,
rmtmp = TRUE,
log = NA
)
pm |
List of input parameters. |
s2_list_l1c |
Names and paths of input SAFE level-1C products. |
s2_list_l2a |
Names and paths of input SAFE level-2A products. |
tmpdir |
Path of the temporary directory. |
list_prods |
Character vector with the values of the
products to be processed (accepted values: |
force_tiles |
(optional) Logical: passed to |
check_tmp |
(optional) Logical: if TRUE (default), temporary files
are also searched when |
ignorelist |
List of output files to be ignored (generated by |
param_list |
|
gui |
|
preprocess |
|
s2_levels |
|
sel_sensor |
|
online |
|
apihub |
|
downloader |
|
overwrite_safe |
|
rm_safe |
|
step_atmcorr |
|
max_cloud_safe |
|
timewindow |
|
timeperiod |
|
extent |
|
extent_name |
|
s2tiles_selected |
|
s2orbits_selected |
|
list_rgb |
|
list_indices |
|
index_source |
|
rgb_ranges |
|
mask_type |
|
max_mask |
|
mask_smooth |
|
mask_buffer |
|
clip_on_extent |
|
extent_as_mask |
|
reference_path |
|
res |
|
res_s2 |
|
unit |
|
proj |
|
resampling |
|
resampling_scl |
|
outformat |
|
rgb_outformat |
|
index_datatype |
|
compression |
|
rgb_compression |
|
overwrite |
|
path_l1c |
|
path_l2a |
|
path_tiles |
|
path_merged |
|
path_out |
|
path_rgb |
|
path_indices |
|
path_subdirs |
|
thumbnails |
|
parallel |
|
processing_order |
|
use_python |
|
rmtmp |
|
log |
|
compute_s2_paths
is structured in the following way:
Retrieve the file names expected to be present at the
end of the processing chain (element exp
) and already existing (exi
);
Compute the file names expected to be created
(elements req
and new
, see below)
(this operation is done in reverse order).
Meaning of the elements exi
, exp
, req
and new
(here and for all the script), which are defined foe each processing step:
exi
: full names of the files already existing before launching the
processing chain;
exp
: full names of the files expected to be present at the
end of the processing chain (already existing or not);
req
: names of the files required by the step;
new
: names of the required files not existing yet (expected
to be created).
With overwrite=TRUE
, all these vectors are equal
because all is overwritten.
A nested list:
first elements are exi
, exp
, req
and new
;
second elements deal with the processing step: tiles
, merged
,
warped
, warped_nomsk
, rgb
, masked
and indices
;
third elements are related to output products.
License: GPL 3.0
Luigi Ranghetti, phD (2019)
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/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.