<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/26 Pietro <span dir="ltr"><<a href="mailto:peter.zamb@gmail.com" target="_blank">peter.zamb@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div>On Thu, Sep 26, 2013 at 2:18 PM, Enrico Gallo <<a href="mailto:enrico.gallo@gmail.com" target="_blank">enrico.gallo@gmail.com</a>> wrote:<br>
> So there is not a way to use this kind of funtions with vector attributes<br>
> without compile extra library and load it in SQLIte?<br>
> Any python workaround?<br>
<br>
</div>this example works only in grass7, otherwise you have to write your<br>
python code to work directly with the sqlite table.<br>
 </blockquote><div><br>[...]<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
#------------------------------------------------<br>
# work around<br>
import math<br>
<br>
for geo in foo:<br>
    geo.attrs['level'] = geo.attrs['power'] - math.log10(geo.attrs['distance'])<br>
<br>
}}}<br>
<br>
Note that this is far to be efficient...<br></blockquote><div><br></div><div>As I have to manage table with 1E5 - 1E6 rows, I will try some python code<br></div><div>using pysqlite or APSW <br><br></div>thank you in any case for suggestions and workaround<br>
<br></div><div class="gmail_quote">best regards,<br><br></div><div class="gmail_quote">Enrico<br></div><div class="gmail_quote"><div><br><br></div></div></div></div>