[Gfoss] Visualizzare il risultato di una query con PostGIS

Luca Manganelli luca_manganelli a comune.trento.it
Mer 23 Lug 2008 14:57:23 CEST


Antonio Falciano ha scritto:
>>> Basta salvarsi le query come viste, referenziarle nella tabella
>>> 'geometry_columns' e utilizzare un client che possa connettersi a
>>> Postgres (GRASS/Qgis, gvSIG, mapserver, ecc.)
>>>   
>>>       
>> Sono un "niubbo" di postgres :-) mi puoi spiegare come fare:
>> - salvare una query come vista
>>     
>
> http://www.postgresql.org/docs/8.3/static/sql-createview.html
>
>   
>> -  referenziarla nella tabella 'geometry_columns'
>>     
>
> http://postgis.refractions.net/documentation/manual-1.3/ch04.html#id3015953
>
>   
Se faccio quest'ultimo passo sulla vista, mi viene questo errore:

SELECT AddGeometryColumn ('public', 'prova_luca', 'st_intersection', -1, 
'MULTIPOLYGON', 2);

ERROR: "prova_luca" is not a table
Stato SQL: 42809
Contesto: SQL statement "ALTER TABLE public.prova_luca ADD COLUMN 
st_intersection geometry "
PL/pgSQL function "addgeometrycolumn" line 86 at EXECUTE statement
SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement

tu come hai fatto?




Maggiori informazioni sulla lista Gfoss