[GRASS-user] Fwd: calculate values of an attribute table column

G. Allegri giohappy at gmail.com
Tue Oct 21 07:23:28 EDT 2008


You could use v.db.update:
http://grass.osgeo.org/grass64/manuals/html64_user/v.db.update.html
In the qcolumn filed you can insert a formula

As fas as I know, when using dbf tables you can't do calculations on
multiple fields (for a single column you can insert formulas inside
qcolumn in v.db.update). Practical solutions I usually adopt:

1 - open the vector dbf with OpenOfficeCalc, and do what I want... If
you use OOCalc, remember to copy the results in a column as "real"
numbers, detached from the formulas they were created from, otherwise
GRASS can't use those values...
2 - connect you vector to a different db like PostGIS or Sqlite. They
both support more comples queries in db.execute


Giovanni


> Dear GRASS users,
>
> I'm working with a vector map with an attribute table. I'm using the GRASS tools with QGIS.
> I added a new column to my table and I don't know why my 'start editing' buttons aren't activ.
> I'd like to get those new values by calculating the difference of 2 other existing columns.
>
> Do you know any solution for that?
>
> Further I thought about doing the calculation within the GRASS shell but I don't know what tool I should use and how. for example the db.execute, but I couldn't find any calculation possibility in it.
>
> thanks,
> stef
> --
> GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
> Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list