I am having trouble cloud-screening Landsat 8 imagery in Google Earth Engine for a country with high cloud cover throughout the year.
I have tried various techniques but unfortunately there is a substantial amount of cloud in all imagery and the techniques given in the Earth Engine Help are not quite cutting it.
I've tried simply requesting the median of each band as given here but clouds remain. The Google Earth Engine SimpleCloudScore script works much better but leaves some gaps. The code that has worked the best for me is the code given by Nicholas Clinton in this answer. Here it is in full:
var ic = ee.ImageCollection("LANDSAT/LC08/C01/T1_RT_TOA");
// A polygon representing the roi.
var geometry = ee.Geometry.Polygon(
[[[-121.85897778617999, 37.70881514186375],
[-121.83975284337708, 37.76202899390253],
[-121.94137041100134, 37.759857750255144]]]);
var c = ic.filterBounds(geometry);
var withCloudiness = c.map(function(image) {
var cloud = ee.Algorithms.Landsat.simpleCloudScore(image).select('cloud');
var cloudiness = cloud.reduceRegion({
reducer: 'mean',
geometry: geometry,
scale: 30,
});
return image.set(cloudiness);
});
var filteredCollection = withCloudiness.filter(ee.Filter.lt('cloud', 10));
print(filteredCollection);
This issue is that this only brings up entire images for a small ROI or single point of interest.
What would be ideal is if this code could be edited so that it ran the same calculation per pixel, selecting the most cloud-free image for each individual pixel within the time range given. I've tried combining it with the SimpleCloudScore script so that a function calls back to the extended simpleCloudScore algorithm in Richard's code but no luck so far.
Of course, if anybody has any completely different approaches to suggest it would be great to hear them also.
I was hoping this question could produce useful answers to all new users building up their scripts for cloud-screening in Earth Engine.