[GRASS-dev] How to calculate log() in v.db.update with SQLite backend?

Markus Metz markus.metz.giswork at gmail.com
Wed Nov 19 23:54:33 PST 2014


Markus Neteler wrote:
> Hi,
>
> playing around with the "Meuse" dataset about soil contamination I
> attempted to calculate that right away but...:
>
> v.db.update meuse_voronoi column="logzinc" qcolumn="log(zinc)"
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> no such function: log
>
> DBMI-SQLite driver error:
> Error in sqlite3_prepare():
> no such function: log
>
> ERROR: Error while executing: 'UPDATE meuse_voronoi SET logzinc=log(zinc)'

Maybe a new module v.db.mapcalc or similar could be useful? This
module could offer the functions of r.mapcalc if applicable, and would
work on attributes. Sometimes a new attribute needs to be calculated
from existing attributes with a more elaborate mathematical formula.

Markus M


More information about the grass-dev mailing list