.TH v.reclass 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBv.reclass\fR\fR - Changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column. .SH KEYWORDS vector, reclass, attributes .SH SYNOPSIS \fBv.reclass\fR .br \fBv.reclass help\fR .br \fBv.reclass input\fR=\fIname\fR \fBoutput\fR=\fIname\fR [\fBtype\fR=\fIstring\fR[,\fIstring\fR,...]] [\fBlayer\fR=\fIinteger\fR] [\fBcolumn\fR=\fIname\fR] [\fBrules\fR=\fIname\fR] [\-\-\fBoverwrite\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .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 "\fBtype\fR=\fIstring[,\fIstring\fR,...]\fR" 4m .br Feature type .br Options: \fIpoint,line,boundary,centroid\fR .br Default: \fIpoint,line,boundary,centroid\fR .IP "\fBlayer\fR=\fIinteger\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 "\fBcolumn\fR=\fIname\fR" 4m .br The name of the column whose values are to be used as new categories .br The source for the new key column must be type integer or string .IP "\fBrules\fR=\fIname\fR" 4m .br Full path to the reclass rule file .PP .SH DESCRIPTION \fIv.reclass\fR allows user to create a new vector map based on the reclassification of an existing vector map. It also allows the user to change the \fIkey column\fR away from the default of "\fBcat\fR" with the \fBcolumn\fR option. .PP Rules file may contain on each row either pair: \fC .DS .br keyword value .br .DE \fR (separated by space) or comment beginning with '#' (hash). Definition of new category begins with keyword \fIcat\fR followed by the new category value. Keyword \fIwhere\fR specifies SQL where condition. .SH NOTES No table is created for the reclassed map if the \fBcolumn\fR option is used and the column type is integer (as the result could contain ambiguities). If the \fBcolumn\fR option is used and the column type is string, a new table is created containing the newly generated cat numbers and a single column containing the unique string column values, sorted in alphabetical order. .PP For dissolving common boundaries, see \fIv.dissolve\fR. .SH EXAMPLES .SS Example 1: Reclass by rules \fC .DS .br v.reclass input=land output=land_u type=boundary rules=land.rcl .br .DE \fR the rules file contains : \fC .DS .br # land reclass file .br cat 1 .br where use = 'E13' and owner = 'Jara Cimrman' .br cat 2 .br where use = 'E14' .br .DE \fR Produces a new vector area map \fIland_u\fR containing boundaries from \fIland\fR with area category values selected from database by SQL select statement: .br select id from tland where use = 'E13' and owner = 'Jara Cimrman' changed to category 1; .br values selected from database by SQL select statement: .br select id from tland where use = 'E14' changed to category 2. .SS Example 2: Reclass by attribute column (North Carolina sample dataset) .br \fC .DS .br v.reclass in=streams out=streams_by_type column=I_vs_P .br .br v.db.select streams_by_type .br cat|I_vs_P .br 1|intermittent .br 2|perennial .br .DE \fR .SH BUGS No table is created for reclassed layer if \fBrules\fR option is used. .SH SEE ALSO \fI v.dissolve, v.extract \fR .PP \fIGRASS SQL interface\fR .SH AUTHOR R.L. Glenn, USDA, SCS, NHQ-CGIS .br from v.reclass to v.db.reclass and later to v.reclass in 5.7 rewritten by Radim Blazek .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team