r.patch(1)		      Grass User's Manual		    r.patch(1)



NNAAMMEE
       rr..ppaattcchh	- Creates a composite raster map layer by using known category
       values from one (or more) map layer(s) to fill in areas of "no data" in
       another map layer.
       _(_G_R_A_S_S _R_a_s_t_e_r _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       rr..ppaattcchh
       rr..ppaattcchh hheellpp
       rr..ppaattcchh [--qqzz] iinnppuutt==_n_a_m_e[,_n_a_m_e,...]  oouuttppuutt==_n_a_m_e

DDEESSCCRRIIPPTTIIOONN
       The  GRASS  program _r_._p_a_t_c_h allows the user to assign known data values
       from other raster map layers to the _"_n_o	_d_a_t_a_"  areas  (those  assigned
       category  value	NULL/0)  in another raster map layer.  This program is
       useful for making a composite raster map layer from two or  more  adja-
       cent  map  layers,  for filling in "holes" in a raster map layer's data
       (e.g., in digital elevation data), or for updating an older  map  layer
       with  more  recent  data.  The current geographic region definition and
       mask settings are respected.


       The program will be run non-interactively if the user specifies program
       arguments   on	the  command  line,  using  the  form:	rr..ppaattcchh  [--qqzz]
       iinnppuutt==_n_a_m_e[,_n_a_m_e,...]  oouuttppuutt==_n_a_m_e

       where each input _n_a_m_e is the name of a raster map layer to be  patched,
       the  output  _n_a_m_e  is the name assigned to the new composite raster map
       layer containing the patched result, and the (optional) --qq flag directs
       _r_._p_a_t_c_h to run quietly.


       The  first  _n_a_m_e  listed in the string iinnppuutt==_n_a_m_e,_n_a_m_e,_n_a_m_e, ... is the
       name of the base map whose zero data values will  be  attempted	to  be
       filled  by  non-zero data values in the second through tenth input _n_a_m_e
       maps listed.  The second through tenth input _n_a_m_e maps will be used  to
       supply  remaining  missing  (zero)  data values for the first input map
       _n_a_m_e, based on the order  in  which  they  are  listed  in  the	string
       iinnppuutt==_n_a_m_e,_n_a_m_e,_n_a_m_e, ...


       Alternately,  the  user	can  simply  type rr..ppaattcchh on the command line,
       without program arguments. In this case, the user will be prompted  for
       the  flag  setting and parameter values using the standard GRASS _p_a_r_s_e_r
       interface.

   FFllaagg::
       --qq     Directs that _r_._p_a_t_c_h run quietly, suppressing output of messages
	      on program progress to standard output.

       --zz     Use zero (0) for transparency instead of NULL.


   PPaarraammeetteerrss::
       iinnppuutt==_n_a_m_e,_n_a_m_e,...
	      The name(s) of between one and 200 existing raster map layers to
	      be patched together. The first of the maximal  200  maps	listed
	      will  be	used  as a base map, and the second through tenth maps
	      listed will be used to supply missing (zero) category values for
	      the first map.

       oouuttppuutt==_n_a_m_e
	      The  name of the new raster map to contain the resultant patched
	      output.


EEXXAAMMPPLLEE
       Below, the raster map layer on the far left is ppaattcchheedd with the	middle
       (_p_a_t_c_h_i_n_g)  raster map layer, to produce the _c_o_m_p_o_s_i_t_e raster map layer
       on the right.
	 1 1 1 0 2 2 0 0    0 0 1 1 0 0 0 0    1 1 1 1 2 2 0 0
	 1 1 0 2 2 2 0 0    0 0 1 1 0 0 0 0    1 1 1 2 2 2 0 0
	 3 3 3 3 2 2 0 0    0 0 0 0 0 0 0 0    3 3 3 3 2 2 0 0
	 3 3 3 3 0 0 0 0    4 4 4 4 4 4 4 4    3 3 3 3 4 4 4 4
	 3 3 3 0 0 0 0 0    4 4 4 4 4 4 4 4    3 3 3 4 4 4 4 4
	 0 0 0 0 0 0 0 0    4 4 4 4 4 4 4 4    4 4 4 4 4 4 4 4
	Switching the _p_a_t_c_h_e_d and the _p_a_t_c_h_i_n_g raster map layers produces  the
       following results:
	 0 0 1 1 0 0 0 0    1 1 1 0 2 2 0 0    1 1 1 1 2 2 0 0
	 0 0 1 1 0 0 0 0    1 1 0 2 2 2 0 0    1 1 1 1 2 2 0 0
	 0 0 0 0 0 0 0 0    3 3 3 3 2 2 0 0    3 3 3 3 2 2 0 0
	 4 4 4 4 4 4 4 4    3 3 3 3 0 0 0 0    4 4 4 4 4 4 4 4
	 4 4 4 4 4 4 4 4    3 3 3 0 0 0 0 0    4 4 4 4 4 4 4 4
	 4 4 4 4 4 4 4 4    0 0 0 0 0 0 0 0    4 4 4 4 4 4 4 4


NNOOTTEESS
       Frequently,  this program is used to patch together adjacent map layers
       which have been	digitized  separately.	 The  programs	_v_._m_k_q_u_a_d_s  and
       _v_._m_k_g_r_i_d can be used to make adjacent maps align neatly.


       The  user  should  check  the current geographic region settings before
       running _r_._p_a_t_c_h, to ensure that the region boundaries encompass all  of
       the data desired to be included in the composite map.


       Use  of	_r_._p_a_t_c_h  is  generally	followed  by use of the GRASS programs
       _g_._r_e_m_o_v_e and _g_._r_e_n_a_m_e; _g_._r_e_m_o_v_e is used to  remove  the	original  (un-
       patched)  raster  map  layers, while _g_._r_e_n_a_m_e is used to then assign to
       the newly-created composite (patched) raster map layer the name of  the
       original raster map layer.


       _r_._p_a_t_c_h creates support files for the patched, composite output map.

SSEEEE AALLSSOO
       _g_._r_e_g_i_o_n

       _g_._r_e_m_o_v_e

       _g_._r_e_n_a_m_e

       _r_._m_a_p_c_a_l_c

       _r_._s_u_p_p_o_r_t

       _v_._m_k_g_r_i_d

       _v_._m_k_q_u_a_d_s

       _p_a_r_s_e_r

AAUUTTHHOORR
       Michael Shapiro, U.S. Army Construction Engineering Research Laboratory
       -z flag by Huidae Cho

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_3_/_0_4 _1_0_:_3_2_:_0_5 _$



GRASS 5.0							    r.patch(1)
