[postgis-users] ST_MapalgebraExpr() function

Mahavir Trivedi mahavir.trivedi at gmail.com
Fri Nov 23 02:24:54 PST 2012

 i stored tiff image in postgis raster.
how  do i get image which have only pixel range between  10 to 40 ?

raster2psql -s 4326 -I -C -M -d  d:\test.tiff -F public. demtest > test.sql
alter demtest add column map_rast raster
update demtest set map_rast=ST_MapAlgebraExpr(rast,'16BUI':: text,'case
when [rast] between 20 and 40  then [rast] else NULL end')

when i using java programm  for export ing : select ST_AsPNG(rast) from
demtest  then output image is perfect.
but when i write query select ST_AsPNG(map_rast) from demtest. then output
image is not as i required.

with regards and thanks

mahavir trivedi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121123/617dd382/attachment-0001.html>

More information about the postgis-users mailing list