Skip to main content
12 votes

Filtering Landsat images base on cloud cover over region of interest

It's going to be something like this, but you'll need to play with the threshold (10 in this example) to meet your needs. Watch out for ROIs that overlap a scene's footprint, but do not contain any ...
Nicholas Clinton's user avatar
12 votes

Counting number of unmasked pixels per image in collection using Google Earth Engine

To get to your end goal of filtering your clipped image collection by 10% or less cloud cover, I would write a function that: counts the number of unmasked pixels in the image counts the number of ...
korndog's user avatar
  • 1,058
9 votes

Sentinel Cloud-free Collection Google Earth Engine Code Editor

Here is an example of cloud masking for Sentinel-2: var s2 = ee.ImageCollection("COPERNICUS/S2"); var pt = ee.Geometry.Point([-122.41653442382812, 37.77180027337861]); var cloudyImage = ee.Image('...
Nicholas Clinton's user avatar
9 votes
Accepted

Using cloud confidence to create cloud mask from Landsat 8 BQA?

Here is a more flexible approach that can handle dual (or larger) bit patterns. The bit shifts are performed server-side, using the ee.Image.rightShift() and ee.Image.mod() methods. var RADIX = 2; //...
Tyler Erickson's user avatar
9 votes

Creating Cloud free images out of a MOD09A1 MODIS image in GEE?

I haven't actually worked with MODIS, but it looks like most other image collections in EE. The images contains a QA band, StateQA, with data about clouds/shadow/etc. The catalog contains a ...
Daniel Wiell's user avatar
  • 14.4k
7 votes

Creating Sentinel-2 cloud free, cloud-shadow free composite or scene on Google Earth Engine (GEE)?

As far as I know, Sentinel 2 has no computed cloud-shadow mask, so I ommit that part. But for the rest, I think you should at least mask out clouds, and filter a little. I've made public a repo I ...
Rodrigo E. Principe's user avatar
7 votes
Accepted

Apply cloud mask to sentinel 2 image in SNAP

You can use Raster > Mask > Land/Sea Mask and choose Use vector as mask and the corresponding cloud band in the dropdown menu.
AndyB's user avatar
  • 812
7 votes

What is the difference between .filterMetadata(), ee.Filter.lte() and .sort() in google earth engine?

Approach 1: all images in the collection within bounds that have less than 70% Approach 2: keeps all the images within the bounds, but sorts them by descending order (most cloudy first) Approach 3: ...
Sean Roulet's user avatar
  • 2,220
6 votes

Removing cloud from Sentinel 2A imagery?

In optical remote sensing in the visible spectrum you cannot see through clouds. So there is nothing you can do, except to wait for images without clouds. Cloud masks are (as far as i know) used to ...
til_b's user avatar
  • 5,154
6 votes
Accepted

Cloud Shadow Removal for Sentinel-2

I usually use the following to obtain clear sky composites: // Generate 'clear_sky' Sentinel-2 images using SCL. var s2_clear_sky = function(image){ var scl = image.select('SCL'); var ...
sermomon's user avatar
  • 994
5 votes
Accepted

Do clouds reflect NIR/Red bands

Yes, it affects the values of NDVI, and it may not give the desired results sometimes. Information from Wikipedia: Normalized Difference Vegetation Index provides some details about the effects of ...
ahmadhanb's user avatar
  • 41.1k
5 votes
Accepted

Google Earth Engine. How to get cloud cover score for each image in image collection?

I found this answer by Christoph in the Google Earth Engine Developers Forum (https://groups.google.com/forum/#!forum/google-earth-engine-developers). var getCloudScores = function(img){ //Get ...
Valerija's user avatar
  • 121
5 votes
Accepted

Getting rid of clouds from Landsat using ArcMap?

Clouds are serious problem in optical remote sensing, but using other images from different dates to substitute the regions with clouds will reduce the accuracy of your work, especially if you are ...
ahmadhanb's user avatar
  • 41.1k
5 votes
Accepted

AWS Sentinel 2 incorrect cloudy pixel percentage

This a known anomaly - see anomaly #29 in the Sentinel 2 data quality report. https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-2/data-quality-report
user107414's user avatar
4 votes

Using cloud confidence to create cloud mask from Landsat 8 BQA?

You need to know the bit pattern, in this case, pattern for bit 4 is 16 (2 at the power of 4). So: var cloudmaskL8 = function(image) { var qa = image.select('BQA'); var pattern = ee.Number(2)....
Rodrigo E. Principe's user avatar
4 votes

Descartes Labs Platform scenes.search within less cloudy periods

There are a few ways to search or filter for cloud-free imagery over a date range. For some products (including Sentinel-2), there is a cloud_fraction property that can be used to filter out cloudy ...
Jay Carlson's user avatar
4 votes
Accepted

How to filter Open Data Cube satellite data by cloud coverage similar to the Sentinel API?

Yes, once you have Sentinel-2 data indexed into an Open Data Cube instance you can use some existing tools to filter by cloud percentages: for example, the load_ard function from dea-tools allows you ...
Robbi Bishop-Taylor's user avatar
4 votes
Accepted

Google Earth Engine: Understanding Landsat 7 Collection 2 QA_PIXEL, bitwiseAnd() for cloud mask

Bits 1, 3, and 4 look correct, according to the User's Guide, but you haven't scaled the data appropriately. The scaling factors are different for C2. https://www.usgs.gov/core-science-systems/nli/...
Noel Gorelick's user avatar
3 votes

Cloud cover percentage in Google Earth Engine

You can check out this script and the docs // A mapping from a common name to the sensor-specific bands. var LC8_BANDS = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B10']; var STD_NAMES = ['...
RutgerH's user avatar
  • 3,335
3 votes
Accepted

Apply a cloud mask to a Landsat8 collection in Google Earth Engine - time series

code2 works. Adapt it properly with right parameters (Always check metadata): var l8_mayo = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA') .filterDate('2000-01-01', '2018-12-31') .filter(ee.Filter....
aldo_tapia's user avatar
  • 13.7k
3 votes

Sentinel Cloud-free Collection Google Earth Engine Code Editor

Here is a comprehensive tutorial on how to mask clouds and their shadows over an entire Sentinel-2 image collection: https://developers.google.com/earth-engine/tutorials/community/sentinel-2-...
David Kinsler's user avatar
3 votes

Filtering Landsat images base on cloud cover over region of interest

There is standard example in the code editor that is pretty close to what you want. https://code.earthengine.google.com/1be28850c6c7880d8fcd5f1e0a808986 // SimpleCloudScore, an example of computing a ...
intotecho's user avatar
  • 902
3 votes

AWS Sentinel 2 incorrect cloudy pixel percentage

Seninel 2's Technical documentation Cloud Masks It appears to be calculated based on reflectance, however there is a known issue as mentioned Two products have been found affected by this ...
whyzar's user avatar
  • 12.1k
3 votes

How to remove clouds with the cf_mask.tif file provided from landsat 8 surface reflectance data?

The cf_mask file identifies cloud (Pixel value 4), cloud shadow (2), snow (3), and water (1) pixels. Assuming you only want "clear land" pixels (0) you can use the Con tool with the following options ...
Tom Higginbottom's user avatar
3 votes
Accepted

Cloud mask for worldview

This report uses the Forest Discrimination Index (FDI), described by Bunting and Lucas (2006) to create a mask. Essentially, the FDI for worldview2 is NIR2 - (RE + Blue), or band8 - (band6 + band2). ...
user44796's user avatar
  • 1,925
3 votes

Counting number of unmasked pixels per image in collection using Google Earth Engine

Similar logic to the previous answer but in a function call. geom could be any region in the image, or image.geometry() for the whole image. /** * return the percentage of masked pixels in an image ...
intotecho's user avatar
  • 902
3 votes
Accepted

Combining single cloud-masked images using Google Earth Engine

The problem with the approach you tried is that image1.add(image2), a math operation on exactly two images, is only defined/unmasked where both input images are unmasked. Also notice that even if it ...
Kevin Reid's user avatar
  • 10.4k
3 votes
Accepted

How can I create a 10 day composite image of the snow cover extent using QGIS?

It must be the mean SCE for each pixel over the 10-day period. Raster values may or may not indicate snow (they could be land/water etc.) An approach could be: Remove all non-snow values (water, land,...
wingnut's user avatar
  • 2,110
3 votes
Accepted

How to retrieve Sentinel images without significant cloud coverage using Python

I think the thing that is tripping you up, is the sentinel:valid_cloud_cover property. Unfortunately I didn't find any documentation on where exactly that flag comes from, but it acts as you would ...
JonasV's user avatar
  • 3,784
2 votes

Removing cloud from Sentinel 2A imagery?

The only alternative when no cloud-free images are available, is radar. You could try find some Sentinel-1 scenes, that are freely available.
Sotiris Valkaniotis's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible