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

Markus Neteler neteler at osgeo.org
Fri Nov 28 02:18:14 PST 2014


Hi,

On Thu, Nov 20, 2014 at 10:53 AM, Markus Neteler <neteler at osgeo.org> wrote:
...
> Trying with my locally modified  v.db.update
>
> GRASS 7.1.svn (nc_spm_08_grass7):~ > g.copy
> vect=precip_30ynormals,myprecip_30ynormals
>
> GRASS 7.1.svn (nc_spm_08_grass7):~ > v.db.addcolumn
> myprecip_30ynormals column="logjuly double precision"
>
> GRASS 7.1.svn (nc_spm_08_grass7):~ > v.db.update myprecip_30ynormals
> column="logjuly" qcolumn="log(jul)"
> sqliteextra=/home/neteler/software/sqlite_extensions/libsqlitefunctions.so
>
> GRASS 7.1.svn (nc_spm_08_grass7):~ > v.db.select myprecip_30ynormals
> columns=jul,logjuly
> jul|logjuly
> 132.842|4.88916045210132
> 127|4.84418708645859
> 124.206|4.82194147751127
> 104.648|4.65060233738593
> 98.298|4.58800368106618
> ...
>
> Works.

Submitted to trunk in r63238. Please test (tomorrow) also on Windows
if possible (the name will be something like libsqlitefunctions.dll
which you need to provide to v.db.select).

Markus


More information about the grass-dev mailing list