Learn R Programming

satellite (version 0.1.0)

calcTopoCorr: Correct for topographic effects.

Description

Correct for topographic effects.

Usage

## S3 method for class 'Satellite':
calcTopoCorr(x, mask = TRUE)

## S3 method for class 'RasterStack': calcTopoCorr(x, hillsh, cloudmask = NULL)

## S3 method for class 'RasterLayer': calcTopoCorr(x, hillsh, cloudmask = NULL)

Arguments

x
Satellite object.
mask
Logical. If TRUE, the cloudmask from the Satellite object (if available) will be considered in the regression model.
hillsh
A raster::RasterLayer created with raster::hillShade.
cloudmask
A raster::RasterLayer in which clouds are masked with NA values.

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).

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.

References

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

Examples

Run this code
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC8*.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")

sat <- calcTopoCorr(sat)

Run the code above in your browser using DataLab