rgf.summary: Extract summaries from time-series specified as raster group...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rgf.R

Description

These functions query the time-series specified in a raster group file and save the selected summary in a new raster. Summaries refer to the population of values of each grid cell across the time-series.

rgf.summary computes summaries, and rgf.when finds at which moment (ie. order No. in the time-series) the selected summary is located.

Usage

1
2
rgf.summary(inFl, outFl, step= length(inFl), fun = "SUM", silent = FALSE, ...)
rgf.when(inFl, ref, order = "FIRST", silent = FALSE)

Arguments

inFl

Raster group file with the file names of the input time-series.

outFl

Raster group file with the file names of the output time-series.

step

Number of images taken for each summary. If a value is not supplied, the summary is made on the complete time-series.

fun

Summary function SUM, MAX, MIN, MEAN, COUNT, RANGE, SD, VAR,MEDIAN.

ref

The reference image.

order

"FIRST" or "LAST"; to find the first or the last occurrence in the time-series.

silent

logical; if TRUE, comment and non-fatal CPL driver errors are suppressed.

...

Any unmatched parameter will be passed to the writeGDAL function.

Details

Any summary can be computed for the entire set, or for a subset of images. For example, let a time-series made of 36 images representing monthly NDVI. The maximum NDVI found at each grid cell could be computed for the entire series (step not specified), for each year of the series (step = 12), or quarterly (step = 3). The corresponding summary images are then saved to raster files.

rgf.when compares a reference image with the images in the time-series (or a subset of it), and returns a composite image where each grid cell contains the order-number at which its reference value is found.

Value

rgf.summary does not returns any value, but writes to disk the solicited summaries.

rgf.when returns a composite raster image as a SpatialGridDataFrame.

Author(s)

Alberto Ruiz, aruiz@eeza.csic.es

See Also

rgf.create

Examples

1
2
3
4
5
6
#not work...
#rgf.create('ndvi','.rst',1970,1975,output='ndvi.rgf')
#ndvifiles=rgf.read('ndvi.rgf')
#rgf.summary(ndvifiles,'maxNdvi.rst',fun='MAX', drivername='RST')
#Anualnames=paste('maxNdvi',1970:1975,sep='_')
#maxNdvi=rgf.summary(ndvifiles,AnualNames, step=12,fun='MAX',drivername='RST')

r2dRue documentation built on May 2, 2019, 4:50 p.m.