[GRASS-SVN] r38094 - in grass/trunk: gui/wxpython/docs
gui/wxpython/gui_modules raster/r.watershed/front scripts
scripts/db.dropcolumn scripts/v.colors scripts/v.db.addcol
scripts/v.db.addtable scripts/v.db.dropcol
scripts/v.db.droptable scripts/v.db.renamecol vector
vector/v.db.connect vector/v.transform vector/v.vol.rst
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jun 27 06:55:30 EDT 2009
Author: martinl
Date: 2009-06-27 06:55:30 -0400 (Sat, 27 Jun 2009)
New Revision: 38094
Added:
grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.html
grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.py
Removed:
grass/trunk/scripts/v.db.dropcol/v.db.dropcol.html
grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py
Modified:
grass/trunk/gui/wxpython/docs/wxGUI.Attribute_Table_Manager.html
grass/trunk/gui/wxpython/gui_modules/dbm.py
grass/trunk/raster/r.watershed/front/r.watershed.html
grass/trunk/scripts/Makefile
grass/trunk/scripts/db.dropcolumn/db.dropcolumn.html
grass/trunk/scripts/v.colors/v.colors.py
grass/trunk/scripts/v.db.addcol/v.db.addcol.html
grass/trunk/scripts/v.db.addtable/v.db.addtable.html
grass/trunk/scripts/v.db.dropcol/Makefile
grass/trunk/scripts/v.db.droptable/v.db.droptable.html
grass/trunk/scripts/v.db.renamecol/v.db.renamecol.html
grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py
grass/trunk/vector/v.db.connect/v.db.connect.html
grass/trunk/vector/v.transform/v.transform.html
grass/trunk/vector/v.vol.rst/v.vol.rst.html
grass/trunk/vector/vectorintro.html
Log:
v.db.dropcol renamed to v.db.dropcolumn (part 1)
Modified: grass/trunk/gui/wxpython/docs/wxGUI.Attribute_Table_Manager.html
===================================================================
--- grass/trunk/gui/wxpython/docs/wxGUI.Attribute_Table_Manager.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/gui/wxpython/docs/wxGUI.Attribute_Table_Manager.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -30,7 +30,7 @@
<em>
<a href="v.db.addcol.html">v.db.addcol</a>,
<a href="v.db.connect.html">v.db.connect</a>,
- <a href="v.db.dropcol.html">v.db.dropcol</a>,
+ <a href="v.db.dropcolumn.html">v.db.dropcolumn</a>,
<a href="v.db.renamecol.html">v.db.renamecol</a>,
<a href="v.what.html">v.what</a>
</em>
Modified: grass/trunk/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm.py 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/gui/wxpython/gui_modules/dbm.py 2009-06-27 10:55:30 UTC (rev 38094)
@@ -1545,7 +1545,7 @@
item = list.GetFirstSelected()
while item != -1:
- self.listOfCommands.append(('v.db.dropcol',
+ self.listOfCommands.append(('v.db.dropcolumn',
{ 'map' : self.vectorName,
'layer' : self.layer,
'column' : list.GetItemText(item) }
@@ -1568,7 +1568,7 @@
table = self.mapDBInfo.layers[self.layer]['table']
cols = self.mapDBInfo.GetColumns(table)
for col in cols:
- self.listOfCommands.append(('v.db.dropcol',
+ self.listOfCommands.append(('v.db.dropcolumn',
{ 'map' : self.vectorName,
'layer' : self.layer,
'column' : col }
Modified: grass/trunk/raster/r.watershed/front/r.watershed.html
===================================================================
--- grass/trunk/raster/r.watershed/front/r.watershed.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/raster/r.watershed/front/r.watershed.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -398,7 +398,7 @@
r.thin in=rwater.course out=rwater.course.Thin
r.colors -gn rwater.course.Thin color=grey
r.to.vect in=rwater.course.Thin out=rwater_course feature=line
- v.db.dropcol map=rwater_course column=label
+ v.db.dropcolumn map=rwater_course column=label
</pre></div>
<!-- can't set line attribute to catchment it is in as v.what.rast and
v.distance only work for point features. Could create endpoint node
@@ -412,7 +412,7 @@
<div class="code"><pre>
r.watershed elev=elevation.dem basin=rwater.basin thresh=15000
r.to.vect -s in=rwater.basin out=rwater_basins feature=area
- v.db.dropcol map=rwater_basins column=label
+ v.db.dropcolumn map=rwater_basins column=label
v.db.renamecol map=rwater_basins column=value,catchment
</pre></div>
<br>
Modified: grass/trunk/scripts/Makefile
===================================================================
--- grass/trunk/scripts/Makefile 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/Makefile 2009-06-27 10:55:30 UTC (rev 38094)
@@ -42,7 +42,7 @@
v.db.addcol \
v.db.addtable \
v.db.join \
- v.db.dropcol \
+ v.db.dropcolumn \
v.db.droptable \
v.db.renamecol \
v.db.reconnect.all \
Modified: grass/trunk/scripts/db.dropcolumn/db.dropcolumn.html
===================================================================
--- grass/trunk/scripts/db.dropcolumn/db.dropcolumn.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/db.dropcolumn/db.dropcolumn.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -32,7 +32,7 @@
<em><a HREF="db.droptable.html">db.droptable</a></em>,
<em><a HREF="db.execute.html">db.execute</a></em>,
-<em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>
+<em><a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a></em>
<h2>AUTHOR</h2>
Modified: grass/trunk/scripts/v.colors/v.colors.py
===================================================================
--- grass/trunk/scripts/v.colors/v.colors.py 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.colors/v.colors.py 2009-06-27 10:55:30 UTC (rev 38094)
@@ -304,7 +304,7 @@
else:
grass.run_command('g.remove', rast = tmp_colr)
- #v.db.dropcol map=vcol_test col=GRASSRGB
+ #v.db.dropcolumn map=vcol_test col=GRASSRGB
#d.vect -a vcol_test icon=basic/circle color=none size=8
if __name__ == "__main__":
Modified: grass/trunk/scripts/v.db.addcol/v.db.addcol.html
===================================================================
--- grass/trunk/scripts/v.db.addcol/v.db.addcol.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.addcol/v.db.addcol.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -34,7 +34,7 @@
<em><a HREF="db.execute.html">db.execute</a></em>,
<em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
-<em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>,
+<em><a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a></em>,
<em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
<em><a HREF="v.db.select.html">v.db.select</a></em>,
<em><a HREF="v.db.update.html">v.db.update</a></em>
Modified: grass/trunk/scripts/v.db.addtable/v.db.addtable.html
===================================================================
--- grass/trunk/scripts/v.db.addtable/v.db.addtable.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.addtable/v.db.addtable.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -48,7 +48,7 @@
<em><a HREF="v.category.html">v.category</a></em>,
<em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
-<em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>,
+<em><a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a></em>,
<em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
<em><a HREF="v.db.select.html">v.db.select</a></em>,
<em><a HREF="v.db.update.html">v.db.update</a></em><br>
Modified: grass/trunk/scripts/v.db.dropcol/Makefile
===================================================================
--- grass/trunk/scripts/v.db.dropcol/Makefile 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.dropcol/Makefile 2009-06-27 10:55:30 UTC (rev 38094)
@@ -1,6 +1,6 @@
MODULE_TOPDIR = ../..
-PGM = v.db.dropcol
+PGM = v.db.dropcolumn
include $(MODULE_TOPDIR)/include/Make/Script.make
Deleted: grass/trunk/scripts/v.db.dropcol/v.db.dropcol.html
===================================================================
--- grass/trunk/scripts/v.db.dropcol/v.db.dropcol.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.dropcol/v.db.dropcol.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -1,38 +0,0 @@
-<h2>DESCRIPTION</h2>
-
-<em>v.db.dropcol</em> drops a column from the attribute table connected
-to a given vector map. It automatically checks the connection for the specified
-layer. <em>v.db.dropcol</em> omits to delete the 'cat' column which is
-relevant to keep the connection between vector map and table.
-
-<h2>NOTES</h2>
-
-v.db.dropcol is a front-end to <em>db.execute</em> to allow easier usage.
-
-The existing database connection(s) can be verified with <em>v.db.connect</em>.
-
-<h2>EXAMPLES</h2>
-
-Dropping a column:<br>
-<div class="code"><pre>
-v.db.dropcol sentiero_brenta_points column=slope
-v.info -c sentiero_brenta_points
-</pre></div>
-
-<h2>SEE ALSO</h2>
-
-<em><a HREF="db.droptable.html">db.droptable</a></em>,
-<em><a HREF="db.execute.html">db.execute</a></em>,
-<em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
-<em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
-<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
-<em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
-<em><a HREF="v.db.select.html">v.db.select</a></em>,
-<em><a HREF="v.db.update.html">v.db.update</a></em>
-
-
-<h2>AUTHOR</h2>
-
-Markus Neteler
-
-<p><i>Last changed: $Date$</i>
Deleted: grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py
===================================================================
--- grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py 2009-06-27 10:55:30 UTC (rev 38094)
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-
-############################################################################
-#
-# MODULE: v.db.dropcolumn
-# AUTHOR(S): Markus Neteler
-# Converted to Python by Glynn Clements
-# PURPOSE: interface to db.execute to drop a column from the
-# attribute table connected to a given vector map
-# - Based on v.db.addcol
-# - with special trick for SQLite
-# COPYRIGHT: (C) 2007 by the GRASS Development Team
-#
-# This program is free software under the GNU General Public
-# License (>=v2). Read the file COPYING that comes with GRASS
-# for details.
-#
-#############################################################################
-
-
-#%Module
-#% description: Drops a column from the attribute table connected to a given vector map.
-#% keywords: vector, database, attribute table
-#%End
-
-#%option
-#% key: map
-#% type: string
-#% gisprompt: old,vector,vector
-#% key_desc : name
-#% description: Vector map for which to drop attribute column
-#% required : yes
-#%end
-
-#%option
-#% key: layer
-#% type: integer
-#% description: Layer where to drop column
-#% answer: 1
-#% required : no
-#%end
-
-#%option
-#% key: column
-#% type: string
-#% description: Name of the column
-#% required : yes
-#%end
-
-import sys
-import os
-import string
-import grass.script as grass
-
-def main():
- map = options['map']
- layer = options['layer']
- column = options['column']
-
- mapset = grass.gisenv()['MAPSET']
-
- # does map exist in CURRENT mapset?
- if not grass.find_file(map, element = 'vector', mapset = mapset):
- grass.fatal("Vector map <%s> not found in current mapset" % map)
-
- f = grass.vector_layer_db(map, layer)
-
- table = f['table']
- keycol = f['key']
- database = f['database']
- driver = f['driver']
-
- if not table:
- grass.fatal("There is no table connected to the input vector map Cannot delete any column")
-
- if column == keycol:
- grass.fatal("Cannot delete <$col> column as it is needed to keep table <%s> connected to the input vector map <%s>" % (table, map))
-
- if not grass.vector_columns(map, layer).has_key(column):
- grass.fatal("Column <%s> not found in table <%s>" % (column, table))
-
- if driver == "sqlite":
- #echo "Using special trick for SQLite"
- # http://www.sqlite.org/faq.html#q13
- colnames = []
- coltypes = []
- for f in grass.db_describe(table)['cols']:
- if f[0] == column:
- continue
- colnames.append(f[0])
- coltypes.append("%s %s" % (f[0], f[1]))
-
- colnames = ", ".join(colnames)
- coltypes = ", ".join(coltypes)
-
- cmds = [
- "BEGIN TRANSACTION",
- "CREATE TEMPORARY TABLE ${table}_backup(${coldef})",
- "INSERT INTO ${table}_backup SELECT ${colnames} FROM ${table}",
- "DROP TABLE ${table}",
- "CREATE TABLE ${table}(${coldef})",
- "INSERT INTO ${table} SELECT ${colnames} FROM ${table}_backup",
- "DROP TABLE ${table}_backup",
- "COMMIT"
- ]
- tmpl = string.Template(';\n'.join(cmds))
- sql = tmpl.substitute(table = table, coldef = coltypes, colnames = colnames)
- else:
- sql = "ALTER TABLE %s DROP COLUMN %s" % (table, column)
-
- if grass.write_command('db.execute', database = database, driver = driver,
- stdin = sql) != 0:
- grass.fatal("Cannot continue (problem deleting column).")
-
- # write cmd history:
- grass.vector_history(map)
-
-if __name__ == "__main__":
- options, flags = grass.parser()
- main()
Copied: grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.html (from rev 38090, grass/trunk/scripts/v.db.dropcol/v.db.dropcol.html)
===================================================================
--- grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.html (rev 0)
+++ grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -0,0 +1,38 @@
+<h2>DESCRIPTION</h2>
+
+<em>v.db.dropcolumn</em> drops a column from the attribute table connected
+to a given vector map. It automatically checks the connection for the specified
+layer. <em>v.db.dropcolumn</em> omits to delete the 'cat' column which is
+relevant to keep the connection between vector map and table.
+
+<h2>NOTES</h2>
+
+v.db.dropcolumn is a front-end to <em>db.execute</em> to allow easier usage.
+
+The existing database connection(s) can be verified with <em>v.db.connect</em>.
+
+<h2>EXAMPLES</h2>
+
+Dropping a column:<br>
+<div class="code"><pre>
+v.db.dropcolumn sentiero_brenta_points column=slope
+v.info -c sentiero_brenta_points
+</pre></div>
+
+<h2>SEE ALSO</h2>
+
+<em><a HREF="db.droptable.html">db.droptable</a></em>,
+<em><a HREF="db.execute.html">db.execute</a></em>,
+<em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
+<em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
+<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
+<em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
+<em><a HREF="v.db.select.html">v.db.select</a></em>,
+<em><a HREF="v.db.update.html">v.db.update</a></em>
+
+
+<h2>AUTHOR</h2>
+
+Markus Neteler
+
+<p><i>Last changed: $Date$</i>
Property changes on: grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.html
___________________________________________________________________
Added: svn:mime-type
+ text/html
Added: svn:keywords
+ Author Date Id
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Copied: grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.py (from rev 38090, grass/trunk/scripts/v.db.dropcol/v.db.dropcol.py)
===================================================================
--- grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.py (rev 0)
+++ grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.py 2009-06-27 10:55:30 UTC (rev 38094)
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE: v.db.dropcolumn
+# AUTHOR(S): Markus Neteler
+# Converted to Python by Glynn Clements
+# PURPOSE: interface to db.execute to drop a column from the
+# attribute table connected to a given vector map
+# - Based on v.db.addcol
+# - with special trick for SQLite
+# COPYRIGHT: (C) 2007 by the GRASS Development Team
+#
+# This program is free software under the GNU General Public
+# License (>=v2). Read the file COPYING that comes with GRASS
+# for details.
+#
+#############################################################################
+
+
+#%Module
+#% description: Drops a column from the attribute table connected to a given vector map.
+#% keywords: vector, database, attribute table
+#%End
+
+#%option
+#% key: map
+#% type: string
+#% gisprompt: old,vector,vector
+#% key_desc : name
+#% description: Vector map for which to drop attribute column
+#% required : yes
+#%end
+
+#%option
+#% key: layer
+#% type: integer
+#% description: Layer where to drop column
+#% answer: 1
+#% required : no
+#%end
+
+#%option
+#% key: column
+#% type: string
+#% description: Name of the column
+#% required : yes
+#%end
+
+import sys
+import os
+import string
+import grass.script as grass
+
+def main():
+ map = options['map']
+ layer = options['layer']
+ column = options['column']
+
+ mapset = grass.gisenv()['MAPSET']
+
+ # does map exist in CURRENT mapset?
+ if not grass.find_file(map, element = 'vector', mapset = mapset):
+ grass.fatal("Vector map <%s> not found in current mapset" % map)
+
+ f = grass.vector_layer_db(map, layer)
+
+ table = f['table']
+ keycol = f['key']
+ database = f['database']
+ driver = f['driver']
+
+ if not table:
+ grass.fatal("There is no table connected to the input vector map Cannot delete any column")
+
+ if column == keycol:
+ grass.fatal("Cannot delete <$col> column as it is needed to keep table <%s> connected to the input vector map <%s>" % (table, map))
+
+ if not grass.vector_columns(map, layer).has_key(column):
+ grass.fatal("Column <%s> not found in table <%s>" % (column, table))
+
+ if driver == "sqlite":
+ #echo "Using special trick for SQLite"
+ # http://www.sqlite.org/faq.html#q13
+ colnames = []
+ coltypes = []
+ for f in grass.db_describe(table)['cols']:
+ if f[0] == column:
+ continue
+ colnames.append(f[0])
+ coltypes.append("%s %s" % (f[0], f[1]))
+
+ colnames = ", ".join(colnames)
+ coltypes = ", ".join(coltypes)
+
+ cmds = [
+ "BEGIN TRANSACTION",
+ "CREATE TEMPORARY TABLE ${table}_backup(${coldef})",
+ "INSERT INTO ${table}_backup SELECT ${colnames} FROM ${table}",
+ "DROP TABLE ${table}",
+ "CREATE TABLE ${table}(${coldef})",
+ "INSERT INTO ${table} SELECT ${colnames} FROM ${table}_backup",
+ "DROP TABLE ${table}_backup",
+ "COMMIT"
+ ]
+ tmpl = string.Template(';\n'.join(cmds))
+ sql = tmpl.substitute(table = table, coldef = coltypes, colnames = colnames)
+ else:
+ sql = "ALTER TABLE %s DROP COLUMN %s" % (table, column)
+
+ if grass.write_command('db.execute', database = database, driver = driver,
+ stdin = sql) != 0:
+ grass.fatal("Cannot continue (problem deleting column).")
+
+ # write cmd history:
+ grass.vector_history(map)
+
+if __name__ == "__main__":
+ options, flags = grass.parser()
+ main()
Property changes on: grass/trunk/scripts/v.db.dropcol/v.db.dropcolumn.py
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mergeinfo
+
Added: svn:eol-style
+ native
Modified: grass/trunk/scripts/v.db.droptable/v.db.droptable.html
===================================================================
--- grass/trunk/scripts/v.db.droptable/v.db.droptable.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.droptable/v.db.droptable.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -25,7 +25,7 @@
<em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
<em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
-<em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>,
+<em><a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a></em>,
<em><a HREF="v.db.select.html">v.db.select</a></em>,
<em><a HREF="v.db.update.html">v.db.update</a></em>
Modified: grass/trunk/scripts/v.db.renamecol/v.db.renamecol.html
===================================================================
--- grass/trunk/scripts/v.db.renamecol/v.db.renamecol.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.renamecol/v.db.renamecol.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -37,7 +37,7 @@
<em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
<em><a HREF="v.db.addtable.html">v.db.addtable</a></em>,
<em><a HREF="v.db.connect.html">v.db.connect</a></em>,
-<em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>,
+<em><a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a></em>,
<em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
<em><a HREF="v.db.select.html">v.db.select</a></em>,
<em><a HREF="v.db.update.html">v.db.update</a></em>
Modified: grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py
===================================================================
--- grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/scripts/v.db.renamecol/v.db.renamecol.py 2009-06-27 10:55:30 UTC (rev 38094)
@@ -7,7 +7,7 @@
# Converted to Python by Glynn Clements
# PURPOSE: interface to db.execute to drop a column from the
# attribute table connected to a given vector map
-# - Based on v.db.dropcol
+# - Based on v.db.dropcolumn
# - with special trick for SQLite and DBF (here the new col is
# added/values copied/old col deleted)
# COPYRIGHT: (C) 2007 by the GRASS Development Team
@@ -105,7 +105,7 @@
grass.run_command('v.db.addcol', map = map, layer = layer, column = colspec)
sql = "UPDATE %s SET %s=%s" % (table, newcol, oldcol)
grass.write_command('db.execute', database = database, driver = driver, stdin = sql)
- grass.run_command('v.db.dropcol', map = map, layer = layer, column = oldcol)
+ grass.run_command('v.db.dropcolumn', map = map, layer = layer, column = oldcol)
else:
sql = "ALTER TABLE %s RENAME %s TO %s" % (table, oldcol, newcol)
grass.write_command('db.execute', database = database, driver = driver, stdin = sql)
Modified: grass/trunk/vector/v.db.connect/v.db.connect.html
===================================================================
--- grass/trunk/vector/v.db.connect/v.db.connect.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/vector/v.db.connect/v.db.connect.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -196,7 +196,7 @@
<a HREF="v.db.addtable.html">v.db.addtable</a>,
<a HREF="v.db.droptable.html">v.db.droptable</a>,
<a HREF="v.db.addcol.html">v.db.addcol</a>,
-<a HREF="v.db.dropcol.html">v.db.dropcol</a>,
+<a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a>,
<a HREF="v.external.html">v.external</a>,
<a HREF="v.in.db.html">v.in.db</a>,
<a HREF="v.overlay.html">v.overlay</a>
Modified: grass/trunk/vector/v.transform/v.transform.html
===================================================================
--- grass/trunk/vector/v.transform/v.transform.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/vector/v.transform/v.transform.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -99,7 +99,7 @@
# perform transformation to 3D
v.transform -t myarchsites output=myarchsites3d column="zshift:zs" table=myarchsites
# drop table containing transformation parameters
-v.db.dropcol myarchsites3d col=zs
+v.db.dropcolumn myarchsites3d col=zs
</pre></div>
The resulting map is a 3D vector map.
Modified: grass/trunk/vector/v.vol.rst/v.vol.rst.html
===================================================================
--- grass/trunk/vector/v.vol.rst/v.vol.rst.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/vector/v.vol.rst/v.vol.rst.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -86,9 +86,9 @@
v.info -t elevrand_3d
# remove the now superfluous 'x', 'y' and 'value' (z) columns
-v.db.dropcol elevrand_3d col=x
-v.db.dropcol elevrand_3d col=y
-v.db.dropcol elevrand_3d col=value
+v.db.dropcolumn elevrand_3d col=x
+v.db.dropcolumn elevrand_3d col=y
+v.db.dropcolumn elevrand_3d col=value
# add attribute to interpolate
# (Soil range types taken from the USDA Soil Survey)
Modified: grass/trunk/vector/vectorintro.html
===================================================================
--- grass/trunk/vector/vectorintro.html 2009-06-27 10:41:41 UTC (rev 38093)
+++ grass/trunk/vector/vectorintro.html 2009-06-27 10:55:30 UTC (rev 38094)
@@ -198,7 +198,7 @@
However, this can be performed in a single step using <a href="v.db.addtable.html">v.db.addtable</a>
along with the definition of table column types. Column adding and dropping
can be done with <a HREF="v.db.addcol.html">v.db.addcol</a> and
-<a HREF="v.db.dropcol.html">v.db.dropcol</a>. A table column can be renamed with
+<a HREF="v.db.dropcolumn.html">v.db.dropcolumn</a>. A table column can be renamed with
<a HREF="v.db.renamecol.html">v.db.renamecol</a>. To drop a table from a map, use
<a HREF="v.db.droptable.html">v.db.droptable</a>. Values in a table can be updated
with <a HREF="v.db.update.html">v.db.update</a>. Tables can be joined with with
More information about the grass-commit
mailing list