I need to convert my ee.Image which has 20 bands, to an ee.ImageCollection, where the information in each band is now stored in a single-band image. I've used the .toBands() function in the past: I am essentially looking for the reverse.

For example, in one ee.Image, My bands are named as follows:

"Nycticeius_humeralis" ....

How would I go about this?

1 Answer 1


Map over the list of bands to produce images, then cast.

var bands = image.bandNames()
var list = bands.map(function(n) { return image.select([n]) })
var collection = ee.ImageCollection.fromImages(list)
  • that worked. Perfect, thanks so much Noel!
    – BeEsKnees
    Commented Jan 31, 2023 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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