【发布时间】:2021-10-23 01:27:37
【问题描述】:
我想从 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)
})
【问题讨论】:
标签: image collections google-earth-engine