[postgis-users] WITH ...

juli g. pausas juli.g.pausas at uv.es
Fri Jul 31 08:44:11 PDT 2015


OK, got it! it works now, thanks

Juli
--
*CIDE, CSIC*  |  www.uv.es/jgpausas  |


On Fri, Jul 31, 2015 at 1:07 PM, Bo Victor Thomsen <
bo.victor.thomsen at gmail.com> wrote:

> 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
> ),
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150731/88de81e3/attachment.html>


More information about the postgis-users mailing list