r.rescale.pg(1) 	      Grass User's Manual	       r.rescale.pg(1)



NNAAMMEE
       rr..rreessccaallee..ppgg - Generate a raster map layer in which the categories rep-
       resent values in a database column which have been divided  into  equal
       interval units. (GRASS-RDBMS Raster Interface Program)

SSYYNNOOPPSSIISS
       rr..rreessccaallee..ppgg

       rr..rreessccaallee..ppgg hheellpp

       rr..rreessccaallee..ppgg  ttaabb_=_n_a_m_e  kkeeyy_=_n_a_m_e  ccooll_=_n_a_m_e  ccaattss_=_n_a_m_e  iinnppuutt_=_n_a_m_e  oouutt--
       ppuutt_=_n_a_m_e [jjooiinn_=_t_a_b_,_t_a_b_k_e_y_,_p_k_e_y]

DDEESSCCRRIIPPTTIIOONN
       _r_._r_e_s_c_a_l_e_._p_g creates a reclassed raster map layer by dividing the  val-
       ues  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_._r_e_s_c_a_l_e_._p_g evaluates
       the range of values for the database column and	subsets  these	values
       into  equal interval groups of records returned by the query. For exam-
       ple, 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 val-
       ues from the database column used in the rescale operation.  The  data-
       base  column  being  evaluated must be numeric in type. To identify the
       data types of columns in a database table use the  _g_._c_o_l_u_m_n_._p_g  command
       with  the  _[_-_v_]	flag.  _r_._r_e_s_c_a_l_e_._p_g 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 oper-
       ation will be skewed in the direction of these values.

CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS
   PPaarraammeetteerrss::
       ttaabb==ddaattaabbaasseettaabblleennaammee
	      Table containing a column linked to category values in an exist-
	      ing raster map.



       kkeeyy==ddaattaabbaasseeccoolluummnnnnaammee
	      Column  corresponding  to  category values in an existing raster
	      map.



       ccooll==ddaattaabbaasseeccoolluummnnnnaammee
	      Column to base rescale operation on which is numeric in type.



       ccaattss==vvaalluuee
	      Number of categories to define in the resulting reclass map.



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



       oouuttppuutt==mmaapp
	      Name of new raster map



       jjooiinn==ttaabb,,ttaabbkkeeyy,,ppkkeeyy
	      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 link-
       ing stf1main to the GRASS category file. The column pop100 in  stf1main
       will be the basis for the rescale effort. To specify the rescale:


       _r_._r_e_s_c_a_l_e_._p_g  _t_a_b_=_s_t_f_1_m_a_i_n  _k_e_y_=_t_r_a_c_t_b_l_c_k  _c_o_l_=_p_o_p_1_0_0 _c_a_t_s_=_5 _i_n_p_u_t_=_b_l_k_-
       _g_r_p_._i_d_s _o_u_t_p_u_t_=_p_o_p_1_0_0_._r_e_s_c_a_l_e


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

BBUUGGSS
       None known.

NNOOTTEE
       This program requires the Postgres database software.

SSEEEE AALLSSOO
       _v_._r_e_c_l_a_s_s_._p_g

AAUUTTHHOORR
       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)



GRASS 5.0						       r.rescale.pg(1)
