[GRASS-SVN] r63646 - grass/branches/releasebranch_7_0/scripts/v.db.update
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 20 06:31:54 PST 2014
Author: neteler
Date: 2014-12-20 06:31:54 -0800 (Sat, 20 Dec 2014)
New Revision: 63646
Modified:
grass/branches/releasebranch_7_0/scripts/v.db.update/v.db.update.html
Log:
v.db.update manual: sync to trunk
Modified: grass/branches/releasebranch_7_0/scripts/v.db.update/v.db.update.html
===================================================================
--- grass/branches/releasebranch_7_0/scripts/v.db.update/v.db.update.html 2014-12-20 14:23:10 UTC (rev 63645)
+++ grass/branches/releasebranch_7_0/scripts/v.db.update/v.db.update.html 2014-12-20 14:31:54 UTC (rev 63646)
@@ -14,6 +14,8 @@
<h2>EXAMPLES</h2>
+<h3>Replacing of NULL values</h3>
+
In this example, selectively display lakes without (blue) and with
NULL (red) are shown to find out which type is undefined. In the
original map there are lakes missing FTYPE attribute which are
@@ -37,7 +39,9 @@
v.db.select mylakes
</pre></div>
-Spearfish example: adding new column, copying values from other table
+<h3>Updating of columns with on the fly calculation</h3>
+
+Spearfish example: adding new column, copying values from another table
column with on the fly calculation:
<div class="code"><pre>
g.copy vect=fields,myfields
@@ -46,6 +50,8 @@
v.db.select myfields
</pre></div>
+<h3>Type casting</h3>
+
Type cast (type conversion) of strings to double precision
(unsupported by DBF driver):
<div class="code"><pre>
@@ -54,7 +60,28 @@
where="z_value <> 'N/A'"
</pre></div>
+<h3>Updating of columns with on the fly calculation (SQLite extended functions)</h3>
+North Carolina data set example: adding new column, copying values from
+another table column with on the fly calculation:
+
+<div class="code"><pre>
+g.copy vect=precip_30ynormals,myprecip_30ynormals
+v.db.addcolumn myprecip_30ynormals column="logjuly double precision"
+v.db.update myprecip_30ynormals column="logjuly" query_column="log(jul)" \
+ sqliteextra=$HOME/sqlite_extensions/libsqlitefunctions.so
+
+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
+...
+</pre></div>
+
+
<h2>SEE ALSO</h2>
<em>
More information about the grass-commit
mailing list