reformatDOY: Reformat MODIS "composite_day_of_the_year" SDS

Description Usage Arguments Value Author(s) See Also Examples

View source: R/reformatDOY.R

Description

In order to create custom temporal aggregation levels (e.g., half-monthly, monthly) from native 16-day MODIS composites, a convenient representation of the pixel-wise acquisition date is urgently required. Since the MODIS "composite_day_of_the_year" SDS merely includes the day of the year (DOY), but not the year itself, this function creates complete date information from both the respective MODIS layer name and the pixel-wise DOY information.

Usage

1
reformatDOY(x, cores = 1L, ...)

Arguments

x

character or Raster*. MODIS "composite_day_of_the_year" layer(s).

cores

integer. Number of cores for parallel processing.

...

Additional arguments passed to extractDate.

Value

A Raster* object.

Author(s)

Florian Detsch

See Also

repDoy.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
tfs = runGdal("MOD13Q1", collection = "006",
              begin = "2000353", end = "2000366", extent = "Luxembourg", 
              job = "reformatDOY", SDSstring = "000000000010")
        
## raw doy
raw <- raster(unlist(tfs))
unique(raw[])

## reformatted dates
rfm <- reformatDOY(raw)
unique(rfm[])

## End(Not run)

MODIS documentation built on Nov. 12, 2020, 5:06 p.m.