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
85       Either the rules or column option must be specified.
86

EXAMPLES

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

KNOWN ISSUES

113       No table is created for reclassed layer if the rules option is used.
114

SEE ALSO

116        v.dissolve, v.extract
117
118       GRASS SQL interface
119

AUTHORS

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

SOURCE CODE

126       Available at: v.reclass source code (history)
127
128       Accessed: Saturday Oct 28 18:18:46 2023
129
130       Main  index  | Vector index | Topics index | Keywords index | Graphical
131       index | Full index
132
133       © 2003-2023 GRASS Development Team, GRASS GIS 8.3.1 Reference Manual
134
135
136
137GRASS 8.3.1                                                       v.reclass(1)
Impressum