toa_refsun: toa_refsun

Description Usage Arguments Details Value References Examples

View source: R/landsat_preprocessing.R

Description

Convert the DN contained in a Landsat band to TOA reflectance.

Usage

1
toa_refsun(x, band = NULL, mult = NULL, add = NULL, sune = NULL)

Arguments

x

Image band in DN to be converted.

band

Character. Number of the Landsat band to convert.

mult

Reflectance multiplicative band rescaling factor.

add

Reflectance additive band rescaling factor.

sune

Scene center sun elevation angle

Details

Convert the DN of a Landsat optical band to TOA reflectance employing the reflectance multiplicative and additive band rescaling factors with a correction for the sun angle. If band is specified, the function reads the metadata file (.txt) directly from the work directory (folder containing bands as downloaded from NASA EarthExplorer) and automatically extracts the multiplicative and additive rescaling factors and the scene sun elevation angle. These parameters can be manually defined employing mult, add and sune parameters. In this case, band is ignored.

Value

Raster layer with TOA reflectance values corrected for the sun angle.

References

USGS. (2019). Landsat 8 data users handbook version 4. USGS Earth Resources Observation and Science (EROS). Sioux Falls, South Dakota. USA. 106.

Examples

1
2
3
4
5
6
7
8
## Not run: # For Landsat 8 band 4 defining band and extracting scaling
factors from metadata
toarefsunB4 <- toa_refsun(B4, band = "4")

# For Landsat 8 band 4 defining manually the multiplicative and
additive scaling factors and scene sun elevation angle
toarefsunB4 <- toa_refsun (B4, mult = 0.00033420, add = 0.1, sune = 37.22752222)
## End(Not run)

RichardLemoine/LSTtools documentation built on Oct. 19, 2020, 12:50 a.m.