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



NNAAMMEE
       rr..bbuuffffeerr   -  Creates  a  raster  map layer showing buffer
       zones surrounding cells	that  contain  non-NULL  category
       values.

       _(_G_R_A_S_S _R_a_s_t_e_r _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       rr..bbuuffffeerr
       rr..bbuuffffeerr hheellpp
       rr..bbuuffffeerr      [--qq]     iinnppuutt==_n_a_m_e     oouuttppuutt==_n_a_m_e     ddiiss--
       ttaanncceess==_v_a_l_u_e[,_v_a_l_u_e,...]  [uunniittss==_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _r_._b_u_f_f_e_r creates a new raster  map  layer  showing  buffer
       (a.k.a.	"distance" or "proximity") zones around all cells
       that contain  non-NULL  category  values  in  an  existing
       raster  map  layer.   The  distances  of buffer zones from
       cells with non-zero category values are user-chosen.  Sup-
       pose,  for  example,  that  you want to place buffer zones
       around roads.  This program could create  the  raster  map
       layer  shown  below on the right based on road information
       contained in the raster map layer shown on the left.

	     000000000000000000000000 222233333333333333444444
	     111000000000000000000000 111222222222223333333333
	     000111111111100000000000 222111111111122223333333
	     000000001000011100000000 332222221222211122222222
	     000000001000000011111111 333333321233222211111111
	     000000001000000000000000 433333321233333222222222
	     000000001000000000000000 444443321233333333333333
	     000000001000000000000000 444443321233443333333333
	     000000001000000000000000 444443321233444444444444
	     Category 0: No roads
	     Category 1: Road location
	     Category 2: Buffer Zone 1 around roads
	     Category 3: Buffer Zone 2 around roads
	     Category 4: Buffer Zone 3 around roads


IINNTTEERRAACCTTIIVVEE PPRROOGGRRAAMM UUSSEE
       The user can run the program interactively by simply  typ-
       ing  rr..bbuuffffeerr  without  program	arguments  on the command
       line.  The program then prompts	the  user  for	parameter
       values.

	      You  are	requested to identify the existing raster
	      map layer  from  which  distance-from  calculations
	      shall be based, and a name (of your choice) for the
	      new  raster  map	layer  which  will  contain   the
	      results.

	      Then,  identify  the  units of measurement in which
	      buffer (distance) zones are to be  calculated,  and
	      the distance of each buffer zone from each non-NULL
	      cell in the _i_n_p_u_t map.  The user has the option  of
	      identifying  up  to 60 continuous zones.	The zones
	      are identified by specifying  the  upper	limit  of
	      each  desired  zone (_r_._b_u_f_f_e_r assumes that 0 is the
	      starting point).	 ("Continuous"	is  used  in  the
	      sense  that each category zone's lower value is the
	      previous zone's upper value. The first buffer  zone
	      always  has  distance  0	as its lower bound.) Dis-
	      tances can be entered in one of four units: _m_e_t_e_r_s_,
	      _k_i_l_o_m_e_t_e_r_s_, _f_e_e_t, and _m_i_l_e_s.

	      Last,  calculate	distances  from  cells containing
	      user-specified category values,  using  the  "from-
	      cell"  method.  [The "fromcell" method goes to each
	      cell that contains a category value from which dis-
	      tances   are   to  be  calculated,  and  draws  the
	      requested distance rings around them.  This  method
	      works very fast when there are few cells containing
	      the category values of interest, but  works  slowly
	      when  there are numerous cells containing the cate-
	      gory  values  of	interest  spread  throughout  the
	      area.]


NNOONN--IINNTTEERRAACCTTIIVVEE PPRROOGGRRAAMM UUSSEE
       The  user can run _r_._b_u_f_f_e_r specifying all parameter values
       on the command line, using the form:


       rr..bbuuffffeerr     [--qq]     iinnppuutt==_n_a_m_e     oouuttppuutt==_n_a_m_e      ddiiss--
       ttaanncceess==_v_a_l_u_e[,_v_a_l_u_e,...]




   FFllaaggss::
       --qq     Run quietly




   PPaarraammeetteerrss::
       iinnppuutt==_n_a_m_e
	      The name of an existing raster map layer whose non-
	      NULL category value cells are to be  surrounded  by
	      buffer zones in the _o_u_t_p_u_t map.

       oouuttppuutt==_n_a_m_e
	      The  name assigned to the new raster map layer con-
	      taining program output.  The _o_u_t_p_u_t map  will  con-
	      tain  buffer  zones at the user-specified _d_i_s_t_a_n_c_e_s
	      from non-NULL category value cell in the _i_n_p_u_t map.

       ddiissttaanncceess==_v_a_l_u_e[,_v_a_l_u_e,...]
	      The  distance of each buffer zone from cells having
	      non-NULL category values in the _i_n_p_u_t map.

       uunniittss==_n_a_m_e
	      The unit of measurement in which distance zone val-
	      ues are to be calculated. Possible choices for _n_a_m_e
	      are:  _m_e_t_e_r_s, _k_i_l_o_m_e_t_e_r_s,  _f_e_e_t,	and  _m_i_l_e_s.   The
	      default units used, if unspecified by the user, are
	      _m_e_t_e_r_s.


EEXXAAMMPPLLEE
       In the example below, the buffer zones would  be  (in  the
       default	 units	of  meters):   0-100,  101-200,  201-300,
       301-400 and 401-500.

	Format:
	      rr..bbuuffffeerr	 [--qq]	iinnppuutt==_n_a_m_e    oouuttppuutt==_n_a_m_e    ddiiss--
	      ttaanncceess==_v_a_l_u_e[,_v_a_l_u_e,...]

	Example:
	      rr..bbuuffffeerr	  iinnppuutt==roads	 oouuttppuutt==roads.buf    ddiiss--
	      ttaanncceess==100,200,300,400,500 uunniittss==meters


	Result:
	      rr..ccaattss iinnppuutt==roads.buf

		    1	    distances calculated from these loca-
	      tions
		    2	    0-100 meters
		    3	    100-200 meters
		    4	    200-300 meters
		    5	    300-400 meters
		    6	    400-500 meters


NNOOTTEESS
       _r_._b_u_f_f_e_r  measures distances from center of cell to center
       of cell using Euclidean distance measure  for  planimetric
       databases  (like  UTM) and using ellipsoidal geodesic dis-
       tance measure for latitude/longitude databases.


       _r_._b_u_f_f_e_r calculates distance zones from all  cells  having
       non-NULL  category  values  in the _i_n_p_u_t map.  If the user
       wishes to calculate distances from only selected _i_n_p_u_t map
       layer  category	values, the user should run (for example)
       _r_._r_e_c_l_a_s_s prior to _r_._b_u_f_f_e_r,  to  reclass  all  categories
       from which distance zones are not desired to be calculated
       into category NULL.

SSEEEE AALLSSOO
       _g_._r_e_g_i_o_n

       _r_._m_a_p_c_a_l_c

       _r_._r_e_c_l_a_s_s

AAUUTTHHOORRSS
       Michael	Shapiro,  U.S.	Army   Construction   Engineering
       Research Laboratory
       James   Westervelt,  U.S.  Army	Construction  Engineering
       Research Laboratory

       _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_4 _$



GRASS 5.0					      r.buffer(1)
