Calculates the intersection of two polygons.
Calculates the intersection of two polygons and creates a polygon of this intersection for the two input files. The minimum and maximum line/sample locations of the output polygons are calculated, printed, and returned to the global parameters $WINDOW1 and $WINDOW2.
- INFILE
- Input files. IBIS graphics files that contain polygon coordinates.
- OUTFILE
- Output files. These IBIS graphics file will contain the intersection polygon coordinates of the files specified in INFILE. The coordinates of each of these files will be offset to correspond to the coordinates in corresponding file specified in INFILE.
- SL(1,1)
- Starting lines. This is the starting line position that the images corresponding to files specified in INFILE will have in the mosaic.
- SS(1,1)
- Starting samples. This is the starting sample position that the images corresponding to files specified in INFILE will have in the mosaic.
- PRINT(TERM)
- Output destination. The destination of the output.
= 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 extension ".prt".
CUT1.DAT and CUT2.DAT are opened and read in. Each of the line/sample coordinates in CUT1.DAT are offset by zero. Each of the line/sample coordinates in CUT2.DAT are offset by zero and 399, respectively. The intersection of these two polygons is then calculated. OUT1.DAT and OUT2.DAT are created using this intersection polygon. The minimum and maximum line/sample locations of the output polygons is calculated, returned to the global parameters $WINDOW1 and $WINDOW2, and printed to the terminal.
After reading the parameters, INFILE1 and INFILE2 are opened and the polygon vertices are read. Each of the line/sample coordinates in CUT1.DAT and CUT2.DAT are offset by the values found in SL and SS minus 1. The intersection of the two polygons is then calculated. A value of 1 is added to each of the vertices of this intersection polygon. SL and SS are then subtracted from vertices of the polygon in order to create OUTFILE1 and OUTFILE2. When all the processing is finished, all the files are closed and the completion message is displayed.
An error was encountered while closing the <XXXXX> file. The data may still be valid.
A fatal error was encountered during processing. The output file may or may not be valid, and processing is terminated. The message that is displayed immediately preceding this message is the specific error that was encountered.
The two input polygons do not intersect at all. Verify that the input polygon files are for adjoining images.
The <XXXXXX> file could not be opened and processing is terminated. Verify that the <XXXXXX> file exists.
Holes were found within the intersection of the two input file. Verify that the cutlines are correct.
The polygon has to have the same coordinates for both the beginning and ending points. Recreate the polygon with the same beginning and ending points.
The <XXXXXX> file could not be read; and therefore, an output file cannot be created. Verify that the format of the file is correct.
The <XXXXXXX> file could not be written to. Verify that disk space is available.
The values of SL must be positive. Respecify SL and re-run.
The values of SS must be positive. Respecify SS and re-run.