Learn R Programming

nightmares (version 0.0.2)

ref_oli: Reflectance Landsat OLI

Description

This function convert Digital Numbers to TOA Reflectance using the rescaling coefficients in the MTL file.

Usage

ref_oli(x, sun.elev)

Arguments

x

A raster stack containing the first seven Landsat OLI bands.

sun.elev

Sun elevation angle in degrees.

Value

A raster layer object with the Top of atmosphere planetary reflectance.

References

https://www.usgs.gov/core-science-systems/nli/landsat/using-usgs-landsat-level-1-data-product.

Examples

Run this code
# NOT RUN {
library(raster)
path_files <- system.file("extdata/", package="nightmares")
x <- stack(list.files(path_files,".tif", full.names=TRUE))
ref_oli(x, 67.97)
ref_oli(x, sun.elev=67.97)

# }

Run the code above in your browser using DataLab