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

JamesH james.holmes at newcastle.ac.uk
Tue Apr 3 12:34:20 PDT 2012


When altering the query to be:
SELECT 
	ST_MapAlgebraExpr(a.rast, 4, b.rast, 3, '(a.rast - b.rast) /(a.rast +
b.rast)::float') 
FROM 
	nclraster1 a, nclraster1 b;

instead of rast1 - rast2 etc.

Returns an error of 
ERROR:  missing FROM-clause entry for table "a"
LINE 1: SELECT ((a.rast - b.rast) /(a.rast + b.rast)::float)::double...

Can anyone explain this?

Kind Regards,
James

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



More information about the postgis-users mailing list