View source: R/water_RSfunctions.R
| loadImageSR | R Documentation |
Loads Landsat 8 or 9 Collection 2 Level-2 surface reflectance bands 2 to 7
(*_SR_B2.TIF to *_SR_B7.TIF) from a folder, scaled as
DN * 0.0000275 - 0.2. Pixels where any band is fill (0) or outside the
valid range of the product (7273 to 43636 DN, reflectance 0 to 1) are set
to NA in all layers, with a message giving the number of out-of-range
pixels: slightly negative blue reflectance over dense crops is masked too.
All six bands are required.
If *_ST_B10.TIF is present it is added as the last layer, "Band_10",
in Kelvin (DN * 0.00341802 + 149, fill value 0 set to NA).
It can be passed as surf.temp to METRIC.EB(), METRIC.Rn() or METRIC.G().
Landsat 7 Level-2 products are not supported (different band numbers).
loadImageSR(path = getwd(), aoi)
path |
folder where band files are stored |
aoi |
Optional area of interest (e.g. from createAoi()) to crop the image. If missing, the image is not cropped |
SpatRaster with surface reflectance (unitless) in layers B, G, R,
NIR, SWIR1 and SWIR2 (Landsat 8/9 bands 2 to 7). If *_ST_B10.TIF is
present, a seventh layer Band_10 with surface temperature (K) is added.
Guillermo Federico Olmedo
Other remote sensing support functions:
calcRadiance(),
calcSR(),
calcTOAr(),
cfmask(),
loadImage()
scene_folder <- system.file("extdata", "L8_C2", package = "water")
image.SR <- loadImageSR(path = scene_folder)
names(image.SR)
plot(image.SR[["NIR"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.