CLMS HR-S&I: Fractional Snow Cover - Top of canopy fractional snow cover (%) quality layer visualisation script

//VERSION=3

function setup() {
  return {
    input: ["QCTOC", "dataMask"],
    output: { bands: 4, sampleType: "AUTO" },
  };
}
const map = [
  [0, 0x00a600], //0 - High Quality
  [1, 0xa6e64d], //1 - Medium Quality
  [2, 0xf2a64d], //2 - Low Quality
  [3, 0xff0000], //3 - Minimal Quality
  [250, 0xcccccc], //250 - Masked
  [255, 0x000000], //255 - NODATA
];

const visualizer = new ColorMapVisualizer(map);

function evaluatePixel(sample) {
  let rgbVis = visualizer.process(sample.QCTOC);
  return rgbVis.concat(sample.dataMask);
}

General description of the script

This script visualises the Fractional Snow Cover - Top of canopy fractional snow cover (%) quality layer

Table 1: Classification classes and colouring scheme.

Value Color Label
1 0 - high quality
2 1 - medium quality
3 2 - low quality
4 3 - minimal quality
5 200 - masked
6 255 - no data

Description of representative images

23rd April 2020, Innsbruck, AT

FSC QCTOC

Resources