1i.rectify(1)                GRASS GIS User's Manual               i.rectify(1)
2
3
4

NAME

6       i.rectify   -  Rectifies an image by computing a coordinate transforma‐
7       tion for each pixel in the image based on the control points.
8

KEYWORDS

10       imagery, rectify, geometry
11

SYNOPSIS

13       i.rectify
14       i.rectify --help
15       i.rectify [-cat] group=name  [input=name[,name,...]]   extension=string
16       order=integer      [resolution=float]       [memory=memory    in    MB]
17       [method=string]   [--help]  [--verbose]  [--quiet]  [--ui]
18
19   Flags:
20       -c
21           Use current region  settings  in  target  location  (def.=calculate
22           smallest area)
23
24       -a
25           Rectify all raster maps in group
26
27       -t
28           Use thin plate spline
29
30       --help
31           Print usage summary
32
33       --verbose
34           Verbose module output
35
36       --quiet
37           Quiet module output
38
39       --ui
40           Force launching GUI dialog
41
42   Parameters:
43       group=name [required]
44           Name of input imagery group
45
46       input=name[,name,...]
47           Name of input raster map(s)
48
49       extension=string [required]
50           Output raster map(s) suffix
51
52       order=integer [required]
53           Rectification polynomial order (1-3)
54           Options: 1-3
55           Default: 1
56
57       resolution=float
58           Target resolution (ignored if -c flag used)
59
60       memory=memory in MB
61           Maximum memory to be used (in MB)
62           Cache size for raster rows
63           Default: 300
64
65       method=string
66           Interpolation method to use
67           Options:  nearest, linear, cubic, lanczos, linear_f, cubic_f, lanc‐
68           zos_f
69           Default: nearest
70

DESCRIPTION

