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



NNAAMMEE
       rr..ccrroossss	- Creates a cross product of the category values from multiple
       raster map layers.
       _(_G_R_A_S_S _R_a_s_t_e_r _P_r_o_g_r_a_m_)

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

DDEESSCCRRIIPPTTIIOONN
       _r_._c_r_o_s_s creates an _o_u_t_p_u_t raster map layer representing all unique com-
       binations   of	category   values   in	 the   raster	input	layers
       (input=_n_a_m_e_,_n_a_m_e_,_n_a_m_e, ...).  At least two,  but  not  more  than  ten,
       _i_n_p_u_t  map layers must be specified.  The user must also specify a name
       to be assigned to the _o_u_t_p_u_t raster map layer created by _r_._c_r_o_s_s.

OOPPTTIIOONNSS
       The program will be run non-interactively if  the  user	specifies  the
       names  of between 2-10 raster map layers be used as _i_n_p_u_t, and the name
       of a raster map layer to hold program _o_u_t_p_u_t, using the	form:  rr..ccrroossss
       [--qqzz] iinnppuutt==_n_a_m_e_,_n_a_m_e[,_n_a_m_e,...] oouuttppuutt==_n_a_m_e

       where  each  input  _n_a_m_e specifies the name of a raster map layer to be
       used in calculating the cross product, the output  _n_a_m_e	specifies  the
       name  of  a raster map layer to hold program output, and the options --qq
       and --zz respectively specify that the program  is  to  run  quietly  and
       exclude zero data values.


       Alternately,  the  user	can  simply  type rr..ccrroossss on the command line,
       without program arguments. In this case, the user will be prompted  for
       needed  input and output map names and flag settings using the standard
       GRASS parser interface.



   FFllaaggss::
       --qq     Run quietly. Supresses output of program	percent-complete  mes-
	      sages.   If  this  flag  is not used, these messages are printed
	      out.

       --zz     Do not cross zero data values.  This means that if a zero  cate-
	      gory  value  occurs  in any input data layer, the combination is
	      assigned to category zero in the resulting map  layer,  even  if
	      other  data  layers contain non-zero data.  In the example given
	      above, use of the --zz option would cause 3 categories to be  gen-
	      erated instead of 5.


       If  the	--zz flag is not specified, then map layer combinations in which
       not all category values are zero will be  assigned  a  unique  category
       value in the resulting map layer.




   PPaarraammeetteerrss::
       iinnppuutt==_n_a_m_e_,_n_a_m_e[,_n_a_m_e,...]
	      The  names  of between two and ten existing raster map layers to
	      be used as input.  Category values in the new _o_u_t_p_u_t  map  layer
	      will  be	the  cross-product  of	the category values from these
	      existing _i_n_p_u_t map layers.

       oouuttppuutt==_n_a_m_e
	      The name assigned  to  the  new  raster  map  layer  created  by
	      _r_._c_r_o_s_s, containing program output.


EEXXAAMMPPLLEE
       For  example,  suppose that, using two raster map layers, the following
       combinations occur:
		 map1	map2
		 ___________
		  0	 1
		  0	 2
		  1	 1
		  1	 2
		  2	 4
	_r_._c_r_o_s_s would produce a new raster map layer with 5 categories:
		 map1	map2   output
		 ____________________
		  0	 1	 1
		  0	 2	 2
		  1	 1	 3
		  1	 2	 4
		  2	 4	 5
	Note: The actual category value assigned to a  particular  combination
       in the _r_e_s_u_l_t map layer is dependent on the order in which the combina-
       tions occur in the input map layer data and can	be  considered	essen-
       tially random.  The example given here is illustrative only.

SSUUPPPPOORRTT FFIILLEESS
       The category file created for the _o_u_t_p_u_t raster map layer describes the
       combinations of input map layer category values	which  generated  each
       category.  In the above example, the category labels would be:
		 category   category
		 value	    label
		 ______________________________
		    1	    layer1(0) layer2(1)
		    2	    layer1(0) layer2(2)
		    3	    layer1(1) layer2(1)
		    4	    layer1(1) layer2(2)
		    5	    layer1(2) layer2(4)
	A random color table is also generated for the _o_u_t_p_u_t map layer.

NNOOTTEESS
       When  run non-interactively, _r_._c_r_o_s_s will not protect existing files in
       the user's mapset. If the user  specifies  an  _o_u_t_p_u_t  file  name  that
       already	exists in his mapset, the existing file will be overwritten by
       the new _r_._c_r_o_s_s output.

SSEEEE AALLSSOO
       _r_._c_o_v_a_r

       _r_._s_t_a_t_s

       _p_a_r_s_e_r

AAUUTTHHOORR
       Michael Shapiro, 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.cross(1)
