reformatDOY.Rd 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/reformatDOY.R
  3. \name{reformatDOY}
  4. \alias{reformatDOY}
  5. \title{Reformat MODIS "composite_day_of_the_year" SDS}
  6. \usage{
  7. reformatDOY(x, cores = 1L, ...)
  8. }
  9. \arguments{
  10. \item{x}{\code{character} or \code{Raster*}. MODIS
  11. "composite_day_of_the_year" layer(s).}
  12. \item{cores}{\code{integer}. Number of cores for parallel processing.}
  13. \item{...}{Additional arguments passed to \code{\link{extractDate}}.}
  14. }
  15. \value{
  16. A \code{Raster*} object.
  17. }
  18. \description{
  19. In order to create custom temporal aggregation levels (e.g., half-monthly,
  20. monthly) from native 16-day MODIS composites, a convenient representation of
  21. the pixel-wise acquisition date is urgently required. Since the MODIS
  22. "composite_day_of_the_year" SDS merely includes the day of the year (DOY),
  23. but not the year itself, this function creates complete date information from
  24. both the respective MODIS layer name and the pixel-wise DOY information.
  25. }
  26. \examples{
  27. \dontrun{
  28. tfs = runGdal("MOD13Q1", collection = "006",
  29. begin = "2000353", end = "2000366", extent = "Luxembourg",
  30. job = "reformatDOY", SDSstring = "000000000010")
  31. ## raw doy
  32. raw <- raster(unlist(tfs))
  33. unique(raw[])
  34. ## reformatted dates
  35. rfm <- reformatDOY(raw)
  36. unique(rfm[])
  37. }
  38. }
  39. \seealso{
  40. \code{\link{repDoy}}.
  41. }
  42. \author{
  43. Florian Detsch
  44. }