Internal functions to read or write the file containing information about images not to process (because cloud covered or because, for any reason, they were not produced during previous processing runs).

write_ignorelist(
pm,
names_cloudcovered = NULL,
dates_cloudcovered = NULL,
names_missing = NULL,
param_list = NULL
)

read_ignorelist(pm, param_list = NULL)

path_ignorelist(pm)

clean_ignorelist(pm, param_list = NULL)

## Arguments

pm

parameter list (passed by sen2r()).

names_cloudcovered

paths of cloud covered images (passed by sen2r()).

dates_cloudcovered

dates of cloud covered images (passed by sen2r()) (this is used only if names_cloudcovered is not specified).

names_missing

paths of non produced images (passed by sen2r()).

param_list

path of the parameter file (passed by sen2r()).

## Value

write_ignorelist() returns the path of the written TOML file (invisibly).

read_ignorelist() returns a list with two vectors:

• dates_cloudcovered (dates of cloud covered files);

• names_missing (base names of files to be ignored).

path_ignorelist() returns the path in which the TOML file should be written (basing on processing parameters).

clean_ignorelist() returns NULL (it is called for its side effects).

## Details

Sometimes not all the output files are correctly created: the main reason is the cloud coverage higher than the maximum allowed value (argument max_mask), but also some other unexpected reasons could happen, i.e. because of old name SAFE products which do not include all the tiles. To prevent to try to create these files every time the function is called with the same parameter file, the TOML file ".ignorelist.txt" is created in the directory where output files (or indices, or RGB images) are saved. With sen2r <= 1.3.3, a different strategy was used: if param_list is a path, these lists were saved in two hidden files ( one per file not created because of cloud coverage, one other for all the other reasons). To try it again, delete the files/files or set overwrite = TRUE in sen2r()).