NAME

v.db.reclass - Changes vector category values for an existing vector map according to results of SQL queries.
(GRASS Vector Program)

SYNOPSIS

v.db.reclass
v.db.reclass help
v.db.reclass [ -d] type=name input=name output=name table=name [key=name] rules=name [TITLE=name ]

DESCRIPTION

v.db.reclass allows a user to create a new vector map based on the reclassification of an existing vector map. The user provides the program with a rules file, input vector map name, an output vector map name, and the type of input map, table, key. There is an option (d) to dissolve common boundaries between adjoining map areas of the same re-classed category value.

Note: The dissolve option will work on only those areas which are of the same conversion category value. If a map area is inside (island) a converted area and is NOT converted to the same value, its boundaries are output to the resultant map.

COMMAND LINE OPTIONS

Flags:

-d
Dissolve common boundaries (default is no) .

Parameters:

type=name
Select area, line, or site.
Options: area, line, site (multiple allowed)
input=name
Vector input map name.
output=name
Vector output map name.
table=name
Database table.
key=name
Column corresponding to cats in vector map.
rules=name
Name of text file containing reclassification rules. Rules file may contain on each row either pair:
keyword value
(separated by space) or comment beginning by #(hash). Definition of new category begins with kyeword cat followed by new category value. Keyword where specifies SQL where condition and optionaly label keyword specifies category label.
TITLE=name
Title for the resulting vector map.

EXAMPLE

v.db.reclass -d input=land output=land_u type=area table=tland key=id rules=land.rcl

the rules file contains :

# land reclass file
cat 1
where use = 'E13' and owner = 'Jara Cimrman'
cat 2
where use = 'E14'
label Use type E14
Produces a new vector area file land_u containing 'area' 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. Any common boundaries are dissolved.

SEE ALSO

v.extract

AUTHOR

R.L. Glenn, USDA, SCS, NHQ-CGIS
from v.reclass to v.db.reclass rewritten by Radim Blazek