Google Earth Engine – How to Get a List of Bands

bandgoogle-earth-enginelist

I want to Automate Band selection for all bands. Therefore a List of the Bands is needed. This didnĀ“t work:

ee.List(image.get('bands'))

Best Answer

You can get a list of all the bands in an image by using:

var band_names = image.bandNames()

also see here: https://developers.google.com/earth-engine/api_docs#eeimagebandnames