Green City - Pleiades Pansharpened Script, Pleiades

let weight = (B2 + B1 + B0 * 0.4) / 2.4;
if (weight == 0) {
 return [0, 0, 0];
}
let ratio = PAN/weight * 2.5;
  /*
Author of the script: Carlos Bentes
*/

// Normalized Difference Vegetation Index
var ndvi = (B3-B2)/(B3+B2);

// Threshold for vegetation
var veg_th = 0.4;

// Simple RGB
var R = (B2/10000)*ratio;
var G = (B1/10000)*ratio
var B = (B0/10000)*ratio

// Transform to Black and White
var Y = 0.2*R + 0.7*G + 0.1*B;
var pixel = [Y, Y, Y];

// Change vegetation color
if(ndvi >= veg_th)
  pixel = [0.1*Y, 1.8*Y, 0.1*Y];

return pixel;

Evaluate and visualize

As Airbus Pleiades is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playgorund links are not possible due to the personalized data credentials.

General description of the script

Uses NDVI [1] to color Pleiades images and create awareness of green areas in cities around the World. The script was modified to fit PlanetScope spectral bands. See also Green City for Pleiades.

Author of the script

Carlos Bentes

Description of representative images

Visualization of the port of Hamburg with the Green City script. Acquisition date 2019-04-30, processed by Sentinel Hub. Green City script over Tallinn

References

[1] Normalized difference vegetation index: https://en.wikipedia.org/wiki/Normalized_difference_vegetation_index

Credits

Y. Zha, J. Gao & S. Ni (2003) Use of normalized difference built-up index in automatically mapping urban areas from TM imagery, International Journal of Remote Sensing, 24:3, 583-594, DOI: 10.1080/01431160304987