MODIS (version 1.1.7)

reformatDOY: Reformat MODIS "composite_day_of_the_year" SDS

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

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.

See Also

repDoy.

Examples

Run this code
# 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[])
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace