
Last chance! 50% off unlimited learning
Sale ends in
Compositing of remote sensing data based on GPS tracking dates.
rsComposite(img, rd, ot, cm = 1, type = "norm", d.buffer = NULL)
Object of class RasterSpack or RasterBrick.
Object of class Date with img observation dates.
Object of class Date with reference dates.
Number of deviations from the target date. Default is 1.
One of "norm" or "pheno" or "pheno2".
Search buffer (expressed in days).
A list.
The function uses a multi-layer raster object to build a composite. It looks at a ginve set of dates (e.g. GPS tracking dates) and estimates a reference date to build the composite for defined by the median of ot. The median is then used to estimate Median Absolute Deviation (MAD) which specifies the size of the buffer set aroung the target date within which bands will be considered. Here, cm is used as a multiplier to enlarge the temporal buffer. Alternatively, a user define temporal buffer is allowed by using the keyword d.buffer. If ot countains only one element, the function will use it as a reference date. In this case, if d.buffer is NULL the function will set it to 30 by default. The way how the function handles temporal information depends on the type keyword. If set to norm, the function will search for the nearest possible dates within the temporal buffer. However, if pheno is set, then the day of the year will be given priority. Thus, if multi-year raster data is provided, older data with a DOY closer to the target that will be used when possible. The output provides: #'
value - composite of target images
dates - per pixel date code
count - pixel count of dates
na.count - count of NA values
target - target date
mad - temporal buffer
# NOT RUN {
require(raster)
# read raster data
file <- list.files(system.file('extdata', '', package="rsMove"), 'tc.*tif', full.names=TRUE)
rsStk <- stack(file)
rsStk <- stack(rsStk, rsStk, rsStk) # dummy files for the example
# raster dates
rd = seq.Date(as.Date("2013-01-01"), as.Date("2013-12-31"), 45)
# target date
ot = as.Date("2013-06-01")
# build composite
r.comp <- rsComposite(rsStk, rd, ot, d.buffer=90)
# }
Run the code above in your browser using DataLab