File: description.html

package info (click to toggle)
grass 6.0.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 38,764 kB
  • ctags: 31,167
  • sloc: ansic: 320,650; tcl: 25,669; cpp: 10,098; sh: 9,695; makefile: 4,714; fortran: 1,846; yacc: 493; lex: 462; perl: 133; sed: 1
file content (69 lines) | stat: -rw-r--r-- 2,348 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
<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>

<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em> 
<b>field=</b>1 <b>key=</b><em>cat</em> <b>driver=</b><em>dbf</em> 
<b>database=</b><em>/daten/grassdata/fire/PERMANENT/dbf</em>

<p>
<em>Connect vector map to database with variables</em><br>
(note: single quotes must be used)<br>

<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em> 
<b>field=</b>1 <b>key=</b><em>cat</em> <b>driver=</b><em>dbf</em> 
<b>database=</b><em>'$GISDBASE/$LOCATION_NAME/PERMANENT/dbf'</em>

<p>
<em>Connect vector map to database with variables</em><br>
(note: single quotes must be used)<br>

<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em> 
<b>field=</b>1 <b>key=</b><em>cat</em> <b>driver=</b><em>dbf</em> 
<b>database=</b><em>'$GISDBASE/$LOCATION_NAME/$MAPSET/dbf'</em>

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

<b>db.describe -c map=</b><em>vectormap</em><br>
<b>v.db.connect map=</b><em>vectormap</em> <b>table=</b><em>table</em> 
<b>field=</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></em><br>
<em><a HREF="db.copy.html">db.copy</a></em><br>
<em><a HREF="v.overlay.html">v.overlay</a></em>

<h2>AUTHOR</h2>

Radim Blazek, ITC-Irst, Trento, Italy

<p><i>Last changed: $Date: 2005/02/03 10:59:51 $</i>