CLMS HR-S&I: Persistent Snow Area visualisation script
//VERSION=3
function setup() {
return {
input: ["PSA", "dataMask"],
output: { bands: 4, sampleType: "AUTO" },
};
}
const map = [
[0, 0x00a600], //0 - No persistant snow cover
[1, 0xe6f2ff], //1 - Persistant snow cover
[255, 0x000000], //255 - NODATA
];
const visualizer = new ColorMapVisualizer(map);
function evaluatePixel(sample) {
let rgbVis = visualizer.process(sample.PSA);
return rgbVis.concat(sample.dataMask);
}
General description of the script
This script visualises Persistent Snow Area.
Possible values are as follows:
- 0: no persistent snow
- 1: persistent snow
- 255: no data
Description of representative images
PSA over the Mont Blanc Region, FR