0

I am trying to view ASTER imagery for Mount Spurr from 2004 to 2006. I am loading the imagery in a list "listOfImages" and access them for viewing via listOfImages.get(). Despite all images appear in my list and are loaded as layers, only a fraction of them are visible on the map when clicking on the specific layer. The code I use is as follows:

// Load a landsat image and select three bands for Mount Spurr
// Mount Spurr
// start: 2004-03-01
// end: 2006-05-30


 var dataset = ee.ImageCollection('ASTER/AST_L1T_003')
              .filterDate('2004-03-01','2006-05-30')
              .sort('system:time_start',false)

// filter imagery
var Image_filtered = dataset.filterBounds(geometry_Mt_Spurr)
 print(Image_filtered.size())

// convert to list
var listOfImages = Image_filtered.toList(Image_filtered.size());
print('List:',listOfImages);

// Get the size of the image list (this is a server side ee.Number object).
var len = listOfImages.size();
// build and show layers in GEE
len.evaluate(function(l) {
  for (var i=0; i < l; i++) {
    var img = ee.Image(listOfImages.get(i));
    Map.addLayer(img, {bands:['B3N','B02','B01']}, 'Img'+i.toString(),false);
    print('Img-'+i.toString());
    print(img.date());
  } 
})

The ASTER imagery has been loaded as an ImageCollection (ee.ImageCollection) and geometry_Mt_Spurr is just a rectangle over the area of interest.

Working with less images in the list did not solve the problem.

2

Select the "Inspector" tab on the right-hand-side and click inside your geometry. You'll notice that some of your images have one or more bands masked. Each image has an ORIGINAL_BANDS_PRESENT property. You can use this to filter out images missing your required bands.

var Image_filtered = dataset
  .filterBounds(geometry_Mt_Spurr)
  .filter(ee.Filter.listContains('ORIGINAL_BANDS_PRESENT', 'B01'))
  .filter(ee.Filter.listContains('ORIGINAL_BANDS_PRESENT', 'B02'))
  .filter(ee.Filter.listContains('ORIGINAL_BANDS_PRESENT', 'B3N'))

https://code.earthengine.google.com/ccaf974fedd97b2d7103982271394289

| improve this answer | |
  • Thanks for your comment, Daniel. So, is it correct, that images with masked bands have not been acquired with the corresponding bands? Or is it possible to "unmask" them? – MMartin Feb 5 at 14:22
  • I don't know the reason why they are masked. You can unmask them to any value of your choice, but there is no "hidden" value that you can revert to. – Daniel Wiell Feb 5 at 14:29
  • According to the text in the catalog: "Not all 14 bands were collected in each scene. An asset property named ORIGINAL_BANDS_PRESENT contains the list of bands that are present in each scene." – Daniel Wiell Feb 5 at 14:31
  • Ok, thank you very much! – MMartin Feb 6 at 9:54

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.