maskClouds#

clouds.maskClouds(src, method='cloud_prob', prob=60, maskCirrus=True, maskShadows=True, scaledImage=False, dark=0.15, cloudDist=1000, buffer=250, cdi=None)#

Mask clouds and shadows in an image or image collection.

Parameters:
  • src (Union[ee.Image, ee.ImageCollection]) – Image or ImageCollection to mask

  • method (str) – Method used to mask clouds (‘cloud_prob’, ‘cloud_score+’, or ‘qa’)

  • prob (Union[int, float]) – Cloud probability threshold (0-100)

  • maskCirrus (bool) – Whether to mask cirrus clouds

  • maskShadows (bool) – Whether to mask cloud shadows

  • scaledImage (bool) – Whether pixel values are scaled to [0,1]

  • dark (float) – NIR threshold for shadow detection

  • cloudDist (int) – Maximum distance in meters for shadow detection

  • buffer (int) – Distance in meters to dilate cloud objects

  • cdi (Optional[float]) – Cloud Displacement Index threshold

Returns:

Cloud-shadow masked image or image collection

Return type:

Union[ee.Image, ee.ImageCollection]