[postgis-users] NDVI Calculation from two bands within one Raster

JamesH james.holmes at newcastle.ac.uk
Tue Mar 27 04:27:36 PDT 2012


NDVI is calculated on reflectance values in these bands, not raw DN. Your
inputs should already be floating point values, and they should never be
less than 0.0 or greater than 1.0. 

Ok, my raw data was 8BUI which I went back and changed to 64 bit float to
try get past this but still, using the equation above is returning:

"NOTICE:  Neither raster provided has a NODATA value for the specified band
indices.  NODATA value set to minimum possible for 64BF
ERROR:  division by zero
CONTEXT:  SQL statement "SELECT (($1 - $2) /($1 + $2))::double precision"

I went back and re-edited the raw raster image to remove the black areas
from where it has been geo-rectified but still can't seem to get to grips
with what is going wrong in the calculation.

--
View this message in context: http://postgis.17.n6.nabble.com/NDVI-Calculation-from-two-bands-within-one-Raster-tp4656995p4660390.html
Sent from the PostGIS - User mailing list archive at Nabble.com.



More information about the postgis-users mailing list