Description Usage Arguments Details Value References Examples
Calculate principal components from raster data values. The
raster can either be supplied as Raster*
object, satellite*
object or as a list of Raster*
objects. The latter is usefull if the
raster dataset has been tiled into small observation areas using e.g.
snipRaster
.
1 2 3 4 5 6 7 8 9 |
x |
|
bcde |
Band code(s) to be used for computing the pca |
... |
Further arguments passed on to |
ignore_names |
If list is supplied and if the band names of the individual rasters do not match (e.g. because of different observation dates), ignore the names when building a single data frame for the PCA computation (does not hurt). |
center |
See |
scale |
See |
The method for Raster*
and Satellite*
objects is basically a
wrapper arround the respective function in the RStoolbox package. For the list
(i.e. snip) related implementation, the stats::prcomp function is used to actually
compute the PCA.
If x is a Satellite object, a Satellite object with added image
textures; if x is a raster::Raster*
object, a raster::Raster*
object with converted layer(s).
Benjamin Leutner and Ned Horning (2016). RStoolbox: Tools for Remote Sensing Data Analysis. R package version 0.1.6. https://CRAN.R-project.org/package=RStoolbox
1 2 3 4 5 6 7 8 | ## Not run:
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names = TRUE)
sat <- satellite(files)
sat <- pca(sat, bcde = "B004n")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.