File: description.html

package info (click to toggle)
grass 6.0.2-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 40,044 kB
  • ctags: 31,303
  • sloc: ansic: 321,125; tcl: 25,676; sh: 11,176; cpp: 10,098; makefile: 5,025; fortran: 1,846; yacc: 493; lex: 462; perl: 133; sed: 1
file content (73 lines) | stat: -rw-r--r-- 2,317 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<h2>DESCRIPTION</h2>

<em>v.db.connect</em> prints or sets database connection for a vector map.

<h2>NOTE</h2>

If parameters for database connection are already set with 
<a HREF="db.connect.html">db.connect</a>, they are taken as default values and
do not need to be spcified each time.

<p>

<b>Attention:</b> Removing a vector map will also delete all tables linked to it! If
you use v.db.connect to link further tables to your map, it is advisable to 
make a copy from those tables first and connect the copied tables to 
the vector map (see also <a HREF="v.overlay.html">v.overlay</a>).

<h2>EXAMPLE</h2>

<em>Print database connection</em>
<br>
<b>v.db.connect -p map=</b><em>vectormap</em>

<p>
<em>Print column types and names of table linked to vector map</em>
<br>
<b>v.db.connect -c map=</b><em>vectormap</em>

<h3>Connect vector map to database (DBF driver)</h3>

<em>Connect vector map to database with variables</em><br>

Using default DB connection:<br>
<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em>

<p>
Using hardcoded path to DBF directory:<br>
<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em>  
<b>database=</b><em>/home/user/grassdata/spearfish60/PERMANENT/dbf</em>

<p>
Using variable as DBF directory definition, single quotes must be used:<br>
<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em>
<b>database=</b><em>'$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'</em>

<p>
<em>Connect vector map layer 2 and key ID to database with variables</em><br>
(note: if needed, single quotes must be used for the <em>database</em> parameter)<br>

<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em> 
<b>layer=</b>2 <b>key=</b><em>ID</em>


<h3>Connect vector map to database (PostgreSQL driver)</h3>

<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em> 
<b>layer=</b>1 <b>key=</b><em>oid</em> <b>driver=</b><em>pg</em> 
<b>database=</b><em>"host=myserver.itc.it,dbname=mydb,user=name"</em> 
 <b>table=</b><em>mytable</em> <b>key=</b><em>id</em>

<h2>SEE ALSO</h2>

<em>
<a HREF="db.connect.html">db.connect</a>,
<a HREF="db.copy.html">db.copy</a>,
<a HREF="v.overlay.html">v.overlay</a>,
</em>

<h2>AUTHOR</h2>

Radim Blazek, ITC-Irst, Trento, Italy

<p><i>Last changed: $Date: 2005/10/20 15:20:01 $</i>