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 (65 lines) | stat: -rw-r--r-- 1,766 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
<H2>DESCRIPTION</H2>

<em>v.in.db</em> 
creates new vector (points) map from database table containing coordinates. 

<H2>EXAMPLE</H2>

<b>1) Creating a map from PostgreSQL table:</b>

<pre>
 v.in.db driver=pg database="host=myserver.itc.it,dbname=mydb,user=name" \
         table=pat_stazioni x=east y=north z=quota key=id output=pat_stazioni
</pre>
<P>
If an ID column is not not present in the PostgreSQL table,
the 'object ID' of PostgreSQL can be used. In this case set:<br>
<pre>
  cat=OID
</pre>
<P>
<p>

<b>2) Creating a map from PostGIS:</b>

To extract coordinate values from PostGIS, functions have to be used:
<pre>
 v.in.db driver=pg database="host=myserver.itc.it,dbname=mydb,user=name" \
         table=station x="x(geom)" y="y(geom)" z="z(geom)" key=id out=meteostations
</pre>
<P>
If an ID column is not not present in the PostgreSQL table,
the 'object ID' of PostgreSQL can be used. In this case set:<br>
<pre>
  cat=OID
</pre>
<P>
<P>

<b>3) Import of a points table (x, y, z) from DBF file to vector points map:</b>
<P>
The DBF file has to be copied into $MAPSET/dbf/ (to be created
if not existing yet). Then the DBMI needs to be connected to
this directory:

<pre>
 #check current DB settings:
 db.connect -p
 #only needed, if not already defined:
 db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'

 #create vector map from DBF table ('idcol' is containing unique row IDs):
 v.in.db table=pointsfile x=x y=y z=z key=idcol out=dtmpoints

 #check result:
 v.info dtmpoints
 v.info -c dtmpoints
</pre>
<P>
If an ID column is missing in the DBF file, such a column with unique
IDs has to be added beforehand.

<H2>AUTHOR</H2>
<A HREF=mailto:blazek@itc.it>Radim Blazek</A>

<p><i>Last changed: $Date: 2005/02/03 10:58:40 $</i>