DESCRIPTION

v.category attaches, deletes or reports vector categories to map geometry. These categories (IDs) are used to link a vector map to an attribute table.

NOTES

Use v.to.db to upload related categories to a linked attribute table.

The type parameter specifies the type of geometry objects to which the category is added; it is similar to an input filter - only the geometry specified in 'type' is processed.

If the type parameter is set to centroid and the option parameter set to add, new categories will be added to existing centroids. Note however, that new centroids cannot be created this way. To do so, they must be added manually using v.digit or by running v.category with the type parameter set to area (see below also).

Areas are a special case because it is impossible to attach a cat to an area without a centroid; in this case, the module places new centroids in areas automatically.

EXAMPLES

1) Report vector categories
v.category in=testmap option=report

LAYER/TABLE 1/testmap:
type       count        min        max
point          0          0          0
line        1379          1       1379
boundary       0          0          0
centroid       0          0          0
area           0          0          0
all         1379          1       1379

2) Delete all vector categories in layer 1

v.category in=testmap out=outmap option=del

3) Add vector categories in layer 1 with step=2

v.category in=outmap out=stepmap option=add step=2

LAYER/TABLE 1/outmap:
type       count        min        max
point          0          0          0
line        1379          1       2757
boundary       0          0          0
centroid       0          0          0
area           0          0          0
all         1379          1       2757

4) Add categories/centroids to a vector map without categories

v.category in=wkt out=wktnew option=add

Results can be tested using d.what.vect.

SEE ALSO

v.db.connect, v.to.db

AUTHOR

Radim Blazek, ITC-Irst, Trento, Italy

Last changed: $Date$