[winGRASS] v.db.addcol

Nicola Zoppetti n.zoppetti at ifac.cnr.it
Tue Nov 6 13:47:49 EST 2007


Hallo to everybody,
I'm a new wingrass user from Florence, Italy.
I'm using QGIS 0.9+GRASS on windows and I'm having some problems modifying 
dbf tables.
I've tried to use also wingrass (not embedded in QGIS) but I have the same 
problems.

I want to add one (or more) column to the attribute table of a GRASS vector
layer.
I've tried to use v.db.addcol:

v.db.addcol map=mymap columns="a double,b double,c double"

no error is prompted on the GRASS shell,
but the dbf table
$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/mymap.dbf
is not modified.

In the folder
$GISDBASE/$LOCATION_NAME/$MAPSET/.tmp/
three temporary dbf files are created,
one with the 'a' column added, one with the 'b' column added and the last
one with the 'c' column added.

 It happens exactly the same if I directly use the db.execute command:
echo "ALTER TABLE ed7m3uT ADD COLUMN a double" | db.execute
echo "ALTER TABLE ed7m3uT ADD COLUMN b double" | db.execute
echo "ALTER TABLE ed7m3uT ADD COLUMN c double" | db.execute

If I manually add the three columns to the dbf table and I try to fill the
empty fields with the v.to.db command, once again a temporary table in the
.tmp folder is correctly created and filled but the table linked to the
features, in the folder 'dbf' of the mapset, remains unchanged.

Is there something that doesn't work as it should or I'm doing something
wrong??

Nicola Zoppetti,
Florence, Italy






More information about the grass-windows mailing list