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



NNAAMMEE
       rr..tthhiinn	- Thins non-zero cells that denote linear features in a raster
       map layer.
       _(_G_R_A_S_S _R_a_s_t_e_r _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       rr..tthhiinn
       rr..tthhiinn hheellpp
       rr..tthhiinn iinnppuutt==_n_a_m_e oouuttppuutt==_n_a_m_e

DDEESSCCRRIIPPTTIIOONN
       _r_._t_h_i_n scans the named _i_n_p_u_t raster map layer and thins non-zero  cells
       that  denote  linear features into linear features having a single cell
       width.


       _r_._t_h_i_n will thin only the non-zero cells of the named _i_n_p_u_t raster  map
       layer within the current geographic region settings.  The cell width of
       the thinned _o_u_t_p_u_t raster map layer will be equal to the  cell  resolu-
       tion of the currently set geographic region.  All of the thinned linear
       features will have the width of a single cell.


       _r_._t_h_i_n will create a new _o_u_t_p_u_t raster data file containing the thinned
       linear  features.  _r_._t_h_i_n assumes that linear features are encoded with
       positive values on a background of 0's in the _i_n_p_u_t raster data file.

OOPPTTIIOONNSS
   PPaarraammeetteerrss::
       iinnppuutt==_n_a_m_e
	      Name of a raster map layer containing data to be thinned.

       oouuttppuutt==_n_a_m_e
	      Name of the new raster map layer to hold thinned program output.

       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  on  the  command line, using the form: rr..tthhiinn
       iinnppuutt==_n_a_m_e oouuttppuutt==_n_a_m_e

       Alternately, the user can simply type: rr..tthhiinn

       on the command line, without program arguments.	In this case, the user
       will  be  prompted for needed parameter values using the standard GRASS
       _p_a_r_s_e_r interface.

NNOOTTEE
       _r_._t_h_i_n only creates raster map layers.  You will need to run _r_._l_i_n_e  on
       the resultant raster file to create a vector (_v_._d_i_g_i_t) map layer.


       _r_._t_h_i_n  may  create small spurs or "dangling lines" during the thinning
       process.  These spurs may be  removed  (after  creating	a  vector  map
       layer) by _v_._t_r_i_m.


       _r_._t_h_i_n creates a 0/1 output map.

NNOOTTEE
       This  code  implements the thinning algorithm described in "Analysis of
       Thinning Algorithms Using Mathematical Morphology" by Ben-Kwei Jang and
       Ronlad T. Chin in _T_r_a_n_s_a_c_t_i_o_n_s _o_n _P_a_t_t_e_r_n _A_n_a_l_y_s_i_s _a_n_d _M_a_c_h_i_n_e _I_n_t_e_l_l_i_-
       _g_e_n_c_e, vol. 12, No. 6, June 1990.  The definition Jang and Chin give of
       the  thinning  process is "successive removal of outer layers of pixels
       from an object while retaining any pixels whose removal would alter the
       connectivity or shorten the legs of the sceleton."


       The  sceleton  is  finally thinned when the thinning process converges;
       i.e., "no further pixels can be removed without altering the connectiv-
       ity  or shortening the sceleton legs" (p. 541).	The authors prove that
       the thinning process described always converges and produces  one-pixel
       thick  sceletons.   The	number	of  iterations depends on the original
       thickness of the object.  Each iteration peels off the  outside	pixels
       from  the  object.   Therefore, if the object is <= n pixels thick, the
       algorithm should converge in <= iterations.

SSEEEE AALLSSOO
       _g_._r_e_g_i_o_n

       _r_._l_i_n_e

       _v_._d_i_g_i_t

       _v_._s_u_p_p_o_r_t

       _v_._t_r_i_m

       _p_a_r_s_e_r

AAUUTTHHOORR
       Olga Waupotitsch, U.S.Army Construction Engineering Research Laboratory


       The  code for finding the bounding box as well as input/output code was
       written by Mike Baba (DBA  Systems,  1990)  and	Jean  Ezell  (USACERL,
       1988).

       _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.thin(1)
