~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to vector/v.category/v.category.html

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
3
<em>v.category</em> attaches, copies, deletes or reports categories of 
 
4
vector geometry objects. Further on, <em>v.category</em> adds a number 
 
5
given by the <em>cat</em> option to categories of the selected layer. 
 
6
These categories (IDs) are used to assign IDs or to group geometry objects
 
7
into categories (several different geometry objects share the same 
 
8
category). These categories are also used to link geometry
 
9
object(s) to attribute records (from an attribute table linked to vector map).
 
10
 
 
11
 
 
12
<h2>NOTES</h2>
 
13
 
 
14
Use <em><a href="v.to.db.html">v.to.db</a></em> to upload related categories
 
15
to a linked attribute table.
 
16
 
 
17
<p>The <b>type</b> parameter specifies the type of geometry objects to which
 
18
the category is added; it is similar to an input filter - only the
 
19
geometry specified in 'type' is processed.
 
20
 
 
21
<p>If the <b>type</b> parameter is set to <b>centroid</b> and
 
22
the <b>option</b> parameter set to <b>add</b>, new categories will be
 
23
added to existing centroids. Note however, that new centroids cannot
 
24
be created this way.  To do so, they must be added manually
 
25
using <em><a href="wxGUI.vdigit.html">wxGUI vector
 
26
digitizer</a></em> or by running <em>v.category</em> with the type
 
27
parameter set to area.
 
28
 
 
29
<p>If categories are copied with <em>option=transfer</em>, a warning is 
 
30
issued if categories already exit in the layer they are copied to. In 
 
31
this case the user must make sure beforehand that copying categories 
 
32
from one layer to another layer does not cause undesired grouping of 
 
33
different geometry objects into the same categories. This can be avoided 
 
34
by specifying only one <em>layer</em>. The module will then find the 
 
35
next free layer number and copy categories to there. The new layer number 
 
36
is reported at the end.
 
37
    
 
38
<p>Areas are a special case because it is impossible to attach a cat to
 
39
an area without a centroid; in this case, the module places new
 
40
centroids in areas automatically.
 
41
 
 
42
<p>The <b>cat</b> parameter is only used with <b>option</b>=<i>add</i>, 
 
43
<b>option</b>=<i>sum</i> and <b>option</b>=<i>del</i>.
 
44
 
 
45
<p>Categories can be deleted for the given layer with <em>option=del</em>. 
 
46
If <b>cat</b> is set to <i>-1</i>, all categories for the given layer 
 
47
are deleted. If <b>cat</b> is zero or positive, only this category value 
 
48
will be deleted. By default, <b>cat</b> is set to <i>1</i> which means 
 
49
that only categories of value <i>1</i> will be deleted. 
 
50
 
 
51
 
 
52
<p>The <b>ids</b> parameter specifies the list of feature IDs to which the
 
53
operation is performed; by default, all vector feature ids are processed. 
 
54
The <i>feature ID</i> is an internal (unique) geometry ID that all vector
 
55
primitives possess, and is separate from any category the feature may
 
56
also possess. 
 
57
Use <div class="code"><pre>
 
58
  <em><a href="v.edit.html">v.edit</a></em> map=inputname tool=select
 
59
</pre></div>
 
60
to find out the geometry ids of certain features.
 
61
 
 
62
 
 
63
<h2>EXAMPLES</h2>
 
64
 
 
65
<h3>Report vector categories</h3>
 
66
 
 
67
<div class="code"><pre>
 
68
v.category input=testmap option=report
 
69
 
 
70
LAYER/TABLE 1/testmap:
 
71
type       count        min        max
 
72
point          0          0          0
 
73
line        1379          1       1379
 
74
boundary       0          0          0
 
75
centroid       0          0          0
 
76
area           0          0          0
 
77
all         1379          1       1379
 
78
</pre></div>
 
79
 
 
80
<h3>Delete all vector categories in layer 1</h3>
 
81
 
 
82
<div class="code"><pre>
 
83
v.category input=testmap output=outmap option=del cat=-1
 
84
</pre></div>
 
85
 
 
86
<h3>Add vector categories in layer 1 with step=2</h3>
 
87
 
 
88
<div class="code"><pre>
 
89
v.category input=outmap output=stepmap option=add step=2
 
90
 
 
91
# report
 
92
v.category input=stepmap option=report
 
93
LAYER/TABLE 1/outmap:
 
94
type       count        min        max
 
95
point          0          0          0
 
96
line        1379          1       2757
 
97
boundary       0          0          0
 
98
centroid       0          0          0
 
99
area           0          0          0
 
100
all         1379          1       2757
 
101
</pre></div>
 
102
 
 
103
<h3>Add categories/centroids to a vector map without categories</h3>
 
104
 
 
105
<div class="code"><pre>
 
106
v.category input=wkt output=wktnew option=add
 
107
</pre></div>
 
108
 
 
109
Results can be tested
 
110
using <em><a href="d.what.vect.html">d.what.vect</a></em>.
 
111
 
 
112
<h3>Copy categories from layer 1 to layer 2,3,4,5,6,7 and 8</h3>
 
113
Existing layer will be overwritten, non-existing will be created.
 
114
<div class="code"><pre>
 
115
v.category input=observer output=observer_new option=transfer layer=1,2,3,4,5,6,7,8
 
116
</pre></div>
 
117
 
 
118
<h3>Print vector categories of given layer</h3>
 
119
 
 
120
Print vector categories from the first layer, only for feature ids 1-50.
 
121
 
 
122
<div class="code"><pre>
 
123
v.category input=roads option=print layer=1 id=1-50
 
124
</pre></div>
 
125
 
 
126
 
 
127
<h2>SEE ALSO</h2>
 
128
 
 
129
<em>
 
130
<a href="v.centroids.html">v.centroids</a>,
 
131
<a href="v.db.connect.html">v.db.connect</a>,
 
132
<a href="v.edit.html">v.edit</a>,
 
133
<a href="v.to.db.html">v.to.db</a>
 
134
</em>
 
135
 
 
136
 
 
137
<h2>AUTHOR</h2>
 
138
 
 
139
Radim Blazek, ITC-irst, Trento, Italy<br>
 
140
Modified (the id parameter) by Martin Landa,
 
141
  FBK-irst (formerly ITC-irst), Trento, Italy, 2008/02
 
142
 
 
143
<p><i>Last changed: $Date: 2014-04-11 17:48:44 +0200 (Fri, 11 Apr 2014) $</i>