1v.reclass(1)                GRASS GIS User's Manual               v.reclass(1)
2
3
4

NAME

6       v.reclass   - Changes vector category values for an existing vector map
7       according to results of SQL queries or a value in attribute table  col‐
8       umn.
9

KEYWORDS

11       vector, reclassification, attributes
12

SYNOPSIS

14       v.reclass
15       v.reclass --help
16       v.reclass input=name  [layer=string]   [type=string[,string,...]]  out‐
17       put=name   [column=name]     [rules=name]     [--overwrite]    [--help]
18       [--verbose]  [--quiet]  [--ui]
19
20   Flags:
21       --overwrite
22           Allow output files to overwrite existing files
23
24       --help
25           Print usage summary
26
27       --verbose
28           Verbose module output
29
30       --quiet
31           Quiet module output
32
33       --ui
34           Force launching GUI dialog
35
36   Parameters:
37       input=name [required]
38           Name of input vector map
39           Or data source for direct OGR access
40
41       layer=string
42           Layer number or name
43           Vector  features can have category values in different layers. This
44           number determines which layer to use. When used with direct OGR ac‐
45           cess this is the layer name.
46           Default: 1
47
48       type=string[,string,...]
49           Input feature type
50           Options: point, line, boundary, centroid
51           Default: point,line,boundary,centroid
52
53       output=name [required]
54           Name for output vector map
55
56       column=name
57           The  name  of  the  column whose values are to be used as new cate‐
58           gories
59           The source for the new key column must be type integer or string
60
61       rules=name
62           Full path to the reclass rule file
63

DESCRIPTION

65       v.reclass allows user to create a new vector map based on the reclassi‐
66       fication  of  an existing vector map. It also allows the user to change
67       the key column away from the default of "cat" with the column option.
68
69       Rules file may contain on each row either pair:
70       keyword value
71       (separated by space) or comment beginning with ’#’ (hash).   Definition
72       of  new  category  begins with keyword cat followed by the new category
73       value.  Keyword where specifies SQL where condition.
74

NOTES

76       No table is created for the reclassed map if the column option is  used
77       and  the  column  type is integer (as the result could contain ambigui‐
78       ties).  If the column option is used and the column type is  string,  a
79       new  table  is created containing the newly generated cat numbers and a
80       single column containing the unique string column values, sorted in al‐
81       phabetical order.
82
83       For dissolving common boundaries, see v.dissolve.
84

EXAMPLES

86   Example 1: Reclass by rules
87       v.reclass input=land output=land_u type=boundary rules=land.rcl
88       the rules file contains :
89       # land reclass file
90       cat 1
91       where use = ’E13’ and owner = ’Jara Cimrman’
92       cat 2
93       where use = ’E14’
94       Produces  a  new vector area map land_u containing boundaries from land
95       with area category values selected from database by SQL  select  state‐
96       ment:
97       select  id  from  tland  where  use  = ’E13’ and owner = ’Jara Cimrman’
98       changed to category 1;
99       values selected from database by SQL select statement:
100       select id from tland where use = ’E14’ changed to category 2.
101
102   Example 2: Reclass by attribute column
103       (North Carolina sample dataset)
104       v.reclass in=streams out=streams_by_type column=I_vs_P
105       v.db.select streams_by_type
106       cat|I_vs_P
107       1|intermittent
108       2|perennial
109

KNOWN ISSUES

111       No table is created for reclassed layer if rules option is used.
112

SEE ALSO

114        v.dissolve, v.extract
115
116       GRASS SQL interface
117

AUTHORS

119       R.L. Glenn, USDA, SCS, NHQ-CGIS
120       from v.reclass to v.db.reclass and later to v.reclass in 5.7  rewritten
121       by Radim Blazek
122

SOURCE CODE

124       Available at: v.reclass source code (history)
125
126       Accessed: Mon Jun 20 16:47:13 2022
127
128       Main  index  | Vector index | Topics index | Keywords index | Graphical
129       index | Full index
130
131       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
132
133
134
135GRASS 8.2.0                                                       v.reclass(1)
Impressum