cloudFill: Cloud filling utilities

Description Usage Arguments Author(s)

View source: R/cloudFill.R

Description

Uses the MODIS VCF product to fill the remaining cloud gaps in the Landsat VCF product. The function takes care of downloading the MODIS data, in case they are not present locally.

Usage

1
2
cloudFill(x, th, year, ModisDir, alpha = FALSE, mask = c(210, 211),
  filename, ...)

Arguments

x

Character. Filename of a raster layer.

th

Numeric. The gap percentage threshold [0,1] above which gap filling will be performed

year

Numeric. Year of the data

ModisDir

Character. Directory where the MODIS VCF data are stored, or will be downloaded to.

alpha

Logical or character. If an alpha layer (providing location of the gaps) is to be used, alpha is the filename of that raster layer.

mask

Numeric. Value(s) to be masked.

filename

Character. Output filename.

...

Additional arguments as for writeRaster

Author(s)

Loic Dutrieux

## Not run: pr <- getPR('Belize') pr <- pr$PR[1] dir = tempdir() downloadPR(pr, year=2000, dir=dir) unpackVCF(pr=pr, year=2000, searchDir=dir, dir=sprintf(' x <- list.files(sprintf(' filename <- sprintf(' ModisDir <- tempdir() cloudFill(x=x, th=0.005, ModisDir=ModisDir, filename=filename) #Visualize the output r0 <- raster(x) x[x > 100] <- NA plot(r0) plot(r1 <- raster(filename), add=TRUE) ## End(Not run)
loicdtx/VCF documentation built on May 21, 2017, 2:37 p.m.