Description Usage Arguments Details Value See Also Examples
Phenological and date driven Pixel Based Compositing (PBC).
1 2 3 4 5 6 7 | rsComposite(
x,
x.dates,
obs.dates,
comp.method = "closest",
temporal.buffer = NULL
)
|
x |
Object of class RasterStack or RasterBrick. |
x.dates |
Object of class Date with x observation dates. |
obs.dates |
Object of class Date with reference dates. |
comp.method |
One of "closest" or "phenological". The default is "closest". |
temporal.buffer |
Search buffer (expressed in days). The default is NULL. |
The function uses a multi-layer raster object to build a composite for a reference date which corresponds to the median of obs.dates. Moreover,the function estimates the Median Absolute Deviation (MAD) of obs.dates which determines the temporal buffer that is used to search for usable data. As an alternative, temporal.buffer can be specified manually and will be required if obs.dates consists of a single value. The user can also specify how the compositing should be done. comp.method can be set to: #'
closest - Selects pixels from layers with the closest possible date.
phenological - Selects pixels from layers with the closest Day of the Year (DoY).
The final output of rsComposite is a list consisting of: #'
composite - Final image composite
dates - Temporal composition of the composite reporting on the julian day (origin is "1970-01-01").
pixel.count - pixel count of unique values in dates. Additionally, it reports on NA values.
pixel.count.plot - Plot with relative frequency of pixels per date extracted from pixel.count.
target.date - Reference date used during compositing.
temporal.buffer - Temporal buffer used during compositing.
If pheno2 is used, for each pixel, the function will estimate a weighted mean of the clear pixels within the temporal buffer. The weights represent the inverse time difference between the target and the available dates giver higher weights to small differences.
A list.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
require(raster)
# read raster data
file <- list.files(system.file('extdata', '', package="rsMove"), 'ndvi.tif', full.names=TRUE)
r.stk <- stack(file)
r.stk <- stack(r.stk, r.stk, r.stk) # dummy files for the example
# raster dates
file.name <- names(r.stk)
x.dates <- as.Date(paste0(substr(file.name, 2, 5), '-',
substr(file.name, 7, 8), '-', substr(file.name, 10, 11)))
# target date
obs.dates = as.Date("2013-06-01")
# build composite
r.comp <- rsComposite(r.stk, x.dates, obs.dates, comp.method="closest", temporal.buffer=90)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.