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 (71 lines) | stat: -rw-r--r-- 2,139 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
<H2>DESCRIPTION</H2>

<em>v.to.db</em> load values from vector map to database.

<H2>NOTES</H2>
The units 'miles', 'feet', 'meters' and 'kilometers' are square 
for <em>option=area</em>.
<P>

When using <em>option=coor</em> on a vector area map, 
only coordinates of centroids with unique category will be reported.



<H2>EXAMPLES</H2>

<h3>Updating attribute tables</h3>

Note: Uploading of the attributes of a vector map to the DBMS has to be done 
column-wise. The column must be present in the table 
(use <a href=db.execute.html>db.execute</a> to add a new column if needed).

<P>
Upload category numbers to attribute table (used for new map):<br>
<tt>v.to.db map=soils type=area option=cat</tt> 

<p>
Upload area sizes of each polygon to attribute table:<br>
<tt>v.to.db map=soils type=area option=area col=area_size unit=h</tt>

<p>
Upload line lengths (in meters) of each vector line to attribute table
(use <em>v.category</em> in case of missing categories):<br>
<tt>v.to.db map=roads option=length type=line col=linelength units=me</tt>

<p>
Upload x and y coordinates from vector geometry to attribute table:<br>
<tt>v.to.db map=pointsmap option=coor col=x,y</tt>

<p>
Upload x, y and z coordinates from vector geometry to attribute table:<br>
<tt>v.to.db map=pointsmap option=coor col=x,y,z</tt>

<h3>Printing reports</h3>

Report all area sizes of a map:<br>
<tt>v.to.db -p soils option=area type=boundary units=h</tt>
<p>
Report all area sizes of a map, sorted by category number:<br>
<tt>v.to.db -p soils option=area type=boundary units=h | sort -n</tt>
<p>
Report all line lengths of a map:<br>
<tt>v.to.db -p roads option=length type=line units=k</tt>
<p>
Report number of features for each category in map:<br>
<tt>v.to.db -p roads option=count type=line</tt>

<h2>NOTES</h2>

If the module is apparently slow <b>and</b> the map attributes are stored 
in an external DBMS such as PostgreSQL, it is highly recommended to
create an index on the key (category) column.

<h2>SEE ALSO</h2>

<em><a href="v.category.html">v.category</a></em>

<H2>AUTHOR</H2>
Radim Blazek

<p><i>Last changed: $Date: 2005/05/10 09:04:44 $</i>