R/compute_s2_paths.R
, R/list_sen2r_paths.R
compute_s2_paths.Rd
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
)
List of input parameters.
Names and paths of input SAFE level-1C products.
Names and paths of input SAFE level-2A products.
Path of the temporary directory.
Character vector with the values of the
products to be processed (accepted values: "TOA"
, "BOA"
, "SCL"
, "TCI"
,
"AOT"
, "WVP"
, "CLD"
, "SNW"
, "SZA"
, "OZA"
, "SAA"
, "OAA"
).
(optional) Logical: passed to safe_shortname()
(default: FALSE).
(optional) Logical: if TRUE (default), temporary files
are also searched when exi
names are computed;
if FALSE, only non temporary files are searched.
List of output files to be ignored (generated by read_ignorelist()
).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
sen2r
argument (refer to sen2r()
documentation).
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.
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.
License: GPL 3.0
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. doi:10.1016/j.cageo.2020.104473 , URL: https://sen2r.ranghetti.info/.