veg_filter: veg_filter

Description Usage Arguments Details Value References Examples

View source: R/modis_preprocessing.R

Description

Filter pixels of MODIS vegetation index products based on the reliability and/or usefulness layers.

Usage

1
veg_filter(x, vi, rel = TRUE, usef = NULL, angle = NULL)

Arguments

x

.hdf MODIS file corresponding to a vegetation index product.

vi

A character specifying the index to filter. Possible values are "NDVI" or "EVI".

rel

Logical; if TRUE, reliability level = "Good data" is used to filter pixels.

usef

Usefulness level to filter pixels according to MODIS user's guide.

angle

Viewing zenith angle tolerance to filter pixels (in degrees).

Details

Filter the pixels of a MODIS vegetation index product based on reliability values if rel = TRUE (default) or usefulness level and/or view zenith angle defined by the user.

If rel = TRUE, only pixels with "good data" level of reliability are included in the output and usefulness is not taken into account. If rel = FALSE user can define the usefulness level to be used to filter the pixels according to the bits 2-5 of the QA MODIS layer, with values from 0 (0000; highest quality) to 15 (1111; not useful; see Didan et al., 2015).

Angle for all MXD13 products except MXD13C1 and MXD13C2 in which this is not included can be used in the filter.

Value

List of three or four (when angle is included) raster layers: NDVI/EVI layer, reliability layer, usefulness layer and zenith view angle layer. Only pixels that are not NA in the original vegetation index layer are included in the reliability, usefulness and zenith view angle output layers.

References

K. Didan, A. Barreto-Munoz, R. Solano & A. Huete. (2015), MODIS Vegetation Index User's Guide (MOD13 Series) Collection-6. Arizona, USA, 32.

Land Processes Distributed Active Archive Center (LP DAAC), USGS EROS Data Center. (2004). MODIS Land Data Operational Product Evaluation (LDOPE) Tools, release 1.4. Arizona, USA, 103.

Examples

1
2
3
4
5
## Not run: # For NDVI MOD13Q1 product, filtering pixels with
usefulness <= 2 and view zenith angle <= 35
x <- "MOD13Q1.A2019305.h14v09.006.2019323202113.hdf"
NDVIfiltered <- veg_filter(x, vi = "NDVI", rel = FALSE, usef = 2, angle = 35)
## End(Not run)

RichardLemoine/LSTtools documentation built on Oct. 19, 2020, 12:50 a.m.