Salve,
sto cercando di passare dei dati vettoriali da grass a postgis; per fare
questo, da terminale ho digitato:
toro@toro-laptop:~$ su postgres
Password:
postgres@toro-laptop:/home/toro$ psql
psql (8.4.2)
Type "help" for help.
postgres=# createdb spearpg -O grass -h localhost -U grass
postgres-# createlang plpgsql spearpg -U grass
postgres-# psql spearpg -U grass -f /usr/share/postgresql/8.4/contrib/postgis.
sql
postgres-# psql spearpg -U grass -f /usr/share/postgresql/8.
4/contrib/spatial_ref_sys.slq
postgres-# createdb spearpg -O grass -h localhost -U grass
e fin qui semba tutto regolare...
una volta entrato in grass, mapset=spearfish, location=user1 faccio
g.copy vect=fields,fields2 per passare il file fields2 dal mapset permanent
a quello user1
e successivamente cerco di importare il file dentro postgis/postgresql
v.out.ogr -c input=fields2 type=area 'dsn=PG:host=localhost dbname=spearpg
user=grass password=grass' olayer=fields2postgis layer=1 format=PostgreSQL
ERROR 1: ERROR: permission denied for relation geometry_columns
ERROR 1: PostgreSQL driver doesn't currently support database creation.
Please create database with the `createdb' command.
ERROR: Unable to open OGR data source 'PG:host=localhost dbname=spearpg
user=grass password=grass'
tutta questa sequenza è ripresa dal tutorial http://www.ing.unitn.
it/~grass/docs/tutorial_62/htdocs/esercitazione/PostgreSQL/node2.html
ma non riesco proprio a capire come fare per poter andare avanti.
potreste aiutarmi?
grazie
Questo
ERROR 1: ERROR: permission denied for relation geometry_columns
sembra un problema di permessi. E' successo anche a me.
Probabilmente quella tabella ha come proprietario postgres e il tuo utente non può lavorarci.
O cambi il proprietario della tabella oppure dai i privilegi necessari all'utente grass così
GRANT ALL ON geometry_columns TO grass;
Se non ricordo male, anche la tabella spatial_ref_sys ha bisogno dello stesso trattamento.
Francesco
ciccpaol@libero.it ha scritto:
Salve,
sto cercando di passare dei dati vettoriali da grass a postgis; per fare questo, da terminale ho digitato:
toro@toro-laptop:~$ su postgres
Password: postgres@toro-laptop:/home/toro$ psql
psql (8.4.2)
Type "help" for help.
postgres=# createdb spearpg -O grass -h localhost -U grass
postgres-# createlang plpgsql spearpg -U grass
postgres-# psql spearpg -U grass -f /usr/share/postgresql/8.4/contrib/postgis.
sql
postgres-# psql spearpg -U grass -f /usr/share/postgresql/8.
4/contrib/spatial_ref_sys.slq
postgres-# createdb spearpg -O grass -h localhost -U grass
e fin qui semba tutto regolare...
una volta entrato in grass, mapset=spearfish, location=user1 faccio
g.copy vect=fields,fields2 per passare il file fields2 dal mapset permanent a quello user1
e successivamente cerco di importare il file dentro postgis/postgresql
v.out.ogr -c input=fields2 type=area 'dsn=PG:host=localhost dbname=spearpg user=grass password=grass' olayer=fields2postgis layer=1 format=PostgreSQL
ERROR 1: ERROR: permission denied for relation geometry_columns
ERROR 1: PostgreSQL driver doesn't currently support database creation.
Please create database with the `createdb' command.
ERROR: Unable to open OGR data source 'PG:host=localhost dbname=spearpg
user=grass password=grass'
tutta questa sequenza è ripresa dal tutorial http://www.ing.unitn.
it/~grass/docs/tutorial_62/htdocs/esercitazione/PostgreSQL/node2.html ma non riesco proprio a capire come fare per poter andare avanti.
potreste aiutarmi?
grazie
_______________________________________________
Iscriviti all'associazione GFOSS.it: http://www.gfoss.it/drupal/iscrizione
Gfoss@faunalia.it
http://lists.faunalia.it/cgi-bin/mailman/listinfo/gfoss
Questa e' una lista di discussione pubblica aperta a tutti.
I messaggi di questa lista non rispecchiano necessariamente
le posizioni dell'Associazione GFOSS.it.
440 iscritti al 15.3.2010
On Thu, Apr 15, 2010 at 02:35:01PM +0200, ciccpaol@libero.it wrote:
toro@toro-laptop:~$ su postgres
Password:
postgres@toro-laptop:/home/toro$ psql
psql (8.4.2)
Type "help" for help.
postgres=# createdb spearpg -O grass -h localhost -U grass
postgres-# createlang plpgsql spearpg -U grass
postgres-# psql spearpg -U grass -f /usr/share/postgresql/8.4/contrib/postgis.
sql
postgres-# psql spearpg -U grass -f /usr/share/postgresql/8.
4/contrib/spatial_ref_sys.slq
postgres-# createdb spearpg -O grass -h localhost -U grass
Attenzione, hai fatto confusione tra comandi da digitare al
prompt Unix e quelli da digitare al prompt Postgres!
createdb, createlang, psql sono tutti comandi da impartire alla
riga di comando Unix, dopo aver fatto "su postgres". Quando vedi
il prompt postgres=# sei invece alla riga di comando Postgres.
È facile sbagliarsi perché molte cose si possono fare sia in un
modo che in un altro (es. creare un database).
--
Niccolo Rigacci
Firenze - Italy