I have loaded a collection of landsat8 images bounded by sudanmaps. My goal is to filter out all images that have cloud in it. I tried the method given in Filter Landsat images base on cloud cover over a region of interest but I am getting following error
ImageCollection (Error)
Error in map(ID=LC08_170055_20130622):
Image.reduceRegion: Too many pixels in the region. Found 700331286,
but only 10000000 allowed.
I guess this error is because of some threshold that limits the capability of google earth engine or maybe I am doing something wrong. Is there any alternate way to filter out the cloud images so as not to cross any threshold for google earth engine. Also, can we filter images based on BQA band ?. Below is my code: var sudanmap = ee.FeatureCollection("south_sudan_adm0");
var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterDate('2013-06-01', '2018-06-01').filterBounds(sudanmap);
var withCloudiness = l8.map(function(image) {
var cloud =
ee.Algorithms.Landsat.simpleCloudScore(image).select('cloud');
var cloudiness = cloud.reduceRegion({
reducer: 'mean',
geometry: S_sudan,
scale: 30,
});
return image.set(cloudiness);
});
var filteredCollection = withCloudiness.filter(ee.Filter.lt('cloud', 10));
print(filteredCollection);