clouds: Create a cloud mask from Landsat bands 1 and 6.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/clouds.R

Description

Uses Landsat band 1 and band 6 to identify clouds and create a cloud mask.

Usage

1
clouds(band1, band6, level = 0.0014, buffer=5)

Arguments

band1

File name or image file (matrix, data frame, or SpatialGridDataFrame) for Landsat band 1.

band6

File name or image file (matrix, data frame, or SpatialGridDataFrame) for Landsat band 6.

level

Threshold level for cloud/noncloud decision. The default threshold is appropriate for reflectance and temperature values, and must be adjusted for use with DN.

buffer

Pixel buffer size to expand around thresholded cloud areas.

Details

Clouds are reflective (high) in band 1 and cold (low) in band 6, so the ratio of the two bands is high over clouds. The ratio must be adjusted for data type, whether reflectance, radiance, or DN.

Value

Returns a cloud mask in the same format as band1. Clouds are 1; noncloud areas are NA. Cloud areas are expanded by buffer pixels to ensure that cloud edges are captured.

Author(s)

Sarah Goslee

References

This function is loosely based on: Martinuzzi, S., Gould, W.A., Ramos Gonzales, O.M. 2007. Creating Cloud-Free Landsat ETM+ Data Sets in Tropical Landscapes: Cloud and Cloud-Shadow Removal. USDA Forest Service General Technical Report IITF-GTR-32.

Examples

1
2
3
4
5
6
7
data(july1)
data(july61)
july.cloud <- clouds(july1, july61)

par(mfrow=c(1,2))
image(july1)
image(july.cloud)

landsat documentation built on Dec. 19, 2019, 5:06 p.m.

Related to clouds in landsat...