<div dir="ltr"><pre style="margin-top:12px;margin-bottom:0px"><font face="Courier New,courier"><span style="white-space:pre-wrap">Ci provo ma non č detto che siano consigli sensati, č parecchio che non uso le funzioni raster di PG.</span></font></pre>
<pre style="margin-top:12px;margin-bottom:0px"><font face="Courier New,courier"><span style="white-space:pre-wrap">
Hai provato facendo un cast dell'espressione SQL a text? A quanto pare non viene vista come text, infatti ti dice: st_mapalgebra(raster, unknown);
<br></span></font></pre><pre style="margin-top:12px;margin-bottom:0px"><font face="Courier New,courier"><span style="white-space:pre-wrap">Prova ad esplicitare tutti i parametri della funzione compresi pixeltype e nodataval. La sintassi della funzione dovrebbe essere  
raster ST_MapAlgebra(raster rast, text pixeltype, text expression, double precision nodataval=NULL);


Prova ad utilizzare la funzione ST_Reclass, forse č pių adatta a quello che vuoi fare tu.</span></font><span style="white-space:pre-wrap"><br></span></pre><pre style="margin-top:12px;margin-bottom:0px"><font face="Courier New,courier"><span style="white-space:pre-wrap"><br>
</span></font></pre><pre style="margin-top:12px;margin-bottom:0px"><font face="Courier New,courier"><span style="white-space:pre-wrap">bye</span></font></pre><pre style="margin-top:12px;margin-bottom:0px"><font face="Courier New,courier"><span style="white-space:pre-wrap">Luca</span></font></pre>
<pre style="white-space:pre-wrap;margin-top:12px;margin-bottom:0px"><br></pre></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-07 21:57 GMT+02:00 Romina Di Paolo <span dir="ltr"><<a href="mailto:romi.dipaolo@gmail.com" target="_blank">romi.dipaolo@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">Ciao a tutti,<div><br></div><div>sto provando senza nessun risultato a riclassificare il raster dell'uso del suolo con questo comando</div>
<div><br></div><div>
<div>CREATE TABLE qne.test_raster as SELECT<br>
</div><div>rid,</div><div>ST_MapAlgebra(rast,'CASE WHEN rast BETWEEN 101::integer and 115::integer THEN rast WHEN rast BETWEEN 102::integer and 166::integer THEN 0::integer</div><div>ELSE 0::integer </div><div>END')</div>


<div>AS rast from qne.qne_rstr</div></div><div><br></div><div>l'intento sarebbe di portare tutti i valori compresi tra 101 e 115 a zero e lasciare invariati i valori definiti nel BETWEEN, ma il comando mi restituisce questo errore </div>


<div><pre style="margin-top:12px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">"function st_mapalgebra(raster, unknown) does not exist</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">LINE 4: ST_MapAlgebra(rast,'CASE WHEN rast BETWEEN 101::integer and ...</span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="font-family:'Courier New,courier'">HINT:  No function matches the given name and argument types. You might need to add explicit type casts</span><span style="font-family:'Courier New,courier'">"</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'"><br></span></pre>se elimino il cast  l'errore č sempre lo stesso: <pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'"><br>


</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">"function st_mapalgebra(raster, unknown) does not exist</span><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">LINE 4: ST_MapAlgebra(rast,'CASE WHEN rast BETWEEN 101 and 115r THEN...</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'">HINT:  No function matches the given name and argument types. You might need to add explicit type casts."</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:'Courier New,courier'"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre></pre></div><div>Avete qualche suggerimento in merito?</div>


<div><br></div><div>Grazie in anticipo </div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div>Romina</div></font></span></font></span></div>
</div><br></div>
<br>_______________________________________________<br>
<a href="mailto:Gfoss@lists.gfoss.it">Gfoss@lists.gfoss.it</a><br>
<a href="http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss" target="_blank">http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss</a><br>
Questa e' una lista di discussione pubblica aperta a tutti.<br>
I messaggi di questa lista non hanno relazione diretta con le posizioni dell'Associazione GFOSS.it.<br>
666 iscritti al 22.7.2013<br></blockquote></div><br></div>