<div dir="ltr">Dear list,<br><br>a recent thread on user list was about SQLite and math functions support [1]<br>The specific problem was well investigated, but the second part of message (having math support for SQLITE as GRASS default) could be interesting for future developments. IMHO<br>
<br> 2013/9/26 Markus Neteler <neteler at <a href="http://osgeo.org">osgeo.org</a>><br><br><br> > Including SQLite math functions in the standard binary GRASS GIS<br> > distribuition could be a long term solution? I think this is the choice<br>
> SpatialLite did since 2.3 version.<br> You mean<br> <a href="http://www.gaia-gis.it/gaia-sins/spatialite-sql-3.0.0.html#math">http://www.gaia-gis.it/gaia-sins/spatialite-sql-3.0.0.html#math</a><br><br> hence<br>
<a href="http://www.sqlite.org/contrib">http://www.sqlite.org/contrib</a><br> --> "extension-functions.c (50.96 KB) contributed by Liam Healy on<br> 2010-02-06 15:45:07<br> Provide mathematical and string extension functions for SQL queries<br>
using the loadable extensions mechanism. Math: acos, asin, atan, atn2,<br> atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin,<br> tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt,<br>
square, ceil, floor, pi. String: replicate, charindex, leftstr,<br> rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr,<br> padc, strfilter. Aggregate: stdev, variance, mode, median,<br> lower_quartile, upper_quartile.<br>
"<br><br> If you refer to this file, then it is more related to (your) SQLite<br> installation rather than GRASS itself since GRASS just calls SQLite.<br><br> best,<br> Markus<br><br>as math library is loaded by SQLite<br>
<br>SELECT load_extension('./libsqlitefunctions.so');<br><br>but it's not included in SQLite itself (consistently with SQLite "lightness" strategy),<br>could be this library managed as an optional library when compiling GRASS GIS<br>
es: --with-sqlite-math<br>and then loaded by default (if available) when creating vector support db?<br><br>As SQLite is the default db, using this option when compiling GRASS for binary packages, standard users could have a more powerful "field editor" using v.db.update.<br>
Please, consider that for many (power)users in Windows using MinGW is really something arcane...<br>Do you think this approach might work?<br><br>Best regards<br>Enrico Gallo<br><br>[1] <a href="http://lists.osgeo.org/pipermail/grass-user/2013-September/068987.html">http://lists.osgeo.org/pipermail/grass-user/2013-September/068987.html</a><br>
</div>