Generate a geometric mapping grid
Generates a geometric mapping grid that defines the transformation from the current map projection an image is currently in to another map projection. The geometric mapping grid file may then be used by GEOM along with the image data to reproject the image into the specified map projection.
- IN
- Input image. The image which must have navigation and navigation height files associated with it. Input projection and location information is obtained from the associated files and PIXSIZ.
- INPROJ
- Input projection definition file. This file contains projection-related information describing image projections. INPROJ may contain more than one set of projection parameters.
INPROJ is generated by the function PROJPRM. A description of the projection file may be found in the LAS Programmer's Manual. INPROJ is a labeled table file.
- OUTGRID
- Output grid file. Output geometric mapping grid file containing the geometric mapping grid, statistical information related to the gridding process, and projection and framing information of the output space.
- OPROJKEY(--)
- Output projection key. The key of the projection in INPROJ which describes the output coordinate system. If OPROJKEY is NULL, the first set of projection parameters in INPROJ is used. If there are two sets of projection parameters with the same projection key, the first one is used.
- PIXSIZ(1000)
- Pixel dimensions. PIXSIZ defines, in meters, the dimension of each pixel in the output coordinate space.
- COORS
- Coordinates. These coordinates are used to define the frame of the output area. Coordinates are entered as Y (latitude or northing), X (longitude or easting). Three different modes of processing are possible:
o When four values are specified and COORUNIT = DMS, RAD, SEC, or DEG, the the upper-left corner and lower-right corner of a geographic input space is defined. These corner coordinates, along with the pixel dimensions make up the framing parameters. The framing parameters are projected into the speci- fied output projection space, and minima and maxi- ma in X and Y are recorded along the borders of the projected space. These minima and maxima are used to define the boundaries of the output space. o When four values are specified and COORUNIT = PRO, a coordinate somewhere within the output space frame and the lower-right corner coordinate in the output projection space are given. The first coordinate is paired with the LSCOOR parameter to calculate the coordinate at pixel 1,1. These coordinates are the minimum and maximum in X and Y and are used to de- fine the boundaries of the output space. o When two values are specified and COORUNIT = PRO, a coordinate somewhere within the output space frame is given. This coordinate is paired with the LSCOOR parameter to determine the upper-left corner coordi- nate in the output space. This mode of processing requires that NL and NS are also given. When the NL and NS values are combined with the PIXSIZ parameter, the lower-right corner of the output space projec- tion can be found, giving minimum and maximum coor- dinates in X and Y and thus defining the boundaries of the output space.
- COORUNIT(DEG)
- Coordinate units. The type of units in which COORS are entered.
= DMS: Degrees Minutes Seconds = RAD: Radians = DEG: Degrees = SEC: Seconds = PRO: Projection coordinates in output space
- LSCOORS(1,1)
- Line/sample coordinates. The image coordinates of the first coordinate pair entered in COORS when projection parameters are being specified directly. The default is the upper-left corner of the output image space (1,1).
- NL(--)
- Number of lines. The number of lines in the output area, specified when only the first projection coordinate pair is given in COORS.
- NS(--)
- Number of samples. The number of samples in the output area, specified when only the first projection coordinate pair is given in COORS.
- TOLVAL(0.015625)
- Tolerance value. Tolerance (in pixels) for reducing the density of geometric mapping grid points. If NLGRID and NSGRID are not NULL, TOLVAL is ignored. The grid density reduction is performed by discarding rows and columns whose grid points all have values within the tolerance value.
- NLGRID(--)
- Number of lines per grid. The number of lines contained in each output grid cell. If NLGRID is NULL, the geometric mapping grid size is set to the maximum and then reduced according to TOLVAL.
- NSGRID(--)
- Number of samples per grid. The number of samples contained in each output grid cell. If NSGRID is NULL, the geometric mapping grid size is set to the maximum and then reduced according to TOLVAL.
- PRINT(TERM)
- Output destination. The destination of the output grid.
= --: No Report = TERM: Terminal. Output is sent to the user's terminal. = LP: Line printer. Output is sent to the printer defined by $PRINTER. = Filename: User-supplied filename. Output is sent to the user-supplied file with the ex- tension ".prt".
The output projection information is obtained from the "PROJ;PROJ" projection definition file with a key of OUT. The output image is framed around an upper-left latitude/longitude of 41.35 north, 107.75 west and a lower-right corner of 37.90 north, 100.10 west. The pixel size of the output image is 1100 meters in the line direction by 1100 meters in the sample direction. All information is written to both the terminal and the printer specified by the TAE global variable $PRINTER. The resulting geometric mapping grid is written to "REPROJ;GRID".
XRECTIFY first determines the input and output space (image) framing and projection parameters from the DDR.
The output space projection parameters are read from the projection definition file using OPROJKEY and the output pixel size is determined from PIXSIZ. Three different methods are provided for specifying the output space frame:
Method 1: o The user defines the upper-left and lower-right corner coordinates of the area of interest in geographic coordinates. This forms a rectangle in geographic coordinates. o This rectangular space is projected into the output projection coordinate system. This usually results in a nonrectangular area. o Search the boundaries of this projected area for minimum and maximum X and Y coordinates in the output projection coordinate system. This forms a minimum bounding rectangle in the output space of the area of interest. o The upper-left corner (the minimum X, maximum Y) is adjusted outward to the next X and Y multiples of the pixel size. This is an arbitrary step which simplifies the combining of images with different scales. It does not alter the internal image geometry, it only slightly adjusts the size of the image frame. o The upper-left corner projection coordinate is assigned to image coordinate (1,1). Method 2: o The user defines: a. An output space projection coordinate at some image coordinate defined by LSCOOR. When LSCOOR defaults to image coordinate (1,1), the output space coordi- nate given is the upper-left corner of the output space. b. The lower-right corner in the output projection space. o XRECTIFY adjusts the first coordinate given to image coordinate (1,1) to get the minimum X and the maximum Y projection coordinate. The second coordinate pair given is the maximum X and the minimum Y coordinate. The out- put space is now defined. Method 3: o The user defines an output space projection coordinate at some image coordinate defined by LSCOOR, as in Method 2. o The user enters the number of output image lines and samples. o The coordinate entered is adjusted to image coordinate (1,1) to get the minimum X and the maximum Y projection coordinates. o The maximum X and minimum Y coordinates are calculated using PIXSIZ and the number of lines and samples from the minimum X and maximum Y projection coordinate.When a transformation has been established, it is applied to create the geometric mapping grid. The user can control the density of the mapping grid in two ways:
1. The default technique is to impose a 127 x 127 grid over the output space defined by the chosen framing method. This maximum grid density may then be reduced, using TOLVAL. The grid density reduction is performed by discarding rows and columns whose grid points all have values within the tolerance value. 2. The user has the option to specify the number of lines and samples in each grid cell. From these, the number of rows and columns in the geometric mapping grid are calculated. If the number of rows and columns exceed the maximum size of 127 x 127, the number of lines and samples in each grid cell are adjusted to fit the maximum grid size. The user is then informed of the adjustment. Using this option, it is assumed the user is aware of potential gridding errors due to grid density. Grid reduction techniques are not applied.The output geometric mapping grid file contains the mapping grid point values, projection information and framing information required by GEOM to reproject the image and fill the output image's DDR.
The number of geometric mapping grid columns exceeded the maximum allowed. This error occurs when the user enters too small a grid spacing (NSGRID) for the window given. The number of columns is set to the maximum (127).
The number of geometric mapping grid rows exceeded the maximum allowed. This error occurs when the user enters too small a grid spacing (NRGRID) for the window given. The number of rows is set to the maximum (127).
A nonfatal error was encountered during processing. The message displayed immediately preceding this message is the specific error encountered. Processing continues.
The error message displayed immediately preceding this message is the specific error encountered. Processing is terminated.
The output image framing parameters must be specified.
XRECTIFY was unable to create a valid geometric mapping grid for the selected output frame. This occurs mainly with global data sets. This condition is due to assumptions made during the process of gridding the output space frame into the geometric mapping grid for the geometric transformation module, GEOM. GEOM performs a locally linear interpolation between grid points--some projection changes are not representable in this manner.