Topographic Illumination Correction
account and correct for changes in illumination due to terrain elevation.
topCor(img, dem, metaData, solarAngles = c(), method = "C", stratImg = NULL, nStrat = 5, illu, ...)
img |
Raster*. Imagery to correct |
dem |
Raster*. Either a digital elevation model as a RasterLayer or a RasterStack/Brick with pre-calculated slope and aspect (see terrain) in which case the layers must be named 'slope' and 'aspect'.
Must have the same dimensions as |
metaData |
Character, ImageMetaData. Either a path to a Landsat meta-data file (MTL) or an ImageMetaData object (see readMeta) |
solarAngles |
Numeric vector containing sun azimuth and sun zenith (in radians and in that order). Not needed if metaData is provided |
method |
Character. One of c("cos", "avgcos", "minnaert", "C", "stat", "illu"). Choosing 'illu' will return only the local illumination map. |
stratImg |
RasterLayer to define strata, e.g. NDVI. Or the string 'slope' in which case stratification will be on |
nStrat |
Integer. Number of bins or quantiles to stratify by. If a bin has less than 50 samples it will be merged with the next bin. Only relevant if |
illu |
Raster*. Optional pre-calculated ilumination map. Run topCor with method="illu" to calculate an ilumination map |
... |
arguments passed to |
For detailed discussion of the various approaches please see Riano et al. (2003).
The minnaert correction can be stratified for different landcover characteristics. If stratImg = 'slope'
the analysis is stratified by the slope,
i.e. the slope values are divided into nStrat
classes and the correction coefficient k is calculated and applied separately for each slope class.
An alternative could be to stratify by a vegetation index in which case an additional raster layer has to be provided via the stratImg
argument.
Riano et al. (2003) Assessment of different topographic correction in Landsat-TM data for mapping vegetation types. IEEE Transactions on Geoscience and Remote Sensing.
## Load example data metaData <- system.file("external/landsat/LT52240631988227CUB02_MTL.txt", package="RStoolbox") metaData <- readMeta(metaData) lsat <- stackMeta(metaData) data(srtm) ## Minnaert correction, solar angles from metaData lsat_minnaert <- topCor(lsat, dem = srtm, metaData = metaData, method = "minnaert") ## C correction, solar angles provided manually lsat_C <- topCor(lsat, dem = srtm, solarAngles = c(1.081533, 0.7023922), method = "C")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.