pr_compute_indexes: Compute spectral indexes from a PRISMA he5 file (or a file...

Description Usage Arguments Details Value Note Author(s)

View source: R/pr_compute_indexes.R

Description

function used to compute spectral indexes, given the indexes formula

Usage

1
2
3
4
5
6
7
8
pr_compute_indexes(
  in_file,
  out_file,
  out_format = "GTiff",
  indexes,
  cust_indexes = NULL,
  overwrite = FALSE
)

Arguments

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

Details

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

Value

NULL - new raster file saved in out_filename

Note

License: GPL 3.0

Author(s)

Lorenzo Busetto, phD (2017)

Luigi Ranghetti, phD (2017)


lbusett/prismaread documentation built on Feb. 22, 2022, 7:33 p.m.