[GRASSLIST:4351] Grass57 Vector attributes

Michael Holzmann mholzmann at iaks.de
Wed Sep 15 07:36:30 EDT 2004


hello,
I want to reach the following:
load Shapefiles into a Postgis DB, with Grass 57 the access to the
attributes  and finally add columns or/and Attribute tables.
so far I reached the following:

- with v.in.ogr I `ve imported the Shapefile with the states of Germany to
grass57. The Shape-dbf file was 	automatically imported and in the folder of
the location a  Grass57-dbf file was created, which has immediately a DB
connection with the Grass vector 	map. With v.db.connect I can examine that.
The result:
 Vector map <state1> is connected by: field <1> table
<state1> in database 	</home/mholzmann/grassdata/deutschland/vtest/dbf/>
through driver <dbf> with key <cat>

-then I export with v.out.ogr the data  into the Postgis-DB. A table in the
Postgis-DB with the following columns is put on: oid, ogc_fid, wkb_geometry,
landnr, 	name, ID cat. All Attribute was thus written into the table.

 -with v.external now I make  a Postgis-DB connection with the Layer state1.
The geometry data are o.k. but the attributes doesn`t appear. The result of
a query 	results in :
Cannot open select cursor:`select*from
state1 where FID=69` on database`PG:localhost....,

-with an query with v.db.connect the following appears:
 Vector map<postgis_state> is connected by: field <1> table <state1> in
database
<PG:host=localhost user=postgres dbname=db2> through driver <ogr>	with
key<FID>


- How can I get access to the attributes in the table?
- Who can give me a tip how the attribute management works in Grass57 and
Postgis_DB, and with commands are needed

Michael




More information about the grass-user mailing list