72       i.rectify uses the control points included in the source data or  iden‐
73       tified  with the Ground Control Points Manager to calculate a transfor‐
74       mation matrix and then converts x,y cell coordinates  to  standard  map
75       coordinates  for  each  pixel in the image. The result is a planimetric
76       image with a transformed coordinate system (i.e., a  different  coordi‐
77       nate  system  than  before  it was rectified). Supported transformation
78       methods are first, second, and third order polynomial  and  thin  plate
79       spline.  Thin plate spline is recommended for ungeoreferenced satellite
80       imagery where ground control points (GCPs) are included.  Examples  are
81       NOAA/AVHRR and ENVISAT imagery which include throusands of GCPs.
82
83       If  no  ground  control points are available, the Ground Control Points
84       Manager must be run before i.rectify. An image  must  be  georeferences
85       before  it  can reside in a standard coordinate LOCATION, and therefore
86       be analyzed with the other map layers in the standard coordinate  LOCA‐
87       TION. Upon completion of i.rectify, the rectified image is deposited in
88       the target standard coordinate LOCATION. This LOCATION is selected  us‐
89       ing i.target.
90
91       More  than  one  raster  map may be rectified at a time. Each cell file
92       should be given a unique output file name. The rectified image or  rec‐
93       tified raster maps will be located in the target LOCATION when the pro‐
94       gram is completed. The original unrectified files are not  modified  or
95       removed.
96
97       If the -c flag is used, i.rectify will only rectify that portion of the
98       image or raster map that occurs within the chosen window region in  the
99       target  location,  and only that portion of the cell file will be relo‐
100       cated in the target database. It is important therefore, to  check  the
101       current mapset window in the target LOCATION if the -c flag is used.
102
103       If you are rectifying a file with plans to patch it to another file us‐
104       ing the GRASS program r.patch, choose option number  one,  the  current
105       window  in  the  target location. This window, however, must be the de‐
106       fault window for the target LOCATION. When a file  being  rectified  is
107       smaller  than  the default window in which it is being rectified, NULLs
108       are added to the rectified file. Patching files of the same  size  that
109       contain  NULL data, eliminates the possibility of a no-data line in the
110       patched result. This is because, when the images are patched, the NULLs
111       in  the image are "covered" with non-NULL pixel values. When rectifying
112       files that are going to be patched, rectify all of the files using  the
113       same default window.
114
115   Coordinate transformation
116       The  desired  order of transformation (1, 2, or 3) is selected with the
117       order option.  The program will calculate the RMSE and  check  the  re‐
118       quired number of points.
119
120   Linear affine transformation (1st order transformation)
121       x’ = ax + by + c
122       y’  =  Ax  + By + C The a,b,c,A,B,C are determined by least squares re‐
123       gression based on the control points entered.  This transformation  ap‐
124       plies  scaling,  translation  and rotation. It is NOT a general purpose
125       rubber-sheeting like TPS, nor is it ortho-photo rectification  using  a
126       DEM,  not  second order polynomial, etc. It can be used if (1) you have
127       geometrically correct images, and (2) the terrain or camera  distortion
128       effect can be ignored.
129
130   Polynomial Transformation Matrix (2nd, 3d order transformation)
131       i.rectify uses a first, second, or third order transformation matrix to
132       calculate the registration coefficients. The number of  control  points
133       required for a selected order of transformation (represented by n) is
134       ((n  +  1)  * (n + 2) / 2) or 3, 6, and 10 respectively. It is strongly
135       recommended that one or more additional points be identified  to  allow
136       for an overly-determined transformation calculation which will generate
137       the Root Mean Square (RMS) error values for each  included  point.  The
138       RMS  error  values  for all the included control points are immediately
139       recalculated when the user selects  a  different  transformation  order
140       from the menu bar. The polynomial equations are performed using a modi‐
141       fied Gaussian elimination method.
142
143   Thin plate spline (TPS) transformation
144       TPS transformation is selected with the -t flag. This method of coordi‐
145       nate transformation is recommended for satellite imagery where hundreds
146       or thousands of GCPs  are  included,  and  for  historical  printed  or
147       scanned maps with unknown georeferencing and/or known localized distor‐
148       tions.
149
150       TPS combines a linear affine transformation with individual transforma‐
151       tion  coefficients for each GCP, using the radial basis kernel function
152       with the distance dist between any two points:
153       dist2 * log(dist) As a consequence, localized distortions  can  be  re‐
154       moved with TPS transformation. For example, scan line sensors will have
155       due to the changing viewing angle larger distortions  towards  the  end
156       points  of  the  scan  line  than  at the center of the scan line. Even
157       higher order polynomial transformations are not able  to  remove  these
158       locally different distortions, but TPS transformation can. For best re‐
159       sults, TPS requires an even and, for localized distortions, dense spac‐
160       ing of GCPs.
161
162   Resampling method
163       The  rectified  data  is resampled with one of seven different methods:
164       nearest, bilinear, cubic, lanczos, bilinear_f, cubic_f, or lanczos_f.
165
166       The method=nearest method, which performs a  nearest  neighbor  assign‐
167       ment,  is  the  fastest of the resampling methods. It is primarily used
168       for categorical data such as a land use classification, since  it  will
169       not change the values of the data cells. The method=bilinear method de‐
170       termines the new value of the cell based on a weighted distance average
171       of  the  4  surrounding cells in the input map. The method=cubic method
172       determines the new value of the cell based on a weighted distance aver‐
173       age  of  the 16 surrounding cells in the input map.  The method=lanczos
174       method determines the new value of the cell based on  a  weighted  dis‐
175       tance average of the 25 surrounding cells in the input map.
176
177       The  bilinear,  cubic and lanczos interpolation methods are most appro‐
178       priate for continuous data and  cause  some  smoothing.  These  options
179       should not be used with categorical data, since the cell values will be
180       altered.
181
182       In the bilinear, cubic and lanczos methods, if any of  the  surrounding
183       cells  used  to  interpolate the new cell value are NULL, the resulting
184       cell will be NULL, even if the nearest cell  is  not  NULL.  This  will
185       cause  some thinning along NULL borders, such as the coasts of land ar‐
186       eas in a DEM. The bilinear_f, cubic_f and lanczos_f interpolation meth‐
187       ods  can  be  used  if thinning along NULL edges is not desired.  These
188       methods "fall back" to simpler interpolation methods  along  NULL  bor‐
189       ders.  That is, from lanczos to cubic to bilinear to nearest.
190
191       If  nearest  neighbor  assignment  is used, the output map has the same
192       raster format as the input map. If any of the other  interpolations  is
193       used, the output map is written as floating point.
194

NOTES

196       If  i.rectify starts normally but after some time the following text is
197       seen:
198       ERROR: Error writing segment file
199       the user may try the -c flag or the module needs more free space on the
200       hard drive.
201

SEE ALSO

203       The GRASS 4 Image Processing manual
204
205        m.transform, r.proj, v.proj, i.group, i.target
206       Ground Control Points Manager
207

AUTHORS

209       William R. Enslin, Michigan State University, Center for Remote Sensing
210
211       Modified for GRASS 5.0 by:
212       Luca Palmeri (palmeri@ux1.unipd.it)
213       Bill Hughes
214       Pierre de Mouveaux (pmx@audiovu.com)
215       CMD mode by Bob Covill
216

SOURCE CODE

218       Available at: i.rectify source code (history)
219
220       Accessed: Mon Jun 20 16:47:32 2022
221
222       Main  index | Imagery index | Topics index | Keywords index | Graphical
223       index | Full index
224
225       © 2003-2022 GRASS Development Team, GRASS GIS 8.2.0 Reference Manual
226
227
228
229GRASS 8.2.0                                                       i.rectify(1)
Impressum