[postgis-users] WITH ...

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Fri Jul 31 04:07:07 PDT 2015


The

/SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1', '16BSI', 0) //
//    FROM rastertmp.prova//

/in

WITH
positiu AS (
     SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1', '16BSI', 0)
     FROM rastertmp.prova
)....

does not contain a column "rast". The original table rastertmp.prova 
does contain the aforementioned column.

positiu is aliased to t2 in the second clause in the with statement, 
hence the error message "t2.rast..."

You might rewrite the select as this

/SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1', '16BSI', 0) 
*as rast* //
//    FROM rastertmp.prova/

if it's the reclassified rast you're interested in

Regards
Bo Victor Thomsen
AestasGIS
Denmark

On 31-07-2015 12:43, juli g. pausas wrote:
> WITH
> positiu AS (
>     SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1', 
> '16BSI', 0)
>     FROM rastertmp.prova
> ),

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150731/57767940/attachment.html>


More information about the postgis-users mailing list