custom.eqn: Make your own custom satellite image product

Description Usage Arguments Value Note References Examples

Description

If any product or index is not available in this package, you don't need to do it manually. This function intakes a custom formula & produced new product according to the formula. This function converts DN bands to corresponding TOA reflectance prior to the computation of user defined formula.

Usage

1
2
custom.eqn(directory = getwd(), cus.formula = "none", crop = "n",
  ext2crop = "none")

Arguments

cus.formula

Assign custom formula to be computed AS TEXT input (inside double quotes). To assign bands, ONLY USE BELOW DEFINED WORDS to indicate different bands in the formula.

nir for NIR (Near Infra-red) Top Of Atmosphere (TOA) reflectance band.

red for Red TOA reflectance band.

green for Green TOA reflectance band.

blue for Blue TOA reflectance band.

swir1 for SWIR-1 (Short Wave Infra-red -1)

swir2 for SWIR-2 (Short Wave Infra-red -2)

aero for Aerosol/coastal band (Only on Landsat OLI images)

ext2crop, crop, directory

Same as mentioned in arvi.

Value

Computed custom equation based product.

Note

1. FILENAMES OF ANY BAND FILES (*.TIF files) SHOULDN'T CHANGED.

2. Windows users should be careful while assigning directory. Use "/" to seperate folders not "\".

3. Earth-sun distance is calculated according to Epema (1992) if the value is not mentioned in the meta data (*MTL.txt) file.

4. Currently recommended ESUN values provided by USGS is used.

References

Epema G F (1992) Atmospheric condition and its influence on reflectance of bare soil surfaces in southern Tunisia. International Journal of Remote Sensing, 13(5), pp:853-868. doi:10.1080/01431169208904159.

Examples

1
2
3
4
5
6
7
8
9
library (raster)
library (rgdal)
# Finding the path of the sample satellite image directory.
# User may define paths directly like "/home/ur_folder" or "C:/ur_folder"
path <- system.file ("TM_sample", package = "ASIP")
# Input equation should be as text (inside double quotes)
eqn <- "(2 * red) + (nir/blue)"
shapefil <- paste0 (path, "/test.shp")
op <- custom.eqn (directory = path, cus.formula = eqn, crop = "y", ext2crop = shapefil)

ASIP documentation built on May 1, 2019, 10:17 p.m.

Related to custom.eqn in ASIP...