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

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Apr 11 09:55:56 PDT 2012

Are you using ST_dumpAsPolygons() to display in OpenJump? Depending on the GDAL version you're using, ST_DumpAsPolygons() might be converting floats to integers.

Try looking at individual pixel values with ST_Value() or us ST_PixelAsPolygons()


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of JamesH
> Sent: Wednesday, April 11, 2012 12:39 PM
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] NDVI Calculation from two bands within one Raster
> Thanks, that has worked and can visualise through OpenJump.
> The Raster it produces (below), has only values of zero or one in its
> attributes.
>  I'm assuming in the calculation its not keeping the values as Floats but
> its converting it to integer? Must be rounding them to either zero or one.
> Is there a way to solve this i.e. keep the pixels as floating integers?
> http://postgis.17.n6.nabble.com/file/n4832782/ndvi.jpg
> Kind Regards,
> James
> -----
> GIS Undergraduate
> --
> View this message in context: http://postgis.17.n6.nabble.com/NDVI-
> Calculation-from-two-bands-within-one-Raster-tp4656995p4832782.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list