Global Water Bodies visualisation script

//VERSION=3

// This custom script visualises water bodies derived from water bodies detection layer (WB )

//set up the input and output settings.
function setup() {
  return {
    input: ["WB", "dataMask"],
    output: { 
      bands: 4, 
      sampleType: "AUTO"
    }
  }
}

// evaluatePixel function
function evaluatePixel(sample) {
  if (sample.WB == 70) return[0,0,1,1]; // blue
  else return [0,0,0,0] // transparent
}

General description of the script

This script visualizes surface water bodies extent derived from water Bodies detection layer (WB) contained in Water Bodies data.

Table 1: Color legend for the water bodies

Value Color Label
70 Water

Description of representative images

October 2020 monthly composite map showing surface water bodies extent around Russia’s largest freshawater Baikal lake visualised in EO browser

Water bodies map Baikal lake

Resources