[Gfoss] Riclassificare raster in Postgis

Luca Lanteri mescal72 a gmail.com
Lun 7 Apr 2014 23:15:59 CEST


Ci provo ma non è detto che siano consigli sensati, è parecchio che
non uso le funzioni raster di PG.


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);

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.


bye

Luca




2014-04-07 21:57 GMT+02:00 Romina Di Paolo <romi.dipaolo a gmail.com>:

>
> Ciao a tutti,
>
> sto provando senza nessun risultato a riclassificare il raster dell'uso
> del suolo con questo comando
>
> CREATE TABLE qne.test_raster as SELECT
> rid,
> 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
> ELSE 0::integer
> END')
> AS rast from qne.qne_rstr
>
> 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
>
> "function st_mapalgebra(raster, unknown) does not exist
>
> LINE 4: ST_MapAlgebra(rast,'CASE WHEN rast BETWEEN 101::integer and ...
>
> HINT:  No function matches the given name and argument types. You might need to add explicit type casts"
>
>
> se elimino il cast  l'errore è sempre lo stesso:
>
>
>
> "function st_mapalgebra(raster, unknown) does not exist
>
> LINE 4: ST_MapAlgebra(rast,'CASE WHEN rast BETWEEN 101 and 115r THEN...
>
> HINT:  No function matches the given name and argument types. You might need to add explicit type casts."
>
>
>
> Avete qualche suggerimento in merito?
>
> Grazie in anticipo
> Romina
>
>
> _______________________________________________
> Gfoss a lists.gfoss.it
> http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss
> Questa e' una lista di discussione pubblica aperta a tutti.
> I messaggi di questa lista non hanno relazione diretta con le posizioni
> dell'Associazione GFOSS.it.
> 666 iscritti al 22.7.2013
>
-------------- parte successiva --------------
Un allegato HTML ? stato rimosso...
URL: <http://lists.gfoss.it/pipermail/gfoss/attachments/20140407/23b3bddc/attachment-0001.html>


Maggiori informazioni sulla lista Gfoss