ee_Image_maskClouds: Masks clouds and shadows

View source: R/ee_Image.R

ee_Image_maskCloudsR Documentation

Masks clouds and shadows

Description

Masks clouds and shadows in an ee.Image. Valid just for Surface Reflectance products. This function may mask water as well as clouds for the Sentinel-3 Radiance product.

Usage

`ee$Image$Extra_maskClouds(x, ...)`

Arguments

x

An ee$Image to be processed for cloud and shadow masking.

...

Additional arguments for cloud and shadow masking. See details for more information.

Details

The ... argument can include the following:

  • methodCharacter. The method to mask clouds. Options: "cloud_prob" and "qa".

  • probNumeric. Cloud probability threshold, between 0 and 100. Valid for 'cloud_prob' method. Default 60.

  • maskCirrusLogical. Whether to mask cirrus clouds. Valid for 'qa' method. Default TRUE.

  • maskShadowsLogical. Whether to mask cloud shadows. Default TRUE.

  • scaledImageLogical. If TRUE, scale pixel values to <0,1>. Default FALSE.

  • darkNumeric. NIR threshold for potential cloud shadows, between 0-1. Default 0.15.

  • cloudDistNumeric. Max distance in meters to search for cloud shadows from cloud edges. Default 1000m.

  • bufferNumeric. Distance in meters to dilate cloud and shadow objects. Default 250m.

  • cdiNumeric. Cloud Displacement Index threshold, between <-1, 1>. Default NULL.

For more information on parameters and methods, refer to relevant cloud masking literature and tutorials.

Value

ee$Image with a Cloud-shadow masked image.

Examples

## Not run: 
library(rgee)
library(rgeeExtra)

ee_Initialize()
extra_Initialize()

img <- ee$ImageCollection("COPERNICUS/S2_SR") %>%
  ee$ImageCollection$first() %>%
  ee$Image$Extra_maskClouds(prob = 75,buffer = 300,cdi = -0.5)

names(img)

## End(Not run)

r-earthengine/rgeeExtra documentation built on Dec. 7, 2023, 9:03 p.m.