NAME

r.rescale.pg - Generate a raster map layer in which the categories represent values in a database column which have been divided into equal interval units. (GRASS-RDBMS Raster Interface Program)

SYNOPSIS

r.rescale.pg
r.rescale.pg help
r.rescale.pg tab=name key=name col=name cats=name input=name output=name [join=tab,tabkey,pkey]

DESCRIPTION

r.rescale.pg creates a reclassed raster map layer by dividing the values in a numeric column in the currently selected database into equal interval units. The number of resulting categories is determined by the user via the command line parameter [cats=]. r.rescale.pg evaluates the range of values for the database column and subsets these values into equal interval groups of records returned by the query. For example, if the database column contains values which range from 1-1000 and the [cats] value is equal to 10 the resulting raster map layer will contain the 10 categories:1=1-100, 2=101-200 etc. In other words, each category in the new raster map layer will represent a range of 100 values from the database column used in the rescale operation. The database column being evaluated must be numeric in type. To identify the data types of columns in a database table use the g.column.pg command with the [-v] flag. r.rescale.pg does not take outlying data values into account. Therefore, if the range of values for a database column contains a limited number of extreme values the resulting rescale operation will be skewed in the direction of these values.

COMMAND LINE OPTIONS

Parameters:

tab=databasetablename
Table containing a column linked to category values in an existing raster map.

key=databasecolumnname
Column corresponding to category values in an existing raster map.

col=databasecolumnname
Column to base rescale operation on which is numeric in type.

cats=value
Number of categories to define in the resulting reclass map.

input=map
Name of an existing raster file with category values linked to a column in the currently selected databae.

output=map
Name of new raster map

join=tab,tabkey,pkey
Tab is the table used to develop the current postQUEL query. Tabkey is the database column used to relate information in this table with data in the table linked to the GRASS category file. Pkey is the associated column in the table linked to the GRASS category file which is related to tabkey in the current table.

For instance, assume that stf1main is a table containing column values associated with category values in a the GRASS raster file blkgrp.ids. In addition, assume that stf1main is a table containing attribute data on age in the column pop100. In this example stf1main is the table associated with the GRASS raster map and tractblck is the column linking stf1main to the GRASS category file. The column pop100 in stf1main will be the basis for the rescale effort. To specify the rescale:

r.rescale.pg tab=stf1main key=tractblck col=pop100 cats=5 input=blkgrp.ids output=pop100.rescale

Specifying these conditions would insure that all rows from table stf1main which satisfy the query criteria would be related to the spatial features in the GRASS data layer via the GRASS category values.

BUGS

None known.

NOTE

This program requires the Postgres database software.

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, v.reclass.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)