我已经在GEE中创建了一个Image集合,并且借助一个函数,我计算了NDVI索引并将其映射为以NDVI为波段创建另一个集合。
现在,我想用整个图像集合的NDVI波段创建一个堆叠图像。所以应该像NDVI_1,NDVI_2等...
我怎样才能做到这一点?我正在粘贴显示到目前为止我拥有的NDVI集合的代码
// Collection of Images
var collection = ee.ImageCollection([feb1,feb2,Mar2,April1, April2, May1, May2, Jun1,Jun2,
July2, Aug2, Sep1, Sep2,Oct1, Oct2, Nov1, Nov2, Dec1, Dec2 ]);
//Using the following function,NDVI of the entire collection is computed
var indicesS2 = function(scene)
{ var ndvi = scene.normalizedDifference(['B8', 'B4']).rename('NDVI');
var image = ee.Image()
.set('system:time_start', ee.Date(scene.get('system:time_start')));
return image.addBands([ndvi]).clip(Sheikhupura);
};
var NDVIcollection = collection.map(indicesS2);
print (NDVIcollection, 'NDVI');