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



NNAAMMEE
       rr..rreeccllaassss..ppgg  - Generate a new raster reclass map based on
       the results of multiple queries to the currently  selected
       database. (GRASS-RDBMS Raster Interface Program)

SSYYNNOOPPSSIISS
       rr..rreeccllaassss..ppgg

       rr..rreeccllaassss..ppgg hheellpp

       rr..rreeccllaassss..ppgg   ssqqll_=_f_i_l_e	iinnppuutt_=_n_a_m_e  kkeeyy_=_n_a_m_e  oouuttppuutt_=_n_a_m_e
       [llaabbeell_=_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _r_._r_e_c_l_a_s_s_._p_g generates reclass rules for a new raster  map
       layer based on the results of multiple queries to the cur-
       rently selected database. The user constructs a series  of
       mutually  exclusive  SQL  retrieve  statments  designed to
       return groups of records from the database. Each group  of
       records	should	be  interanally  consistent  in  terms of
       attribute characteristics specified by  the  user  in  the
       retrieve  clause.   These  groups  should also be mutually
       exclusive, thereby insuring that a  row	returned  by  one
       retrieve  clause  is  not  also	returned  by a subsequent
       retrieve clause. Each group of records therefore forms the
       basis  for a single category in the resulting GRASS raster
       reclass map.  _r_._r_e_c_l_a_s_s_._p_g processes each retrieve  state-
       ment in order generating the GRASS reclass rules needed to
       create a new raster map. As each retrieve statment is pro-
       cessed  the  group  of  records returned receives a common
       category value. The category value is incremented  by  one
       for  each subsequent retrieve statment which is processed.
       The resulting reclass map will have one category for  each
       of the original retrieve statements and an additional cat-
       egory for no data areas. No data  in  this  case  includes
       actual  no  data  areas	and  areas for which no rows were
       returned by the database queries.

CCOOMMMMAANNDD LLIINNEE OOPPTTIIOONNSS
   PPaarraammeetteerrss::
       ssqqll==ffiilleennaammee
	      Name of file containing SQL query statements.



       iinnppuutt==mmaapp
	      Name of an existing raster map layer.



       kkeeyy==ddaattaabbaasseeccoolluummnnnnaammee
	      Name of the database column linked to GRASS via the
	      categories in the input map layer.



       oouuttppuutt==mmaapp
	      Name of new raster (reclass), file.



       llaabbeell==nnaammee
	      Label for new categories.



       EEXXAAMMPPLLEE::


       _r_._r_e_c_l_a_s_s_._p_g  _s_q_l_=_d_b_r_r_._s_q_l  _k_e_y_=_g_r_a_s_s_c_a_t  _i_n_p_u_t_=_s_e_c_o_._s_o_i_l_s
       _o_u_t_p_u_t_=_t_f_a_c_t_._r_e_c_l _l_a_b_e_l_=_"_T_f_a_c_t_=_"


       dbrr.sql:

       _r_e_t_r_i_e_v_e _(_s_e_c_o_s_o_i_l_c_a_t_s_._g_r_a_s_s_c_a_t_)

       _w_h_e_r_e   _l_a_y_e_r_._t_f_a_c_t   _>_0   _a_n_d	_l_a_y_e_r_._t_f_a_c_t    _<_=_2    _a_n_d
       _l_a_y_e_r_._m_u_i_d_=_s_e_c_o_s_o_i_l_c_a_t_s_._m_u_i_d


       retrieve (secosoilcats.grasscat)

       where	layer.tfact    >0   and   layer.tfact	<=2   and
       layer.muid=secosoilcats.muid


       retrieve (secosoilcats.grasscat)

       where layer.tfact = 5 and layer.muid=secosoilcats.muid



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.reclass.pg(1)
