0

I'm accessing a Landsat 5 image on GEE from the Collection 2 Tier 2 dataset (tier 1 is not available for these images). I'm displaying in B3/2/1 (i.e. R/G/B) but the white ice and snow shows up as yellow. This is not an issue with Landsat 7 etc.

Visualize code:

 LANDSAT_5:{bands:['B3','B2','B1'],min:0,max:0.8},

Image (the yellow is ice, the dark is ocean)

enter image description here

2
  • Why are you setting the max reflectance to 0.8? What happens when you change that value to 1?
    – Kartograaf
    Commented Jun 24 at 16:29
  • That works well on other images for visualization. It doesn't make a significant difference to the yellow issue.
    – Beardsley
    Commented Jun 25 at 12:09

1 Answer 1

0

Try this code to access the data you want from GEE based on the collection date for the image you are interested in. (adjust filter dates on line 2)

var dataset = ee.ImageCollection('LANDSAT/LT05/C02/T2_L2')
    .filterDate('2000-11-01', '2001-01-01');

// Applies scaling factors.
function applyScaleFactors(image) {
  var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);
  var thermalBand = image.select('ST_B6').multiply(0.00341802).add(149.0);
  return image.addBands(opticalBands, null, true)
              .addBands(thermalBand, null, true);
}

dataset = dataset.map(applyScaleFactors);

var visualization = {
  bands: ['SR_B3', 'SR_B2', 'SR_B1'],
  min: 0.0,
  max: 0.8,
};

Map.setCenter(-83, 24, 8);

Map.addLayer(dataset, visualization, 'True Color (321)');

The important thing is to apply the scaling factors so that your data are in reflectance and not digital numbers. Once you have done that, you can tweak the way the colors are rendered by adjusting the saturation value max: 0.8

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.