View source: R/water_RSfunctions.R
| loadImage | R Documentation |
Loads Landsat 7, 8 or 9 Level-1 bands (digital numbers), or MODIS bands,
from a folder. Landsat file names can follow the Collection 1/2 naming
(e.g. LC08_L1TP_232083_20160209_20200907_02_T1_B2.TIF, any tier) or
the pre-Collection naming (e.g. LC82320832016040LGN00_band2.tif);
Level-2 surface reflectance files are skipped (use loadImageSR()). If the
folder holds more than one image, the first one is used, with a warning.
For Landsat, the fill value (DN 0) is set to NA.
loadImage(path = getwd(), sat = "auto", aoi)
path |
folder where band files are stored |
sat |
"L7" for Landsat 7, "L8" for Landsat 8, "L9" for Landsat 9, "MODIS" for MODIS or "auto" to detect the Landsat satellite from the SPACECRAFT_ID of an MTL file in path or, failing that, from the Landsat file names |
aoi |
Optional area of interest (e.g. from createAoi()) to crop the image. If missing, the image is not cropped |
SpatRaster in digital numbers. Landsat 8/9: layers B, G, R, NIR, SWIR1, SWIR2, Thermal1 and Thermal2 (bands 2 to 7, 10 and 11). Landsat 7: B, G, R, NIR, SWIR1, SWIR2 and Thermal1 (bands 1 to 5, 7 and 6 low gain). MODIS: R, NIR, B, G, SWIR1, SWIR2, SWIR3 (reflectance), LST (K) and Time (hours).
Guillermo Federico Olmedo
David Fonseca-Luengo
R. G. Allen, M. Tasumi, and R. Trezza, "Satellite-based energy balance for mapping evapotranspiration with internalized calibration (METRIC) - Model" Journal of Irrigation and Drainage Engineering, vol. 133, p. 380, 2007
Other remote sensing support functions:
calcRadiance(),
calcSR(),
calcTOAr(),
cfmask(),
loadImageSR()
# Landsat 8 Level-1 example bands (digital numbers)
image.DN <- loadImage(path = system.file("extdata", package = "water"), sat = "L8")
image.DN
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.