I want to read an imageCollection, reduce all images in the collection by the region. and save the result.
However, when I save the result, the properties
of the feature Collection
is gone. It does not get saved.
Any suggestion?
// Load four 2012 NAIP quarter quads, different locations.
var naip2012 = ee.ImageCollection('USDA/NAIP/DOQQ')
.filterBounds(ee.Geometry.Rectangle(-71.17965, 42.35125, -71.08824, 42.40584))
.filterDate('2012-01-01', '2012-12-31');
var reduced = naip2012.map(function(image){
return image.reduceRegions({
collection:ee.Feature(ee.Geometry.Rectangle(-71.17965, 42.35125, -71.08824, 42.40584)),
reducer:ee.Reducer.mean(),
scale: 30
});
});
reduced = reduced.flatten();
print(reduced);
Export.table.toDrive({
collection: reduced,
description:'properties_gone_by_saving',
fileFormat: 'CSV'
});