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

Sentinel-2 120 m Mosaic - NDMI

//VERSION=3

if (B08 == 0 || B11 == 0){
  return [0,0,0];
} else {
  var val = (B08 - B11)/(B08 + B11);
  
  var vmin = -0.8;
  var vmax = 0.8;
  var dv = vmax - vmin;
  
  var r = 0.0;
  var g = 0.0;
  var b = 0.0;

  
  var v = val;

  if (v < vmin){
    v = vmin;
  }
  if (v > vmax){
    v = vmax;
  }
  
  var l1 = 0.35;
  var l2 = 0.48;
  var l3 = 0.52;
  var l4 = 0.65;
  
  var level1 = (vmin + l1 * dv);
  var level2 = (vmin + l2 * dv);
  var level3 = (vmin + l3 * dv);
  var level4 = (vmin + l4 * dv);

  if (v < level1){
     r = 0.5 +  (v - vmin) / (level1 - vmin) / 2;
  } else if (v < level2) {
     r = 1;
     g = (v - level1) / (level2 - level1);
     b = 0;
  } else if (v < level3) {
     r = 1 + (level2 - v) / (level3 - level2);
     g = 1;
     b = (v - level2) / (level3 - level2);
  } else if (v < level4) {
     r = 0;
     g = 1 + (level3 - v) / (level4 - level3);
     b = 1;
  } else {
     b = 1.0 + (level4 - v) / (vmax - level4) / 2;
  }

   return [r, g, b, dataMask];
}

Collection Access

Sentinel-2 L2A 120 m mosaic is a public data collection, that is not part of open EO data. It is not included in EO Browser. To access it, you need a Sentinel Hub account, and then either create a process request to the collection or to create a configuration based on the preprepared template, which will allow you to view it in EO Browser and make OGC requests to it. The collection ID is 484d8dbb-9e3e-41f2-b96b-35189d3ae37f, and the collection type is byoc-484d8dbb-9e3e-41f2-b96b-35189d3ae37f.

General description

The NDMI is a normalized difference moisture index, that uses NIR and SWIR bands to display moisture. The SWIR band reflects changes in both the vegetation water content and the spongy mesophyll structure in vegetation canopies, while the NIR reflectance is affected by leaf internal structure and leaf dry matter content but not by water content. The combination of the NIR with the SWIR removes variations induced by leaf internal structure and leaf dry matter content, improving the accuracy in retrieving the vegetation water content. The amount of water available in the internal leaf structure largely controls the spectral reflectance in the SWIR interval of the electromagnetic spectrum. SWIR reflectance is therefore negatively related to leaf water content. In short, NDMI is used to monitor changes in water content of leaves, and was proposed by Gao. NDWI is computed using the near infrared (NIR) and the short wave infrared (SWIR) reflectance’s:

NDMI = (NIR - SWIR) / (NIR + SWIR)

For Sentinel-2 8, NDMI calculates as:

NDMI = (B08 - B11) / (B08 + B11)

Description of representative images

NDMI of northern Africa and Europe, 27.12.2019.

120 m mosaic NDMI

NDMI of Japan, 27.12.2019.

120 m mosaic NDMI

NDMI of Ganges delta in Bangladesh, 27.12.2019.

120 m mosaic NDMI