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

Nordgren, Bryce L -FS bnordgren at fs.fed.us
Mon Mar 26 10:05:32 PDT 2012



'WHEN (rast1 + rast2 = 0) THEN XXX ELSE (rast1 - rast2) /(rast1 + rast2)::float END'

> Returned "Neither raster provided has a NODATA value for the specified band
> indices.  NODATA value set to minimum possible for 8BUI"

Ummm,

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. The big concern here is that each band is likely to have a different relationship between DN and reflectance, making the above equation produce something...unexpected.




This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.




More information about the postgis-users mailing list