NAME
v.reclass.pg - Generate new vector map layer derived from
attribute data in the currently selected database. (GRASS-RDBMS Vector
Interface Program)
SYNOPSIS
v.reclass.pg
v.reclass.pg help
v.reclass.pg [-d] input=name key=name
tab=name col=name [where=name] [output=name]
type=name
v.reclass.pg [-sd] sql=file input=name
[output=name] type=name
DESCRIPTION
v.reclass.pg reclasses vector maps according to the SELECT
query. The input map may be of vector area, line or vector site type, resulting
in the reclass map of the same type.
The sql file if chosen to input contains a single line like: 'select
key_col, reclass_col from info_tab [where clause]'.
The users needs to either input two names of the columns interactively
or feed them from the input sql file. The first name is the old map key
column, the second one is the key for the new map. Additionally, a clause
to choose only some vectors to be reclassed from the input map can be imposed
by user, either interactively or from the input file. Both columns used
for creating the reclass rules must be of numeric (integer) type.
If the user omitted the output map name, the reclass map would only
be displayed on monitor and not created.
COMMAND LINE OPTIONS
Flag:
-
-d
-
Dissolve common boundaries between reclassed areas
Parameters:
-
sql=filename
-
Name of file containing SQL query statements
-
key=databasecolumnname
-
Key column in db
-
tab=name
-
Table containing [col]
-
col=name
-
Column to base reclass on
-
where=name
-
Where clause for query (ie. where col='paved')
-
type=area/line/site
-
Select area, line or site as type of the input/output vector map
-
input=map
-
Name of existing vector file to be reclassed using query output.
-
output=map
-
Name of new raster (reclass) file
EXAMPLE:
1. Reclass to vector map of quartiles from forest stands map (kuruma_id).
v.reclass.pg -s -d sql=reclass.sql input=kuruma_id output=kuruma_quart
type=area
and reclass.sql is:
select rec_id, quartnum from info_kuruma
2. Reclass to vector map of forest types (kuruma_oak) from map
of forest plots (kuruma_id) taking only oak (types 32-37).
v.reclass.pg -d kuruma_id key=rec_id col=type_id tab=info_kuruma
where='type_id > 31 and type_id < 38' output=kuruma_oak type=area
BUGS
None known.
NOTE
This program requires the PostgreSQL database
software. It uses other GRASS modules v.reclass and
d.vect
launched from inside.
SEE ALSO
g.column.pg, g.select.pg,
g.stats.pg,
g.table.pg,
d.rast.pg,
d.site.pg,
d.vect.pg,
d.what.r.pg,
d.what.s.pg,
d.what.v.pg,
r.reclass.pg,
r.rescale.pg
AUTHOR
Original Informix SQL-tools: James A. Farley, Wang Song, and W. Fredrick
Limp University of Arkansas, CAST
Postgres modifications: Janne Soimasuo, Faculty of Forestry, University
of Joensuu, Finland.
Updated to GRASS 5 by Alex Shevlakov (sixote@yahoo.com)