MODIStsp_addindex: Add custom spectral indexes

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/MODIStsp_addindex.R

Description

Function used to add a user-defined Spectral Index to the default list of computable spectral indexes. Execution without the GUI (i.e., to add a new index from a script) is also possible (see examples).

Usage

1
2
3
4
5
6
MODIStsp_addindex(
  new_indexbandname = "",
  new_indexfullname = "",
  new_indexformula = "",
  new_indexnodata_out = "32767"
)

Arguments

new_indexbandname

character short name (acronym) of the new spectral index (Ignored if gui == TRUE), Default: NULL

new_indexfullname

character extended name (acronym) of the new spectral index (Ignored if gui == TRUE), Default: NULL

new_indexformula

character string containing the formula of the new spectral indexes (Ignored if gui == TRUE). Variables allowed in the formula are the names of the bands: b1_Red, b2_NIR, b3_Blue, b4_Green, b5_SWIR, b6_SWIR and b7_SWIR. Default: NULL

new_indexnodata_out

character nodata value to use for rasters containing the new index

Details

Value

The function is called for its side effects. On success, the MODIStsp_indexes.json is modified so to allow computation of the additional indexes.

Note

License: GPL 3.0

Author(s)

Lorenzo Busetto, phD (2014-2017)

Luigi Ranghetti, phD (2015) luigi@ranghetti.info

See Also

MODIStsp_resetindexes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Run the GUI to interactively define a new index
 ## Not run: 
 MODIStsp_addindex()
## End(Not run)

# Define the new index in non-interactive execution

## Not run: 
MODIStsp_addindex(new_indexbandname = "SSI",
  new_indexfullname = "Simple Useless Index",
  new_indexformula = "b2_NIR+b1_Red")

## End(Not run)

MODIStsp documentation built on Jan. 13, 2021, 11:18 a.m.