I have an image collection with 35 years of imagery. Each image in the collection represents a measure of annual NDVI for each year from 1985 to 2019. I want to take this image collection and create a single image where there are 35 bands, each band representing NDVI_1985... to NDVI_2019.

I think it would something like this:

var ndvi_collection = ndvi_coll.select(['nd_p95_rescaled','time'],['NDVI','time']);
print(ndvi_collection, "ndvi collection");

var multiband = ndvi_collection.iterate(function(image, result) {
  return ee.Image(result).addBands(image.select(['NDVI']));    
    }, empty);

The issue is that I want to carry over information about year in the band names or retain the 'time' band for each year as well.

Here is the link to the entire GEE script: https://code.earthengine.google.com/a7fcc54f529ca1a43743f90b603a85b7


You can convert an ImageCollection to an Image using the function .toBands(). For example:

var ndvi_image = ndvi_collection.select('NDVI').toBands();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.