Maps line/sample locations according to a Geometric Mapping Grid.
Maps line/sample locations according to a geometric mapping grid.
- INGRID
- Input grid file. This geometric mapping grid file is created by the module FINITE. The size of the grid cannot exceed 127 rows by 127 columns.
- OUTFILE
- Output file. The output file contains the mapped line/sample locations.
- INFILE(--)
- Input file. The input file is an image based information system (IBIS) file in graphics format and contains line/sample locations to be mapped by the input grid.
- LSCOORS(--)
- Line/sample coordinates. These are the line/sample locations to be mapped when INFILE does not exist. The order is specified as follows:
LINE LOCATION, SAMPLE LOCATION
- MAPOPT(FWD)
- Mapping option. This option allows you to do a forward or inverse mapping of the input line/sample locations.
= FWD: Forward mapping. The forward mapping is used to map line/sample locations according to the input grid. = INV: Inverse mapping. The inverse mapping is used to recreate the original line/sample locations from line/sample locations that have already been geometrically mapped by the input grid.
- PNTFLG(YES)
- Point flag. The flag to map any points that lie outside the input grid.
= YES: Move points. The points that lie outside the grid are geometrically mapped according the nearest grid cell. = NO: Do not move points. The points that lie out- side the grid are not mapped.
- SKIPVAL(0)
- Number of values to skip. The number of values to be skipped at the beginning of INFILE. These values are written to the output file but are not mapped.
- PNTINT(0)
- Point interval. The number of values which are between each pair of line,sample locations. These values are not mapped but are written to the output file.
The first value in OUT.DAT and every two values after every point(line,sample) will be not be mapped. The points to be mapped are mapped according to the point pairs found in GRID.DAT. Any input points that lie outside of the grid are mapped according to the grid cell that lies closest to the input point. Both the values that are not mapped and the mapped points are written to OUT.DAT as shown below.
ORIGINAL DATA: 1 557. -1110. 2 3 1911. 157. MAPPED DATA: 1 -1324. -275. 2 3 -423. 238.
The points (line/sample) contained in IN.DAT have already been mapped to their corresponding output line/ sample locations according to the point pairs in GRID.DAT. An inverse mapping is done on the points contained in IN.DAT in order to calculate the original line/sample locations of these points. All the inversely mapped points are written to OUT.DAT.
The points (line/sample) contained given by LSCOORS are be mapped to their corresponding output line/sample locations according to the point pairs in GRD.DAT. Any input points that lie outside of the grid are not mapped. All the mapped points are written to OUT.DAT.
After reading the input parameters; INFILE and OUTFILE are opened for read and write, respectively. INGRID (if specified) is opened and the line/sample pairs are read in.The line/sample locations of the input points are mapped according to the grid locations in INGRID. The locations form a rectangular grid and the input point is mapped according to the line/sample pairs associated with the four tie points that enclose that point. For points that lie outside of the grid, the nearest rectangle of the grid is used to map the input points if PNTFLG is set to YES; otherwise, these points are left as is.
This mapping maps the line(x')/sample(y') location of the input point to the corresponding line(x)/sample(y) locations in the output space using four line/sample pairs of the input grid that enclose the point. The formula is:
x' = ax + by + cxy + d y' = ex + fy + gxy + h where x and y are pixel coordinates and a,b,c,d,e,f,g,h are constants chosen so that x'(k) = ax(k) + by(k) + cx(k)y(k) + d y'(k) = ex(k) + fy(k) + gx(k)y(k) + h for k = 1,2,3,4where x(k), y(k) are line/sample locations in the output space and x'(k) ,y'(k) are the line/sample locations in the input space of the four points of the input grid that enclose the point x,y.After every point is processed, all the files are closed and the completion message is displayed.
No input coordinates were specified in either INFILE or LSCOORS. Specify one of these two parameters.
A fatal error was encountered during processing. The output file may or may not be deleted. The processing is terminated. The message that is displayed immediately preceding this message is the specific error that was encountered.
A fatal error was encountered while processing the input mapping grid. Check the input grid to be sure it is an uniform rectangular grid.
The <XXXXXX> file could not be opened and processing is terminated. Verify that the <XXXXXX> file exists.
The <XXXXXX> file could not be read; and therefore, an output file cannot be created. Verify that the format of the file is correct.
An error occurred while trying to write to the <XXXXXX> file. Check output parameters or free disk space.