calcTopoCorr: Correct for topographic effects.

calcTopoCorrR Documentation

Correct for topographic effects.

Description

Correct for topographic effects.

Usage

## S4 method for signature 'Satellite'
calcTopoCorr(x, mask = TRUE)

## S4 method for signature 'RasterStackBrick'
calcTopoCorr(x, hillsh, cloudmask = NULL, ...)

## S4 method for signature 'RasterLayer'
calcTopoCorr(x, hillsh, cloudmask = NULL, ...)

Arguments

x

Satellite or Raster* object.

mask

logical. If TRUE, the cloudmask from the Satellite object (if available) will be considered in the regression model.

hillsh

A RasterLayer created with hillShade.

cloudmask

A RasterLayer in which clouds are masked with NA values, passed to mask.

...

Additional arguments passed to writeRaster.

Details

The method of Civco (1989) is applied on atmospherically corrected bands (if not already available in the Satellite object, calcAtmosCorr is performed with its default settings.): First, an analytical hillshade image is created based on a DEM and sun elevation and sun zenith information from the metadata. A regression between the hillshade (independent variable) and each channel is then calculated with consideration of a cloudmask (if available). The regression coefficents are used to calibrate the hillshade raster (for each channel individually). Finally, the calibrated hillshade image is subtracted from the corresponding channel and the mean value of the channel is added.

Value

If x is a Satellite object, a Satellite object with added, topographic corrected layers; if x is a raster::Raster* object, a raster::Raster* object with converted layer(s).

References

CIVCO, D.L. (1989): Topographic normalization of Landsat Thematic Mapper digitalimagery. Photogrammetric Engineering & Remote Sensing, 55, 1303-1309.

Examples

path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC08*.TIF"), full.names = TRUE)
sat <- satellite(files)

## dem

files_dem <- list.files(path, pattern = "DEM", full.names = TRUE)
DEM <- raster(files_dem)

sat <- addSatDataLayer(sat, data = DEM, info = NULL, bcde = "DEM", in_bcde="DEM")

## Not run: 
sat <- calcTopoCorr(sat)

## End(Not run)

satellite documentation built on May 29, 2024, 6:16 a.m.