How do I get actual NDVI values?

Home > Faq > How do I get actual NDVI values?

If you want to get float values out of the service, you will have to use 32-bit float image type (as basic 8 and 16bit tiff files only support integeres).

You can define a Custom script along the following lines:

var ndvi = (B08-B04)/(B08+B04); 
  return [ndvi]; 

You can either save this in Configuration utility or you can pass it as EVALSCRIPT parameter. For the latter the example of the call is:<INSTANCE_ID>?service=WMS&requ...

We suggest to also check the FAQ about details of internal calculation.