i.rectify(1)		      Grass User's Manual		  i.rectify(1)



NNAAMMEE
       ii..rreeccttiiffyy   -  rectifies an image by computing a coordinate transforma-
       tion for each pixel in the image based on the control points created by
       _i_._p_o_i_n_t_s or _i_._v_p_o_i_n_t_s.
       _(_G_R_A_S_S _I_m_a_g_e _P_r_o_c_e_s_s_i_n_g _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       ii..rreeccttiiffyy

DDEESSCCRRIIPPTTIIOONN
       _i_._r_e_c_t_i_f_y  uses	the control points identified in _i_._p_o_i_n_t_s or _i_._v_p_o_i_n_t_s
       to calculate a transformation matrix based  on  a   first,  second,  or
       third  order polynomial and then converts x,y cell coordinates to stan-
       dard map coordinates for each pixel in the  image.   The  result  is  a
       planimetric image with a transformed coordinate system (i.e., a differ-
       ent coordinate system than before it was rectified).


       _i_._p_o_i_n_t_s or _i_._v_p_o_i_n_t_s must be run before _i_._r_e_c_t_i_f_y, and	both  programs
       are required to rectify an image.  An image must be rectified before it
       can reside in a standard coordinate LOCATION, and therefore be analyzed
       with  the  other  map layers in the standard coordinate LOCATION.  Upon
       completion of _i_._r_e_c_t_i_f_y, the rectified image is deposited in the target
       standard  coordinate  LOCATION.	This LOCATION is selected using _i_._t_a_r_-
       _g_e_t.

PPrrooggrraamm PPrroommppttss
       The first prompt in the program asks for the name of the group contain-
       ing the files to be rectified.

	    Enter the group containing files to be rectified
	    Enter 'list' for a list of existing imagery groups
	    Enter 'list -f' for a verbose listing
	    Hit RETURN to cancel request
	    >

       This  is  the  same  imagery  group  that  was  selected in _i_._p_o_i_n_t_s or
       _i_._v_p_o_i_n_t_s and the group that contains the cell files  with  the	marked
       points  and  their  associated map  coordinates.  You are then asked to
       select the cell file(s) within the group to be rectified:

       Please select the file(s) to rectify by naming an output file

	      spot1.1 in mapsetname	 .............
	      spot1.2 in mapsetname	 .............
	      spot1.3 in mapsetname	 .............
	      spotclass1 in mapsetname	 spotrectify1.

	      spotreject1 in mapsetname  .............

       (enter list by any name to get a list of existing cell files)

       AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
		  (OR<Ctrl-C> TO CANCEL)

       More than one cell file may be rectified at a  time.   Each  cell  file
       should be given a unique output file name.


       Next, you are asked to select one of two windows regions:

	 Please select one of the following options
	 1.  Use the current window in the target location
	 2.  Determine the smallest window which covers the image
	 >

       The  _i_._r_e_c_t_i_f_y  program	will only rectify that portion of the image or
       cell file that occurs within the chosen window region,  and  only  that
       portion	of the cell file will be relocated in the target database.  It
       is important therefore, to check the current mapset window in the  tar-
       get LOCATION if choice number one is selected.


       If  you	are  rectifying  a file with plans to patch it to another file
       using the GRASS program _r_._p_a_t_c_h, choose option number one, the  current
       window  in  the	target	location.   This  window, however, must be the
       default window for the target LOCATION.	When a file being rectified is
       smaller	than  the default window in which it is being rectified, zeros
       are added to the rectified file.  Patching files of the same size  that
       contain	0/non-zero  data, eliminates the possibility of a no-data line
       the patched result.  This is because, when the images are patched,  the
       zeros in the image are "covered" with non-zero pixel values.  When rec-
       tifying files that are going to be patched, rectify all	of  the  files
       using the same default window.


       By  selecting  the  1st	ORDER option, the user may select the order of
       transformation desired:

       Select order of transformation	 1st Order   2nd Order	3rd Order

       The program will immediately recalculate the RMSE  and  the  number  of
       points required.

   LLiinneeaarr aaffffiinnee ttrraannssffoorrmmaattiioonn ((11sstt oorrddeerr ttrraannssffoorrmmaattiioonn))
       x' = ax + by +c y' = Ax + Bt +C

       The a,b,c,A,B,C are determined by least squares regression based on the
       control points entered.	This transformation applies scaling,  transla-
       tion and rotation.  It is NOT a general purpose rubber-sheeting, nor is
       it ortho-photo rectification using a DEM, not second order  polynomial,
       etc.   It can be used if (1) you have geometrically correct images, and
       (2) the terrain or camera distortion effect can be ignored.

   PPoollyynnoommiiaall TTrraannssffoorrmmaattiioonn MMaattrriixx ((22nndd,, 33dd oorrddeerr ttrraannssffoorrmmaattiioonn))
       The ANALYZE function has been changed to support calculating the regis-
       tration	coefficients using a first, second, or third order transforma-
       tion matrix.  The number of control  points  required  for  a  selected
       order of transformation (represented by n) is ((n + 1) * (n + 2) / 2)

       or  3,  6,  and 10 respectively. It is strongly recommended that one or
       more additional points be identified to allow for an overly- determined
       transformation  calculation  which  will  generate the Root Mean Square
       (RMS) error values for each included point.  The RMS error  values  for
       all  the  included control points are immediately recalculated when the
       user selects a different transformation order from the menu  bar.   The
       polynomial  equations  are performed using a modified Gaussian elimina-
       tion method.

   PPrrooggrraamm EExxeeccuuttiioonn
       _i_._r_e_c_t_i_f_y will run in the background and notify you by mail when it  is
       finished.


       Note:   The  rectified image or rectified cell files will be located in
       the target LOCATION when the program is completed.  The original unrec-
       tified files are not modified or removed.


       Note:  In interactive mode it is possible to define a new file name for
       the target images. This is (currently) not  provided  in  command  line
       mode.

NNOOTTEESS
       _i_._r_e_c_t_i_f_y  uses	nearest  neighbor resampling during the transformation
       choosing the actual pixel that has its  centre  nearest	to  the  point
       location  in  the  image.  Advantage  of  this method is that the pixel
       brightness of the image is kept as _i_._r_e_c_t_i_f_y rearranges the geometry of
       the image pixels.


       In case i.rectify starts normal and after some time a mail with follow-
       ing text is sent:


       GIS ERROR: error while writing to temp file
       the user may try the flag _-_c (or the module needs more  free  space  on
       the hard drive).

SSEEEE AALLSSOO
       _G_R_A_S_S _T_u_t_o_r_i_a_l_: _I_m_a_g_e _P_r_o_c_e_s_s_i_n_g



       _m_._p_r_o_j_,	 _s_._p_r_o_j_,   _s_._p_r_o_j_,   _v_._p_r_o_j_,   _i_._g_r_o_u_p_,  _i_._p_o_i_n_t_s_,  _i_._p_o_i_n_t_s_3_,
       _i_._v_p_o_i_n_t_s_, _i_._r_e_c_t_i_f_y_3_, _i_._t_a_r_g_e_t


AAUUTTHHOORR
       William R. Enslin, Michigan State University, Center for Remote Sensing


       Modified for GRASS 5.0 by:

       Luca Palmeri (palmeri@ux1.unipd.it)

       Bill Hughes

       Pierre de Mouveaux (pmx@audiovu.com)
       CMD mode by Bob Covill

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_6_/_1_6 _1_5_:_2_9_:_1_8 _$



GRASS 5.0							  i.rectify(1)
