[postgis-users] ST_MapAlgebraExpr(rast,rast) Error

Sandro Santilli strk at keybit.net
Wed Feb 8 02:43:53 PST 2012


On Wed, Feb 08, 2012 at 11:38:43AM +0100, Andreas Forø Tollefsen wrote:
> Hi,
> 
> Revision 9096.
> 
> I am trying to get the mean raster pixel value inside my polygon.
> Previously i have been using this query:
> SELECT
> a.gid ,
> (ST_SummaryStats((ST_Union(ST_MapAlgebraExpr(ST_AsRaster(a.cell,
> b.rast, '32BF'), b.rast, 'rast2', '32BF','INTERSECTION','rast2',
> 'rast1'))), false)).mean As avgmnt
> FROM
> priogrid a LEFT JOIN
> access b
>     ON ST_Intersects(a.cell, b.rast)
> GROUP BY a.gid
> ORDER BY a.gid;
> 
> This now return error:
> NOTICE:  geometry_gist_joinsel called with incorrect join type
> ERROR:  column "rast2" does not exist

Keywords changed to [rast1], [rast2], etc..

--strk;

  ,------o-. 
  |   __/  |    Thank you for PostGIS-2.0 Topology !
  |  / 2.0 |    http://www.pledgebank.com/postgistopology
  `-o------'




More information about the postgis-users mailing list