v.reclass(1)
π v.reclass β GRASS GIS User's Manual β¨
okay bestie, pull up a chair, we're doing vector reclassification today and honestly? it's giving glow-up. this is the v.reclass(1) page from the GRASS GIS User's Manual, and by the end of this you're gonna be changing category values like it's nothing. no cap. π¦
πΈ NAME πΈ
v.reclass β changes vector category values for an existing vector map according to results of SQL queries or a value in attribute table column.
like. it takes your map's categories and gives them a whole new identity. main character energy fr. π
π KEYWORDS π
vector, reclassification, attributes
β¨ SYNOPSIS β¨
v.reclass
v.reclass --help
v.reclass input=name [layer=string] [type=string[,string,...]]
output=name [column=name] [rules=name] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
π«Ά Flags:
--overwriteβ Allow output files to overwrite existing files--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
π Parameters:
input=name[required] β Name of input vector map. Or data source for direct OGR accesslayer=stringβ Layer number or name. Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. Default:1type=string[,string,...]β Input feature type. Options:point,line,boundary,centroid. Default:point,line,boundary,centroidoutput=name[required] β Name for output vector mapcolumn=nameβ The name of the column whose values are to be used as new categories. The source for the new key column must be type integer or stringrules=nameβ Full path to the reclass rule file
π DESCRIPTION π
so v.reclass lets you create a brand new vector map based on the reclassification of an existing one. that's the whole vibe. β¨
it ALSO lets you move the key column away from the default of "cat" β just say the word with the column option. iconic.
now, your rules file? each row is one of two things: either a pair β
keyword value
(separated by a space) β or a comment beginning with β#β (hash). okay so a new category definition starts with the keyword cat, followed by the new category value. and the keyword where specifies the SQL where condition. that's it, that's the whole grammar. π
π NOTES π
listen, this part matters:
No table is created for the reclassed map if the column option is used and the column type is integer (as the result could contain ambiguities). π
But if the column 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. slay.
For dissolving common boundaries, see v.dissolve. π¦
Either therulesorcolumnoption must be specified. one of them. you can't skip both, bestie. π
π EXAMPLES π
π Example 1: Reclass by rules
v.reclass input=land output=land_u type=boundary rules=land.rcl
The rules file contains:
# land reclass file
cat 1
where use = βE13β and owner = βJara Cimrmanβ
cat 2
where use = βE14β
Produces a new vector area map land_u containing boundaries from land with area category values selected from database by SQL select statement:
select id from tland where use = βE13β and owner = βJara Cimrmanβ
changed to category 1;
values selected from database by SQL select statement:
select id from tland where use = βE14β
changed to category 2.
π Example 2: Reclass by attribute column
(North Carolina sample dataset)
v.reclass in=streams out=streams_by_type column=I_vs_P
v.db.select streams_by_type
cat|I_vs_P
1|intermittent
2|perennial
π KNOWN ISSUES π
No table is created for reclassed layer if the rules option is used.
yeah. that's just how it is. noted. π
π§ SEE ALSO π§
v.dissolve, v.extract
GRASS SQL interface
π AUTHORS π
R.L. Glenn, USDA, SCS, NHQ-CGIS
from v.reclass to v.db.reclass and later to v.reclass in 5.7 rewritten by Radim Blazek
β SOURCE CODE β
Available at: v.reclass source code (history)
Accessed: Saturday Jan 17 05:41:29 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
and that's the whole page, bestie!! π this was GRASS GIS 8.4.2, accessed Saturday Jan 17 05:41:29 2026, and yeah the footer said GRASS 8.4.2 and v.reclass(1) too β we love a consistent queen. go reclass something. periodt. β¨ππ¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms