ccdc_ndmi_stats: Derive NDMI and NDWI summary statistics for a specified date...

View source: R/ccdc_ndmi_stats.R

ccdc_ndmi_statsR Documentation

Derive NDMI and NDWI summary statistics for a specified date range derived from a CCDC image (see Zhu & Woodcock 2014)

Description

At each pixel in the CCDC image the NDMI and NDWI are calculated for the specified date range. From this time series the min, max, median as well as the number of days since the start date that mins and maxes occur are returned. !!Assumes that coefficients for up to 8 segments are present and properly named in CCDC image (see Earth Engine script)!!

Usage

ccdc_ndmi_stats(ccdc_img, start_date, end_date, crs = NULL)

Arguments

ccdc_img

(SpatRaster, stars, XY data.frame (fastest)) The CCDC image for which to extract coefficients for computing NDMI and NDWI.

start_date

(Date,character) End date for which to compute NDMI / NDWI (must be later then March 1 1984, and earlier than present date).

crs

(terra::crs,optional) A CRS object interpreted by terra::crs(), only required if 'ccdc_img' is provided as a XY data.frame.

Value

(SpatRaster) A SpatRaster with the min, max, median NDMI and NDWI, as well as the number of days since the start days of the mins and maxes as bands.


HunterGleason/R.ccdc.tools documentation built on July 1, 2022, 10:37 a.m.