I input each image and band and, created an Image Collection in GEE. However, each band is as "b1" and I want to rename in order that I created the Image Collection respectively as b1,b2,b3 and b4 .

I am trying as:

var mar_03 = ee.ImageCollection("users/nayaraestrabis/collection")

and it didn't work. I am trying to do a function, but I don't know how to do using an Image Collection.

1 Answer 1


Since you're working over an ImageCollection, you must use map() to iterate name changing over the entire collection. This is an example with Landsat scenes:

var landsat = ee.ImageCollection("LANDSAT/LO08/C01/T1");



var changeNames = function(img){
  return img.select(['B1','B2','B3','B4'],['Band1','Band2','Band3','Band4']);

var landsatNewNames = landsat.map(changeNames);



I created changeNames() function for this purpose. Since this is an example, I only selected 4 bands changing names, consider selecting all bands needed

  • Thank you so much!! Your example helped me a lot =) Obrigada!!
    – Nayara E.
    Commented Mar 18, 2021 at 19:43

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.