Landsat 7 ETM+ True Color Composite

//VERSION=3

let minVal = 0.0;
let maxVal = 0.4;

let viz = new HighlightCompressVisualizer(minVal, maxVal);

function evaluatePixel(samples) {
    let val = [samples.B03, samples.B02, samples.B01];
    val = viz.processList(val);
    val.push(samples.dataMask);
    return val;
}

function setup() {
  return {
    input: [{
      bands: [
        "B01",
        "B02",
        "B03",
        "dataMask"
      ]
    }],
    output: {
      bands: 4
    }
  }
}

Evaluate and Visualize

General description

The true color product maps Landsat 1-5 MSS band values B03, B02, and B01 which roughly correspond to red, green, and blue part of the spectrum, respectively, to R, G, and B components. The result is a true color product, that is a good representation of the Earth as humans would see it naturally.

Description of representative images

True color over northern Tunisia. Acquired on 2001-06-23. The script example 1

References

  • Wikipedia, True color. Accessed October 10th 2017.