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));

1 Answer 1

5

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 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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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