dear<div> i stored tiff image in postgis raster.</div><div>how do i get image which have only pixel range between 10 to 40 ?</div><div><br></div><div><br></div><div>raster2psql -s 4326 -I -C -M -d d:\test.tiff -F public. demtest > test.sql</div>
<div>alter demtest add column map_rast raster</div><div>update demtest set map_rast=ST_MapAlgebraExpr(rast,'16BUI':: text,'case when [rast] between 20 and 40 then [rast] else NULL end')</div><div><br></div>
<div>when i using java programm for export ing : select ST_AsPNG(rast) from demtest then output image is perfect.</div><div>but when i write query select ST_AsPNG(map_rast) from demtest. then output image is not as i required.</div>
<div><br></div><div><br></div><div><br></div><div>with regards and thanks </div><div><br></div><div>mahavir trivedi</div>