Green City Script, SPOT 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 SPOT 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 SPOT 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 SPOT.

Author of the script

Carlos Bentes

Description of representative images

Visualization of Zgornje Konjišče, Slovenia with the Green City script.

Green City script over Zgornje Konjišče, Slovenia

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