Element (Error)
Error in map(ID=0): Dictionary.get: Dictionary does not contain key: EVI2.
空影像(Image (0 bands))导致dictionary无法获取key;
无法设置属性
解决办法:删除空image
//composite Landsat578; note the year!
var yearList = ee.List.sequence(1984,1990);
1984 have no image
var compYearsLandsat = yearList.map(function(year){
var yearImgCol = Landsat578.filter(ee.Filter.calendarRange(year,year,'year')).select('EVI2')
var comYearImg = yearImgCol.mosaic()
var bandName = comYearImg.bandNames()//add code
return comYearImg.set('year',year).set('bandName',bandName)//add code
})
compYearsLandsat = ee.ImageCollection(compYearsLandsat).filter(ee.Filter.neq('bandName',[]));//add code