<div dir="ltr">OK, got it! it works now, thanks<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Juli<div><span style="color:rgb(51,51,153)">--</span><br><font color="#333399"><b>CIDE, CSIC</b> | <a href="http://www.uv.es/jgpausas" target="_blank">www.uv.es/jgpausas</a> | <br><br></font></div></div></div></div></div></div>
<br><div class="gmail_quote">On Fri, Jul 31, 2015 at 1:07 PM, Bo Victor Thomsen <span dir="ltr"><<a href="mailto:bo.victor.thomsen@gmail.com" target="_blank">bo.victor.thomsen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
The <br><span class="">
<br>
<i>SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1',
'16BSI', 0) </i><i><br>
</i><i>
FROM rastertmp.prova</i><i><br>
<br>
</i></span>in<span class=""><br>
<br>
WITH <br>
positiu AS (<br>
SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1',
'16BSI', 0) <br>
FROM rastertmp.prova<br></span>
)....<br>
<br>
does not contain a column "rast". The original table rastertmp.prova
does contain the aforementioned column.<br>
<br>
positiu is aliased to t2 in the second clause in the with statement,
hence the error message "t2.rast..."<br>
<br>
You might rewrite the select as this <br>
<br>
<i>SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1',
'16BSI', 0) <b>as rast</b> </i><i><br>
</i><i>
FROM rastertmp.prova</i><br>
<br>
if it's the reclassified rast you're interested in<br>
<br>
Regards <br><span class="HOEnZb"><font color="#888888">
Bo Victor Thomsen<br>
AestasGIS <br>
Denmark</font></span><span class=""><br>
<br>
<div>On 31-07-2015 12:43, juli g. pausas
wrote:<br>
</div>
<blockquote type="cite">WITH <br>
positiu AS (<br>
SELECT rid, ST_Reclass(ST_Band(rast, 1), 1, '[1-10000]:1',
'16BSI', 0) <br>
FROM rastertmp.prova<br>
),</blockquote>
<br>
</span></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>