View source: R/temporalComposite.R
temporalComposite | R Documentation |
Based on a user-defined function, e.g. max()
for maximum value composites
(MVC), aggregate native 16-day MODIS data sets to custom temporal composites.
temporalComposite( x, y, timeInfo = extractDate(x, asDate = TRUE)$inputLayerDates, interval = c("month", "year", "fortnight"), fun = max, na.rm = TRUE, cores = 1L, filename = "", ... )
x |
|
y |
|
timeInfo |
|
interval |
|
fun, na.rm |
|
cores |
|
filename |
|
... |
Additional arguments passed to |
A Raster*
object.
Florian Detsch
aggInterval()
, raster::calc()
, raster::writeRaster()
.
## Not run: library(mapview) frc <- as(subset(franconia, district == "Mittelfranken"), "Spatial") tfs <- runGdal("MOD13A1", begin = "2015001", end = "2016366", extent = frc, job = "temporalComposite", SDSstring = "100000000010") ndvi <- sapply(tfs[[1]], "[[", 1) cdoy <- sapply(tfs[[1]], "[[", 2) mmvc <- temporalComposite(ndvi, cdoy) plot(mmvc[[1:4]]) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.