Normalized difference red edge index, PlanetScope Visualization EO Browser Raw Values
//VERSION=3
//PlanetScope NDRE
function setup () {
return {
input : [
{
bands : [ " nir " , " rededge " , " dataMask " ],
},
],
output : { id : " default " , bands : 4 },
};
}
function evaluatePixel ( sample ) {
let ndre = index ( sample . nir , sample . rededge );
let ndre_colored = colorBlend (
ndre ,
[ 0.0 , 0.5 , 1.0 ],
[
[ 1 , 0 , 0 ],
[ 1 , 1 , 0 ],
[ 0.1 , 0.31 , 0 ],
]
);
return [... ndre_colored , sample . dataMask ];
}
//VERSION=3
//PlanetScope NDRE EO Browser
function setup () {
return {
input : [
{
bands : [ " nir " , " rededge " , " dataMask " , " clear " ],
},
],
output : [
{ id : " default " , bands : 4 },
{ id : " index " , bands : 1 , sampleType : " FLOAT32 " },
{ id : " eobrowserStats " , bands : 2 , sampleType : " FLOAT32 " },
{ id : " dataMask " , bands : 1 },
],
};
}
function evaluatePixel ( sample ) {
let ndre = index ( sample . nir , sample . rededge );
const clear = sample . dataMask && sample . clear ;
let ndre_colored = colorBlend (
ndre ,
[ 0.0 , 0.5 , 1.0 ],
[
[ 1 , 0 , 0 ],
[ 1 , 1 , 0 ],
[ 0.1 , 0.31 , 0 ],
]
);
return {
default : [... ndre_colored , clear ],
index : [ ndre ],
eobrowserStats : [ ndre , ! clear ],
dataMask : [ sample . dataMask ],
};
}
//VERSION=3
//PlanetScope NDRE
function setup () {
return {
input : [
{
bands : [ " nir " , " rededge " , " dataMask " ],
},
],
output : { id : " default " , bands : 1 , sampleType : " FLOAT32 " },
};
}
function evaluatePixel ( sample ) {
let ndre = index ( sample . nir , sample . rededge );
return [ ndre ];
}
Show full evalscript Evaluate and Visualize The example data is using Planet Sandox data. This data is restricted to Sentinel Hub users with active paid plans. If you are already a Planet Customer, see here on how to get access.
General description The normalized difference red edge index, abbreviated NDRE, is defined as
\[NDRE := \mathtt{Index}(nir,rededge) = \frac{nir-rededge}{nir+rededge}\] This is an example script which can be used with EO Browser and is configured to return statistics in a format which can be used with the statistical info chart. For more information, see How Can I Configure My Layers For Statistical Information In EO Browser?
Description of representative images NDRE of agriculture fields in California.
References [1] Wikipedia, Normalized Difference Vegetation Index .