Skip to main content

NDVI downloaded with different bands?

  • April 26, 2024
  • 1 reply
  • 106 views

I would appreciate if you could explain me why when I download an NDVI image in Sentinel HUB and load it in QGIS or ArcGIS I get three bands with different values.
Thanks!

1 reply

Hi,

I think you are downloading the visualisation of NDVI from Sentinel Hub. This is a 3 band RGB image that is used to easily visualise NDVI for data visualisation purposes.

To access the actual NDVI values is very simple, if you use the evalscript below you will return your NDVI values between 0 and 1.

//VERSION=3

function setup() {
return {
input: [{
bands: [
"B04",
"B08",
]
}],
output: {
bands: 1,
sampleType: "FLOAT32"
}
}
}

function evaluatePixel(samples) {
let val = index(samples.B08, samples.B04);
return [val];
}

If you need more help, please let us know!