I have been trying to upload a shapefile "Phu Quoc" to Google Earth Engine and hence filtering the images based on this shp, however I've got this error:

"Landsat Collection: Layer Error: Image.Visualize: No band named 'B5'

(the picture below), although 'B5' is still available.


Could anyone please help me to figure out the problem, since I couldn't found any related post to this error.

3 Answers 3


When you specify the bands you want to use, you have to do it by using square brackets and single commas like this:

Map.addLayer(yourCollection, {min:0, max:5000, bands: ['B6', 'B5', 'B4']});


The best way to go about it. Example:

  var study = table;//containing your shapefile
  var l8  = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
  .filterDate('2016-01-01', '2016-12-31')//editable, based on the year your want

   var sort = l8.toList(100); //all the imagery within that year will present
   var clip = ee.Image(sort.get(0)).clip(table); // you can change number to sort through the available imagery present 
   Map.addLayer(clip, {bands: ['B4', 'B3', 'B2'], min:0, max:3000}, 'table');// the bands here are the band combination
   //NB: satellite images that ends with SR(min: 0 ,max: 3000) and those with TOA(min: 0,max: 0.3) 

If you need only the images that intersect table, use imageCollection.filterBounds(table). If you need to clip for some reason, use clipToCollection(table).


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.