Description Usage Arguments Details Value References Examples
View source: R/landsat_preprocessing.R
Convert the DN contained in a Landsat band to TOA reflectance.
1 | toa_refsun(x, band = NULL, mult = NULL, add = NULL, sune = NULL)
|
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 |
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.
Raster layer with TOA reflectance values corrected for the sun angle.
USGS. (2019). Landsat 8 data users handbook version 4. USGS Earth Resources Observation and Science (EROS). Sioux Falls, South Dakota. USA. 106.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.