// Load a Landsat TOA image.
var image = ee.Image('LANDSAT/LC08/T1_TOA/LC08_044034_20140318');
// Create an arbitrary rectangle.
var region = ee.Geometry.Rectangle(-122.2806, 37.1209, -122.0554, 37.2413);
// Get a dictionary of means in the region.
var means = image.reduceRegion({
reducer: ee.Reducer.mean(),
geometry: region,
scale: 30
});
// Make a feature without geometry and set the properties to the dictionary of means.
var feature = ee.Feature(null, means);
// Wrap the Feature in a FeatureCollection for export.
var featureCollection = ee.FeatureCollection([feature]);
// Export the FeatureCollection.
Export.table.toDrive({
collection: featureCollection,
description: 'exportTableExample',
fileFormat: 'CSV'
});
Google earth engine 将reducer之后的输出成excel存储到Google Driver
这段代码演示了如何使用Google Earth Engine库加载Landsat TOA图像,定义一个矩形区域,计算该区域内图像的平均值,并将结果作为特征集合导出到CSV文件。这涉及到遥感图像处理和地理信息系统操作。
摘要由CSDN通过智能技术生成