-
Notifications
You must be signed in to change notification settings - Fork 1
4.6 composite.R
Computes composites for a given periods by combining data from the rawDir
(either raw Sentinel 2 L2A data or indicators computed with the indicator step) according to the n
indicators computed by the which step.
- A standard set of
configFilePath
,regionName
,startDate
andendDate
. - A
period
argument specifying the aggregation period. Period description consists of a number and a period type name (day
,month
oryear
), e.g.1 year
or10 days
. Period type name can be also provided in plural, e.g.2 months
,1 years
,10 days
.
Reads data from both rawDir
(composited bands) and periodsDir
(n
indicators produced by the which step) and stores results into the periodsDir
.
All input and output band names are provided by the configuration (see below), e.g. for a configuration like at the bottom of the page (with two composites defined), and the runtime parameters (monthly composites for two months)
Rscript composite.R myConfig.R myRegion 2018-04-01 2018-05-31 '1 month'
it is expected the the periodsDir
contains (for every tile)
2018-04m1_NMaxNDVI_{tile}.tif
2018-05m1_NMaxNDVI_{tile}.tif
and the output files created for every tile in the periodsDir
will be (2 monthly periods * 2 composites
):
2018-04m1_NDVIComp_{tile}.tif
2018-05m1_NDVIComp_{tile}.tif
2018-04m1_TCIComp_{tile}.tif
2018-05m1_TCIComp_{tile}.tif
This processing step consists of very simple computations and depends mostly on the storage performance.
-
compositeSkipExisting
should already existing output composites be skipped (TRUE
) or reprocessed anyway (FALSE
). -
compositeBands
a list of three vectors defining composites to be computed. All vectors must have same lenght. Corresponding elements of each vector describe the same output composite.-
band
input band/indicator from therawDir
to be composited. -
whichBand
then
indicator band name computed during the which step to be used for a given composite. -
outBand
output band name.
-
-
compositeBlockSize
dimension of the processing block - see memory considerations on the parallelization page.
A sample configuration producing composites of the NDVI
and TCI
bands using the NMaxNDVI
indicator computed during the which step:
compositeSkipExisting = TRUE
compositeBands = list(
band = c('NDVI', 'TCI'),
whichBand = c('NMaxNDVI', 'NMaxNDVI'),
outBand = c('NDVIComp', 'TCIComp')
)
compositeBlockSize = 512