.TH v.category 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBv.category\fR\fR - Attach, delete or report vector categories to map geometry. .SH KEYWORDS vector, category .SH SYNOPSIS \fBv.category\fR .br \fBv.category help\fR .br \fBv.category\fR [\-\fBg\fR] \fBinput\fR=\fIname\fR [\fBoutput\fR=\fIname\fR] [\fBoption\fR=\fIstring\fR] [\fBtype\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBlayer\fR=\fIinteger\fR[,\fIinteger\fR,...]] [\fBids\fR=\fIrange\fR] [\fBcat\fR=\fIinteger\fR] [\fBstep\fR=\fIinteger\fR] [\-\-\fBoverwrite\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-g\fR" 4m .br Shell script style, currently only for report .br Format: layer type count min max .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of input vector map .IP "\fBoutput\fR=\fIname\fR" 4m .br Name for output vector map .IP "\fBoption\fR=\fIstring\fR" 4m .br Action to be done .br Options: \fIadd,del,chlayer,sum,report,print,layers\fR .br Default: \fIadd\fR .br \fBadd\fR: add a category to features without category in the given layer .br \fBdel\fR: delete all categories of given layer .br \fBchlayer\fR: change layer number (e.g. layer=3,1 changes layer 3 to layer 1) .br \fBsum\fR: add the value specified by cat option to the current category value .br \fBreport\fR: print report (statistics), in shell style: layer type count min max .br \fBprint\fR: print category values, more cats in the same layer are separated by '/' .br \fBlayers\fR: print only layer numbers .IP "\fBtype\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Feature type .br Options: \fIpoint,line,boundary,centroid,area\fR .br Default: \fIpoint,line,boundary,centroid,area\fR .IP "\fBlayer\fR=\fIinteger[,\fIinteger\fR,...]\fR" 4m .br Layer number .br A single vector map can be connected to multiple database tables. This number determines which table to use. .br Default: \fI1\fR .IP "\fBids\fR=\fIrange\fR" 4m .br Feature ids (by default all features are processed) .br Example: 1,3,7-9,13 .IP "\fBcat\fR=\fIinteger\fR" 4m .br Category value .br Default: \fI1\fR .IP "\fBstep\fR=\fIinteger\fR" 4m .br Category increment .br Default: \fI1\fR .PP .SH DESCRIPTION \fIv.category\fR attaches, deletes or reports vector categories to map geometry. These categories (IDs) are used to link geometry object(s) to attribute records (from attribute table linked to vector map). .SH NOTES Use \fIv.to.db\fR to upload related categories to a linked attribute table. .PP The \fBtype\fR 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. .PP If the \fBtype\fR parameter is set to \fBcentroid\fR and the \fBoption\fR parameter set to \fBadd\fR, 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 \fIv.digit\fR or by running \fIv.category\fR with the type parameter set to area. .PP 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. .PP The \fBcat\fR parameter is only used with \fBoption\fR=\fIadd\fR and \fBoption\fR=\fIsum\fR. .PP The \fBids\fR parameter specifies the list of feature IDs to which the operation is performed; by default, all vector feature ids are processed. The \fIfeature ID\fR is an internal (unique) geometry ID that all vector primitives possess, and is separate from any category the feature may also possess. \fC .DS .br \fIv.edit\fR map=inputname tool=select .br .DE \fR to find out the geometry ids of certain features. .SH EXAMPLES .SS Report vector categories \fC .DS .br v.category input=testmap option=report .br .br LAYER/TABLE 1/testmap: .br type count min max .br point 0 0 0 .br line 1379 1 1379 .br boundary 0 0 0 .br centroid 0 0 0 .br area 0 0 0 .br all 1379 1 1379 .br .DE \fR .SS Delete all vector categories in layer 1 \fC .DS .br v.category input=testmap output=outmap option=del .br .DE \fR .SS Add vector categories in layer 1 with step=2 \fC .DS .br v.category input=outmap output=stepmap option=add step=2 .br .br # report .br v.category input=stepmap option=report .br LAYER/TABLE 1/outmap: .br type count min max .br point 0 0 0 .br line 1379 1 2757 .br boundary 0 0 0 .br centroid 0 0 0 .br area 0 0 0 .br all 1379 1 2757 .br .DE \fR .SS Add categories/centroids to a vector map without categories \fC .DS .br v.category input=wkt output=wktnew option=add .br .DE \fR Results can be tested using \fId.what.vect\fR. .SS Print vector categories of given layer Print vector categories from the first layer, only for feature ids 1-50. \fC .DS .br v.category input=roads option=print layer=1 id=1-50 .br .DE \fR .SH SEE ALSO \fI v.centroids, v.db.connect, v.edit, v.to.db \fR .SH AUTHOR Radim Blazek, ITC-irst, Trento, Italy .br Modified (the id parameter) by Martin Landa, FBK-irst (formerly ITC-irst), Trento, Italy, 2008/02 .PP \fILast changed: $Date: 2011-11-08 10:42:51 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team