phenexRaster: Applies phenex functions to a raster object

Description Usage Arguments Details Value Note See Also

View source: R/phenexRaster.R

Description

A set of ancillary function used to apply phenex functionalities to a Raster* object. Supports the sequential application of functions: modelNDVI (used to model, smooth andinterpolate VI time-series) and phenoPhase used for Phenological Phase Extraction.

Usage

1
2
3
4
phenexRaster(rst, index, years, jdays = seq(1, 365, 16),
  multipleSeasons = FALSE, correction = "bise", method = "LinIP",
  doParallel = FALSE, viMultFactor = NULL, phase, methodPheno = "local",
  threshold = 0.55, n = 1000, export = "memory", ...)

Arguments

rst

A RasterStack or RasterBrick object

index

An integer index with the same value for each image in a year; e.g., considering three images per year and a total of two years we got: c(1,1,1, 2,2,2).

years

An integer vector detailing which years are in the time-series. Note that the number of unique values in index must be equal to the length of years.

jdays

Julian days for each image considering a single year (e.g., for MODIS MOD13Q1 NDVI 16-day product, the following could be used jdays = seq(1,365,16), default value).

multipleSeasons

Determines wether a season detection should be performed or not. Setting ‘multipleSeasons’ to TRUE forces following algorithms modelling NDVI and extracting phenological phases to be performed once per detected season.

correction

A character string determining which method will be used for correction of NDVI values. Should be either:

none”: no correction will be performed.

ravg”: Smoothing with running average. Default window size is 7 and can be modified by parameter ‘window.ravg’. See also runningAvg.

bise”: Best index slope extraction after Viovy et. al (1992). Second interpretation of bise algorithm. Can be modified with parameter ‘slidingperiod’. Default to 40, optimised for the area of Central Europe. This might has to be modified when vegetation dynamics of other climates/habitats are analysed. An maximum increase threshold is defined via parameter ‘growthFactorThreshold’ with default to 0.1 (10 percent increase per day allowed). The timeserie is cycled via parameter ‘cycleValues’, which is a boolean value determining whether the end of the ndvi timeserie is combined with its beginning or not (default value is true). If false, gaps or low ndvi values at the beginning of timeserie influence the result.

method

Determines which model will be fitted to the corrected NDVI-timeserie (if the corrected timeserie is not available, the raw one out of ‘values’ will be used).

LinIP”: A linear interpolation is performed. For interpolation, the end of timeserie is connected to the beginning (e.g. after day 365 follows day 1). Applied in Badeck et. al (2004) and Doktor et. al (2009).

Spline”: A spline interpolation is performed. For interpolation, the end of timeserie is connected to the beginning (e.g. after day 365 follows day 1).

DSig”: Fits a double sigmoidal function to NDVI values (according to Zhang et. al (2003)).

DSigC”: Fits another double sigmoidal function (own C implementation) to NDVI values.

DLogistic”: Fits a double logistic function after Fischer, Alberte (1994) to NDVI values.

Gauss”: Fits a symmetric or asymmetric (determined by boolean parameter ‘asym’) gaussian function to NDVI values (own C implementation after Press, W.H. (1992)).

GaussMix”: Fits a mixture of gaussian functions to NDVI values (own C implementation after Press, W.H. (1992)). The number of components is determined by parameter ‘components’. If multiple components are given, the algorithm checks which number performs best.

Growth”: Fits a plant growth model after Richter et. al (1991) to NDVI values.

FFT”: Smoothes the corrected or raw NDVI values with fast fourier transformation (implemented in R). The smoothing intensity can be controlled with parameter ‘filter.threshold’ with default to 3.

SavGol”: Smoothes the corrected or raw NDVI values with a Savitzky-Golay filter (own C implementation after Press, W.H. (1992)). The smoothing algorithm can be modified with parameters ‘window.sav’ (window size of filter, default to 7), ‘degree’ (degree of fitting polynomial, default to 2) and ‘smoothing’ (repetition quantity, default to 10).

doParallel

