CLMS HR-S&I: SAR Wet Snow in high mountains - Wet Snow classification in high Mountains areas quality layer visualisation script

//VERSION=3

function setup() {
  return {
    input: ["QCWSM", "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.QCWSM);
  return rgbVis.concat(sample.dataMask);
}

General description of the script

This script visualises SAR Wet Snow in high mountains - Wet Snow classification in high Mountains areas 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

24th April 2020, Innsbruck, AT

QCWSM

Resources