ee_Image_maskClouds | R Documentation |
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.
`ee$Image$Extra_maskClouds(x, ...)`
x |
An ee$Image to be processed for cloud and shadow masking. |
... |
Additional arguments for cloud and shadow masking. See details for more information. |
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.
ee$Image with a Cloud-shadow masked image.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.