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

G. Allegri giohappy at gmail.com
Tue Oct 21 08:37:08 EDT 2008


Are you sure Moritz that in qcolumn you can use multiple columns? If
it's true I've always excluded it because of a bug in my Grass! :)

2008/10/21 Moritz Lennert <mlennert at club.worldonline.be>:
> On 21/10/08 14:23, Moritz Lennert wrote:
>>
>> On 21/10/08 13:23, G. Allegri wrote:
>>>
>>> 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).
>>
>> You can add, substract and multiply columns, but there seems to be a bug
>> for division. Will file a report.
>
> Sorry, I take that back: division works, but the error you get in case of a
> division by 0 is a bit cryptic:
>
> "ERREUR:This should not happen: got a wrong expression structure after
>       parsing.
> dbmi: Protocol error"
>
> IIUC how the code is written, the "this should not happen" is not really
> precise. It will happen whenever you attempt a division by 0 or something
> similar...
>
> Maybe it just needs a more user-friendly formulation.
>
> Moritz
>


More information about the grass-user mailing list