Description Usage Arguments Value Author(s) Examples
MODIS mask
1 2 | modis_mask(x, bits, se, reject, ...)
unpack_reject(val, bits=32, se, reject)
|
x |
SpatRaster |
bits |
single integer value: 16 or 32 |
se |
matrix |
reject |
list |
... |
additional arguments, none implemented |
\
val |
integer |
SpatRaster
Authors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
f <- "MOD09A1.A2011009.h21v08.006.2015216112834.hdf"
mod <- rast(f)
shortnames <- substr(names(mod), 86, 120)
names(mod) <- shortnames
qc <- mod[[12]]
se <- matrix(c(1,2,3,6,11,11,12,14,16,16), ncol=2, byrow=TRUE)
reject <- list(c("10", "11"), c("1100","1101","1110","1111"), "1", c("000","110","111"), "11")
m <- modis_mask(qc, 16, se, reject)
plot(m)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.