Hi,

I want to calculate the NDVI (vegetation index) from a landsat-sat
imported into rasterenabled postgis. I thought I could use
st_mapalgebra() for this. my raster is stored in one postgis table
having one row but 4 bands within this row (rid=1).

how to access the specific bands to make st_mapalgebra calculate some
new raster?

select st_mapalgebra(rast, '(4-3)/(4+3)') from foo; or
select st_mapalgebra(rast, '(st_band(rast, 4)-st_band(rast,
3))/(st_band(rast, 4)+st_band(rast, 3))') from foo;

does not work

Marco
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to