Description Usage Arguments Details Value Note Author(s)
View source: R/pr_compute_indexes.R
function used to compute spectral indexes, given the indexes formula
1 2 3 4 5 6 7 8 | pr_compute_indexes(
in_file,
out_file,
out_format = "GTiff",
indexes,
cust_indexes = NULL,
overwrite = FALSE
)
|
in_file |
'character' path of the file to be used for computing indexes |
out_file |
'character' output path - filenames are created adding a suffix to the basename of this file (e.g., S:/mypath/myoutfile_NDVI.tif) |
out_format |
'character“ ["GTiff" | "ENVI"], Output format, Default: 'GTiff' |
indexes |
'character' array of names of indexes to be computed. You can see a list of available indexes using command 'pr_listindexes()', or see the corresponding table at: https://irea-cnr-mi.github.io/prismaread/articles/Computing-Spectral-Indexes.html #nolint |
cust_indexes |
'character' named list containing names and formulas of custom indexes to be computed. The indexes formulas must be computable R formulas, where bands are referred to by the prefix "b", followed by the wavelength (e.g., 'cust_indexes = list(myindex1 = "R500 / R600", myindex2 = "(R800 - R680) / (R800 + R680)")' |
overwrite |
'logical' if TRUE, existing files are overwritten, default: FALSE |
the function parses the index formula to identify the required bands. On the basis of identified bands, it retrieves the reflectance bands required, gets the data into R raster objects, performs the computation and stores results in a GeoTiff or ENVI raster file
NULL - new raster file saved in out_filename
License: GPL 3.0
Lorenzo Busetto, phD (2017)
Luigi Ranghetti, phD (2017)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.