v.reclass(1)		      Grass User's Manual		  v.reclass(1)



NNAAMMEE
       vv..rreeccllaassss  -  Creates  a  new map layer whose category values are based
       upon the user's reclassification of categories in  an  existing	vector
       map layer. (SCS GRASS Vector Program)

SSYYNNOOPPSSIISS
       vv..rreeccllaassss

       vv..rreeccllaassss hheellpp

       vv..rreeccllaassss   [[--dd]]   iinnppuutt_=_n_a_m_e  oouuttppuutt_=_n_a_m_e  ttyyppee_=_a_r_e_a_,  _l_i_n_e_,  _o_r  _s_i_t_e
       [ttiittllee_=_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _v_._r_e_c_l_a_s_s creates an output map layer based  on	an  input  vector  map
       layer.  The  output  map  layer will be a reclassification of the input
       map layer based on reclass rules input to _v_._r_e_c_l_a_s_s.  A title  for  the
       output map layer may be (optionally) specified by the user.


       The  reclass  rules  are  read from standard input (i.e., from the key-
       board, redirected from a file, or piped through another program).

OOPPTTIIOONNSS
       The user can run this  program  either  non-interactively  or  interac-
       tively.	 The  program will be run non-interactively if the user speci-
       fies program arguments and flag settings on the command line using  the
       form:


       _v_._r_e_c_l_a_s_s   _[_-_d_]   _i_n_p_u_t_=_n_a_m_e   _o_u_t_p_u_t_=_n_a_m_e  _t_y_p_e_=_a_r_e_a_,	_l_i_n_e_, _o_r  _s_i_t_e
       _[_t_i_t_l_e_=_n_a_m_e_]


       After the user types in the above information on the command line,  the
       program will (silently) prompt the user for reclass rules to be applied
       to the input  map  layer  categories.   The  form  of  these  rules  is
       described  in further detail in the sections on non-interactive program
       use reclass rules and examples, below.

   FFllaagg::
       --dd     Dissolve common boundaries between areas


   PPaarraammeetteerrss::
       iinnppuutt==nnaammee
	      Vector input map name.

       oouuttppuutt==nnaammee
	      Vector output map name.

       ttyyppee==nnaammee
	      Select type of vector input file.  Options: area, line, site



       Alternately, the user can simply type _v_._r_e_c_l_a_s_s on  the	command  line,
       without program arguments.  In this case, the user will be prompted for
       all needed inputs.  Before using _v_._r_e_c_l_a_s_s one must know the following:


       1       The  new categories desired; and, which old categories fit into
       which new categories.


       2      The names of the new categories.

IINNTTEERRAACCTTIIVVEE PPRROOGGRRAAMM UUSSEE:: EEXXAAMMPPLLEE
       Suppose we want to reclassify the vector map layer roads, consisting of
       five  categories,  into	the three new categories: paved roads, unpaved
       roads, and railroad tracks.  The user is asked whether the reclass  ta-
       ble  is	to be established with each category value initially set to 0,
       or with each category value initially set to its own value.   A	screen
       like that shown below then appears, listing the categories of the roads
       vector map layer to be reclassified and prompting the user for the  new
       category values to be assigned them.

	       ENTER NEW CATEGORY NUMBERS FOR THESE CATEGORIES

	     OLD CATEGORY NAME	     OLD       NEW
					  NUM	    NUM
	     no data			  0	    0__
	     Hard Surface, 2 lanes	       1	 0__
	     Loose Surface, 1 lane	       2	 0__
	     Improved Dirt		  3	    0__
	     Unimproved Dirt Trail	       4	 0__
	     Railroad, single track	       5	 0__

	     AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
			(OR <Ctrl-C> TO CANCEL)
	 In  the  following  screen  the new category values have been entered
       beside the appropriate old category  names.   Cells  assigned  category
       values 2, 3, and 4 in the old vector map layer are now assigned the new
       category value 2 in the reclassed map; cell data formerly  assigned  to
       category  value	5  in  the old vector map map are now assigned the new
       category value 3 in the reclassed map.
	       ENTER NEW CATEGORY NUMBERS FOR THESE CATEGORIES

	     OLD CATEGORY NAME	     OLD       NEW
					  NUM	    NUM
	     no data			  0	    0__
	     Hard Surface, 2 lanes	       1	 1__
	     Loose Surface, 1 lane	       2	 2__
	     Improved Dirt		  3	    2__
	     Unimproved Dirt Trail	       4	 2__
	     Railroad, single track	       5	 3__

	     AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
			(OR <Ctrl-C> TO CANCEL)
	Hitting the escape key	will bring  up	the  following	screen,  which
       prompts	the user to enter a new title and category label for the newly
       reclassed categories.
		ENTER NEW CATEGORY NAMES FOR THESE CATEGORIES

	      TITLE:  Roads Reclassified
		CAT	   NEW CATEGORY NAME
		NUM
		 0	   no data
		 1	   Paved Roads
		 2	   Unpaved Roads
		 3	   Railroad, single track

	      AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
		      (OR <Ctrl-C> TO CANCEL)
	Based upon the information supplied by the user in  the  above	sample
       screens,  the new output map and supporting category files are created.

NNOONN--IINNTTEERRAACCTTIIVVEE PPRROOGGRRAAMM UUSSEE:: RREECCLLAASSSS RRUULLEESS
       In non-interactive program use, the names of an input map, output  map,
       type  of input map, and output map title are given on the command line.
       However, the reclass rules are still read from  standard  input	(i.e.,
       from  the  keyboard,  redirected  from a file, or piped through another
       program).


       Once the user has specified an input vector map layer, output map layer
       name,  type of input map layer, and (optionally) output map layer title
       by typing:


       _v_._r_e_c_l_a_s_s  _[_-_d  _]  _i_n_p_u_t_=_n_a_m_e  _o_u_t_p_u_t_=_n_a_m_e  _t_y_p_e_=_a_r_e_a_,  _l_i_n_e_,  _o_r  _s_i_t_e
       _[_t_i_t_l_e_=_n_a_m_e_]


       Each line of input must have the following format:


       _i_n_p_u_t___c_a_t_e_g_o_r_i_e_s_=_o_u_t_p_u_t___c_a_t_e_g_o_r_y _[_l_a_b_e_l_]


       where  the  input lines specify the category values in the input vector
       map layer to be reclassified to the new output_category category value.
       Specification of a label to be associated with the new output map layer
       category is optional.  If specified, it is  recorded  as  the  category
       label  for  the new category value.  The equal sign = is required.  The
       input_category(ies) may consist of single category values or a range of
       such  values  in  the  format "low thru high."  The word "thru" must be
       present.


       A line containing only the word end terminates the input.

NNOONN--IINNTTEERRAACCTTIIVVEE PPRROOGGRRAAMM UUSSEE:: EEXXAAMMPPLLEESS
       The following examples may help clarify the reclass rules.


       1    This example reclassifies categories 1, 3 and 5 in the input  vec-
       tor  map  layer to category 1 with category label "poor quality" in the
       output map layer, and reclassifies input vector map layer categories 2,
       4,  and 6 to category 2 with the label "good quality" in the output map
       layer.
		 1 3 5	 =  1	poor quality
		 2 4 6	 =  2	good quality
	2    This example reclassifies input vector  map  layer  categories  1
       thru  10  to output map layer category 1, input map layer categories 11
       thru 20 to output map layer category 2, and input map layer  categories
       21 thru 30 to output map layer category 3, all without labels.
		  1 thru 10	  =   1
		 11 thru 20	  =   2
		 21 thru 30	  =   3
	 3    Subsequent  rules override previous rules.  Therefore, the below
       example reclassifies input vector map layer categories 1 thru 19 and 51
       thru  100 to category 1 in the output map layer, input vector map layer
       categories 20 thru 24 and 26 thru 50 to the output map  layer  category
       2, and input vector map layer category 25 to the output category 3.
		 1 thru 100	   =   1   poor quality
		 20 thru 50	   =   2   medium quality
		  25	 =   3	 good quality
	4    The previous example could also have been entered as:
		  1 thru 19	 51 thru 100   =   1	 poor quality
		 20 thru 24	 26 thru 50    =   2	 medium quality
		      25	=   3	  good quality
	or as:
		  1 thru 19	    =	  1   poor quality
		 51 thru 100	=    1
		 20 thru 24	    =	  2
		 26 thru 50	    =	  2   medium quality
		  25	  =	3   good quality
	 The final example was given to show how the labels are handled.  If a
       new category value appears in more than one rule (as is the  case  with
       new  category  values  1  and  2),  the	last label which was specified
       becomes the label for that category.   In  this	case  the  labels  are
       assigned exactly as in the two previous examples.

NNOOTTEESS
       The  _v_._r_e_c_l_a_s_s  program generates a new vector map layer. The _v_._s_u_p_p_o_r_t
       program will have to be run on the newly created vector	map  layer  to
       build topology.	The dissolve _[_-_d_] 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.

WWAARRNNIINNGG
       Category values which are not explicitly reclassified to a new value by
       the user will be reclassified to 0.

SSEEEE AALLSSOO
       _v_._s_u_p_p_o_r_t

AAUUTTHHOORRSS
       Paul H. Fukuhara, USDA SCS, NCG-GSS

       R. L. Glenn, USDA SCS, NHQ-CGIS

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_5 _$



GRASS 5.0							  v.reclass(1)
