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

Green City Script, Pleiades data

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/3000;
var G = B1/3000;
var B = B0/3000;

// 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 Rome with the Green City script. Acquisition date 2020-03-04, processed by Sentinel Hub. Green City script over Tallinn


[1] Normalized difference vegetation index:


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