export imagecollection in GEE



我想在GEE中导出imagecollection中的一个时间序列数据。我尝试使用map()来可视化和导出。我成功地将它们形象化了,但没能将它们输出。我得到了错误:导出的波段必须具有兼容的数据类型;发现不一致的类型:Float32和UInt16。(错误代码:3).有人知道什么是错误的代码和如何导出imagecollection?

这是我的代码。

// collect data
SEL_BANDS = ['green','red','blue','nir']
var Landsat = ee.ImageCollection(ee.ImageCollection('LANDSAT/LT4_L1T_TOA').select(L45_BANDS, STD_NAMES).map(function(img){return img.set('sensor','L4')})
.merge(ee.ImageCollection('LANDSAT/LT5_L1T_TOA').select(L45_BANDS, STD_NAMES).map(function(img){return img.set('sensor','L5')})
.merge(ee.ImageCollection('LANDSAT/LC8_L1T_TOA').select(L8_BANDS, STD_NAMES).map(function(img){return img.set('sensor','L8')}))))
.filterMetadata("CLOUD_COVER", "less_than", cloud)
.filter(ee.Filter.dayOfYear(start,end))
.filterBounds(catchment)
.select(SEL_BANDS)
.filterDate(startY, endY) 
.map(function(img) {return img.clip(catchment)});
//visualize and export
function addImage(image) {
var id = image.id
var image = ee.Image(image.id)
var image_c = image.clip(catchment)
Map.addLayer(image_c)
Export.image.toDrive({image_c: image, folder: "Folder", region: catchment, scale: 100, maxPixels: 400000000});
}
Landsat.evaluate(function(Landsat) {Landsat.features.map(addImage)
})

您只能使用您的函数导出一个图像。试试这个:

导出Google Earth Engine图像集合中的所有图像(Google Earth Engine API)

//图片集下载

var batch = require('users/fitoprincipe/geetools:batch')

batch.Download.ImageCollection.toDrive(YourCollection, 'test', {
scale: 30,
region: YourRegion
})

最新更新