Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Landsat 7 ETM+ False Color Near Infrared Composite

//VERSION=3

let minVal = 0.0;
let maxVal = 0.4;

let viz = new HighlightCompressVisualizer(minVal, maxVal);

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

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

Evaluate and Visualize

General description of the script

This is a simple RGB composite with NIR band B04 in the red channel, red band B03 in the green channel and green band B02 in the blue channel. The script is useful for plant density and health monitoring, as vegetation (displayed in red) heavily reflects NIR light while absorbing red. The band 4 also penetrates atmospheric haze, and distinguishes between land and water. Cities and exposed ground are grey or tan, and water appears blue or black.

Description of representative images

The False Color Composite in northern Tunisia. Acquired on 2001-06-23. The script example 1