This method uses 'foreach'. If a parallel backend is registered, setting ‘do.parallel’ to ‘TRUE’ enables parallel processing.

viMultFactor

A multiplication factor for vegetation indices for putting data in the decimal format required by package phenex.

phase

Determines which phase will be extracted:

max”: Day of the year with highest NDVI value is returned.

maxval”: The highest modelled NDVI value and its standard deviation is returned.

min”: Day of the year (before day with maximum NDVI value) with lowest NDVI value is returned.

minval”: The lowest modelled NDVI value and its standard deviation is returned.

greenup”: Day of the year at which greenup takes place and its standard deviation is returned. This day refers to the point where the function of modelled NDVI values exceeds a certain threshold.

senescence”: Day of the year at which senescence takes place and its standard deviation is returned. This day refers to the point where the function of modelled NDVI values exceeds a certain threshold.

methodPheno

Determines whether a global or local threshold is used for greenup and senescence extraction. <e2><80><9c>global<e2><80><9d> threshold: The day of the year is returned, where NDVI values are first equal or higher as the value of <e2><80><98>threshold<e2><80><99>. If the threshold is higher than the values of the timeseries, <e2><80><98>-1<e2><80><99> will be returned.<e2><80><9c>local<e2><80><9d> threshold: The day of the year is returned, for which NDVI values first reach the value of <e2><80><98>threshold<e2><80><99> (interpreted as percentage) between lowest and highest NDVI value of the time-series. The lowest NDVI value is chosen depending on phase selected. For <e2><80><9c>greenup<e2><80><9d>, the lowest value before day of maximum NDVI value is used. For <e2><80><9c>senescence<e2><80><9d>, the lowest value after day of maximum NDVI value is used.

threshold

Threshold for local or global greenup/senescence-extraction method. Should have numerical value between ‘0’ and ‘1’. Global thresholds refer to a fix NDVI value independent of actual NDVI magnitudes. Local thresholds are based on (max - min) * e.g. 0.55. Hence, the respective NDVI value will vary dependent on e.g. land-cover.

n

The number ‘n’ of normal distributed values around the threshold for estimation of ‘sd’. The normal distribution uses the threshold as mean and a standaed deviation consisting of satellite error and standard deviation of fit residuals. The satellite error is considered as 0.02+0.02*value.

export

How to export data. Either a string with 'memory' which will put every single output including VI modelled values and phenoPhase metrics by year in memory or, 'file' which export everything to GeoTIFF files. The first option ('memory') is not suited for large datasets.

...

Further arguments to be passed to modelNDVI. These are parameters passed to smoothing or modelling functions. These are: <e2><80><98>slidingperiod<e2><80><99> for correction <e2><80><9c>bise<e2><80><9d>, <e2><80><98>window.ravg<e2><80><99> for correction <e2><80><9c>ravg<e2><80><9d>, <e2><80><98>asym<e2><80><99> for method <e2><80><9c>Gauss<e2><80><9d>, <e2><80><98>filter.threshold<e2><80><99> for method <e2><80><9c>FFT<e2><80><9d> and <e2><80><98>degree<e2><80><99>, <e2><80><98>window.sav<e2><80><99> and <e2><80><98>smoothing<e2><80><99> for method <e2><80><9c>SavGol<e2><80><9d>.

Details

The function supports multiple phase values (character vector) to be passed to phenoPhase function.

Value

If export = 'memory', then a list containing the following elements will be returned:

modVIRstStack

A RasterStack containing modelled data for all years

phenoMetricsRstAvg

A RasterStack containing phenoPhase metrics average

phenoMetricsRstStd

A RasterStack containing phenoPhase metrics standard-deviation

Otherwise NULL will be returned.

Note

These functions are experimental and errors may happen. In addition, the performance of phenoPhase may not be suitable to work with large datasets (npixels > 5E5 or so). A couple of limitations apply to this function:

See Also

modelNDVI phenoPhase


joaofgoncalves/phenexRaster documentation built on May 20, 2019, 4:41 p.m.