Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Version: 331395 (ubuntu - 24/10/10)

Section: 1 (Commandes utilisateur)


v.db.addtable - Creates and connects a new attribute table to a given layer of an existing vector map.


vector, database, attribute table


v.db.addtable help
v.db.addtable map=name [table=string] [layer=integer] [columns=name type[,name type,...]] [--verbose] [--quiet]



Vector map for which to add new attribute table

Name of new attribute table (default: vector map name)

Layer where to add new attribute table
Default: 1
columns=name type[,name type,...]

Name and type of the new column(s) (types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE)
Default: cat integer


v.db.addtable creates and adds a new attribute table to a given vector map. It links the table to the specified layer of the vector map. If the vector map is not yet linked to any table, new a database link is established based on the MAPSET database settings (see db.connect).


v.db.addtable is a front-end to db.execute to allow easier usage. v.db.addtable will only insert category values into the table for those features which actually have a category value in the relevant layer. The use can add category values automatically by using v.category or manually with v.digit before running v.db.addtable. Or one can run v.db.addtable first and then use either a combinatino of v.category + or v.digit to add the relevant lines to the table. The supported types of columns depend on the database backend. However, all backends should support VARCHAR, INT, DOUBLE PRECISION and DATE. The default dbf backend supports only these types. The existing database connection(s) can be verified with v.db.connect.


Adding a new attribute table with a single column to default layer 1:

v.db.addtable sentiero_brenta_points columns="slope double precision"
v.db.connect -p sentiero_brenta_points -c sentiero_brenta_points

Adding a new attribute table with two columns to layer 2:

v.db.addtable sentiero_brenta_points columns="slope double precision,myname varchar(15)" layer=2
v.db.connect -p sentiero_brenta_points -c sentiero_brenta_points


db.connect, db.droptable, db.execute, v.category, v.db.addcol, v.db.connect, v.db.dropcol, v.db.droptable,, v.db.update
GRASS SQL interface


Markus Neteler

Last changed: $Date: 2008-11-27 20:10:51 +0100 (gio, 27 nov 2008) $

Full index

© 2003-2010 GRASS Development Team

Il y a de certains défauts qui, bien mis en oeuvre,
brillent plus que la vertu même.
-+- François de La Rochefoucauld (1613-1680), Maximes 354 -+-