3

I want to estimate cloud cover of each image in an image collection + would like to print out results for every image. I can see that cloud cover estimates are available for each image in their properties. But how to extract them to one table?

I am using this data:

//Load data collection
var l7r = ee.ImageCollection("LANDSAT/LE7_L1T")
.filter(ee.Filter.eq('WRS_PATH', 144))
.filter(ee.Filter.eq('WRS_ROW', 51));
4

I found this answer by Christoph at the forum for Google Earth Engine Developers (https://groups.google.com/forum/#!forum/google-earth-engine-developers).

var getCloudScores = function(img){
    //Get the cloud cover
    var value = ee.Image(img).get('CLOUD_COVER');
    return ee.Feature(null, {'score': value})
};

var results = landsat.map(getCloudScores);
print(Chart.feature.byFeature(results);

Or you can export data to drive:

// Export data to drive
Export.table.toDrive({
  collection: results, 
  description: 'File_Name',
  fileFormat: 'CSV'
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.