[postgis-users] ST_MapAlgebraExpr() : what is mean [rast] ?

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Nov 21 07:52:38 PST 2012


I think it's time for you to debug your own queries by displaying the result of each of them in QGIS or OpenJump so you can make sure you get things the right way.

Start by displaying the extent of each tile:

SELECT rast::geometry
FROm yourtable

Then you can use ST_DumpAsPolygons() to display one tile in as polygons.

Pierre

> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> bounces at lists.osgeo.org] On Behalf Of Mahavir Trivedi
> Sent: Wednesday, November 21, 2012 2:16 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ST_MapAlgebraExpr() : what is mean [rast] ?
> 
> dear
> 
> sir first to thanking you for suggestion about query
> 
> 
> alter table dem demtest add column map_rast raster
> update demtest set map_rast= ST_mapalgebraExpr(rast,'16BUI'::text,'CASE
> WHEN [rast] BETWEEN 10 AND 200 THEN [rast] ELSE NULL')
> 
> 
>  IT is Execute success fully .
> 
> BUT  when I export it using JAVA program It's size of Tiff is 9 KB . mean i mage
> not visible
> 
> SELECT ST_COUNT(map_rast,false) from demtest
>  4641304
> SELECT ST_COUNT(map_rast) from demtest
> 0
> 
> with regards
> Mahavir trivedi



More information about the postgis-users mailing list