Skip to contents

Mask a raster variable using another raster variable as the mask.

Usage

mask(x, ...)

# S4 method for Satellite
mask(x, variable1, variable2 = "cloudmask")

Arguments

x

S4 object. The product of interest.

...

extra arguments.

variable1

character. The variable to be masked.

variable2

character. The variable to be used as a mask.

Value

nothing. The data are saved directly in the cronus database.

Examples

if (FALSE) {
# Define required variables
region <- Region(name = "nebraska", type = "us state",
                 div = c(country = "United States", state = "Nebraska"))
date <- date_seq("2002-01-01", "2002-12-31")

## MOD09GA

# Create objects
x <- new("Mod09ga", region = region, date = date)

# Apply a cloud mask on NDVI
mask(x, "ndvi", "cloudmask")
}