powered by
This function convert Digital Numbers to TOA Reflectance using the rescaling coefficients in the MTL file.
ref_oli(x, sun.elev)
A raster stack containing the first seven Landsat OLI bands.
Sun elevation angle in degrees.
A raster layer object with the Top of atmosphere planetary reflectance.
https://www.usgs.gov/core-science-systems/nli/landsat/using-usgs-landsat-level-1-data-product.
# 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