## NAME

v.category - Attach, delete or report vector categories to map geometry.

## SYNOPSIS

v.category
v.category help
v.category [-g] input=string [output=string] [type=string[,string,...]] [option=string] [cat=integer] [layer=integer[,integer,...]] [step=integer]

### Flags:

-g
  shell script style, currently only for report

### Parameters:

input=string
  Name of input vector
output=string
  Name of output vector
type=string[,string,...]
  Type
  Options: point,line,boundary,centroid,area
  Default: point,line,boundary,centroid,area
option=string
  Action to be done:
  add - add a new category
  del - delete category
  chlayer - change layer number (e.g. layer=3,1 changes layer 3 to layer 1)
  sum - add the value specified by cat option to the current category value
  report - print report (statistics), in shell style:
  layer type count min max
  print - print category values, more cats in the same layer are separated by '/'
  Options: add,del,chlayer,sum,report,print
  Default: add
cat=integer
  Category value
  Default: 1
layer=integer[,integer,...]
  Layer number
  Default: 1
step=integer
  Category increment
  Default: 1

## 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 the related categories a linked attribute table.

## EXAMPLES

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

    FIELD 1:
    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 field 1
v.category in=testmap out=outmap option=del

3) Add vector categories in field 1 with step=2
v.category in=outmap out=stepmap option=add step=2

    FIELD 1:
    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: 2005/06/21 19:40:48 $

Help Index