View source: R/MODIStsp_addindex.R
MODIStsp_addindex | R Documentation |
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).
MODIStsp_addindex(
new_indexbandname = "",
new_indexfullname = "",
new_indexformula = "",
new_indexnodata_out = "32767"
)
new_indexbandname |
|
new_indexfullname |
|
new_indexformula |
|
new_indexnodata_out |
|
The function asks the user to provide the info related to the new desired Spectral Index, checks for correctness of provided information (e.g., correct bandnames, computable formula, etc...). If the index is legit, it modifies the MODIStsp_addindex.json file so to allow computation of the additional index within MODIStsp for all products containing the required reflectance bands.
To remove all custom-added spectral indexes, run MODIStsp_resetindexes()
The function is called for its side effects. On success, the MODIStsp_indexes.json is modified so to allow computation of the additional indexes.
License: GPL 3.0
Lorenzo Busetto, phD (2014-2017)
Luigi Ranghetti, phD (2015)
MODIStsp_resetindexes
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.