[GRASSLIST:5388] vectors connection to pg tables

Francesco Mirabella mirabell at unipg.it
Mon Jan 17 06:45:16 EST 2005


dear users,

I have a probelm with vectors and database connections:

I have set up grass60 beta 1

after importing an ascii 3d map points with v.in.ascii:

<v.in.ascii -z input=LatLon_AC.dat output=prova_sismi  fs=tab  columns='x double precision, y double precision, z double precision, cat int'  x=2 y=3 z=4 cat=1>

I would like to link it to my postgres database. 

Following the instructions in html man pages I think I first need to create the table to which I want to link the vector map (or maybe not?)

<echo 'create table tabella_sismi ("cat" int, "lat" double precision, "long" double precision, "depth" double precision)' | db.execute> 

then I connect the database:
<db.connect driver=pg database="host=localhost,dbname=database,user=database_user">

I connect to the database:
<db.login>

And finally I connect the vector map "prova_sismi" to the table
"tabella_sismi" through postgres:
<v.db.connect map=prova_sismi table=tabella_sismi driver=pg database="host=localhost,dbname=database,user=database_user" -o

Now,
when I query the map <d.what.vect> the form is very good, the
information is correct both regarding table name,database name and data.
However if I access the tabel through e.g. pgacces, the table exists but
no data are displayed.

am I doing something wrong??

thanks for your help

Francesco




More information about the grass-user mailing list