toa_ref: toa_ref

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_ref(x, band = NULL, mult = NULL, add = 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.

Details

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

Value

Raster layer with TOA reflectance values.

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
toarefB4 <- toa_ref(B4, band = "4")

# For Landsat 8 band 4 defining manually the multiplicative
and additive scaling factors
toarefB4 <- toa_ref(B4, mult = 0.00033420, add = 0.1)
## End(Not run)

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