Internal function to apply cloud mask to SR products.
It is used inside s2_mask
only on multiband virtual products
(because if the output is a physical file there is no gain in using
this procedure).
maskapply_parallel(in_rast, in_mask, outpath, tmpdir = NA, binpaths, NAflag = 0, parallel = TRUE, minrows = NULL, datatype = "INT2S", overwrite = FALSE, .log_message = NA, .log_output = NA)
in_rast | Input raster Stack. |
---|---|
in_mask | Input Raster to be used as mask (pixesl with values 1 are not masked, pixels with values 0 are masked). |
outpath | Path of the output file. |
tmpdir | (optional) Path where intermediate VRT will be created. Default is in a temporary directory. |
binpaths | list of paths of binaries. |
NAflag | (optional) NA value to be used where mask is applied. |
parallel | (optional) Logical: if TRUE, masking is conducted using parallel
processing, to speed-up the computation for large rasters.
The number of cores is automatically determined; specifying it is also
possible (e.g. |
minrows | (optional) Argument to be passed to raster::blockSize. |
datatype | (optional) data type of the output raster. |
overwrite | (optional) Logical value: should existing output files be overwritten? (default: FALSE) |
.log_message | (optional) Internal parameter
(it is used when the function is called by |
.log_output | (optional) Internal parameter
(it is used when the function is called by |
License: GPL 3.0