[GRASS-user] Grass SQLite driver & math funtions

Enrico Gallo enrico.gallo at gmail.com
Tue Oct 1 11:54:37 PDT 2013


2013/9/26 Pietro <peter.zamb at gmail.com>

> On Thu, Sep 26, 2013 at 2:18 PM, Enrico Gallo <enrico.gallo at gmail.com>
> wrote:
> > So there is not a way to use this kind of funtions with vector attributes
> > without compile extra library and load it in SQLIte?
> > Any python workaround?
>
> this example works only in grass7, otherwise you have to write your
> python code to work directly with the sqlite table.
>


[...]


>
> #------------------------------------------------
> # work around
> import math
>
> for geo in foo:
>     geo.attrs['level'] = geo.attrs['power'] -
> math.log10(geo.attrs['distance'])
>
> }}}
>
> Note that this is far to be efficient...
>

As I have to manage table with 1E5 - 1E6 rows, I will try some python code
using pysqlite or APSW

thank you in any case for suggestions and workaround

best regards,

Enrico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131001/e8803e3b/attachment.html>


More information about the grass-user mailing list