[GRASS-user] simple way to join some attribute data w/o geometries
Moritz Lennert
mlennert at club.worldonline.be
Mon Jan 7 08:43:23 EST 2008
On 07/01/08 14:07, Benjamin Ducke wrote:
> Hi all,
>
> is there a simple way to join some attribute data
> in a comma separated text file to an existing GRASS
> vector map?
Option A (creates a separate database file - but not possible with dbf
driver)
1) use rdbms as data backend (including for the map you want the data to
be connected to)
2) db.in.ogr
3) create view combining map attribute table with new table from
csv-file (using key)
4) v.db.connect -o map table=NewView
Option B (add content of csv file to existing map attribute column -
possible with dbf driver):
- identify names and types of columns in csv file
- v.db.addcol the relevant columns
- for each line in csv file: v.db.update
(all this can also be done low-level in C, but don't think that the
performance enhancement will be so great).
Moritz
More information about the grass-user
mailing list