Normalized difference red edge index, PlanetScope

//PlanetScope NDRE
let ndre = index(nir, rededge);

return colorBlend(
    ndre,
    [0.0, 0.5, 1.0],
    [
        [1, 0, 0],
        [1, 1, 0],
        [0.1, 0.31, 0],
    ]
);
//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],
    };
}

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.