-------------------------------------------------------------------------------- MODULE IFIXAREA
--------------------------------------------------------------------------------
REPLACES DAMP module IFIX
--------------------------------------------------------------------------------
IFIXAREA is designed to check an IFF file for errors relating to area features. Features which are found to be in error are fixed and all features are written to a new output file. The errors to be checked for are specified on the IFIXAREA command line, and may be any combination of the following:
By default, all features in the input IFF file containing 2-dimensional coordinate strings are checked.
+-----------------------------------------------------+ | WARNING | |IFIXAREA only produces coordinate (X,Y,Z) data in the | |output file. Non coordinate attributes held in CB | |data columns are not retained. | +-----------------------------------------------------+
--------------------------------------------------------------------------------
$ IFIXAREA input-file-spec output-file-spec
Command qualifiers Defaults /[NO]AC /NOAC /ANTI_CLOCKWISE /ANTI_CLOCKWISE /CLOCKWISE /ANTI_CLOCKWISE /[NO]CLOSE[=real] /NOCLOSE /[NO]DELETE /NODELETE /DFAD See text. /FC=integer[,...] All feature codes. /LAYER=integer[,...] All layers. /[NO]LOG /NOLOG /NEAR[=real] See text. /OUTPUT[=file-spec] /OUTPUT=SYS$OUTPUT /[NO]PRINTER /NOPRINTER /[NO]REVERSE /NOREVERSE
--------------------------------------------------------------------------------
_IFF-file: input-file-spec _Fixed-IFF-file: output-file-spec
--------------------------------------------------------------------------------
input-file-spec
- specifies the IFF file to be fixed. Any part of the file-spec which is not specified will be taken from the default specification 'LSL$IF:IFF.IFF'.
fixed-file-spec
- specifies the IFF file which is to be created. Any part of the file-spec which is not explicitly given will be taken from the parsed input specification. Note that a version number must not be specified for the output IFF file. If a file with the specified name already exists a new file will be created with the version number incremented by one.
/AC
/NOAC
- forces selection of DFAD features by type 7 ACs rather than selection by feature code. In level 1 DFAD data, area features can be recognised by the specification "typ=2" in the text field of the type 7 (DFAD) AC. /AC is only valid in conjunction with the /DFAD qualifier, and is thus invalid with the /FC qualifier.
/ANTI_CLOCKWISE
- when used in conjunction with the /REVERSE qualifier, results in all closed features being checked for direction of digitising. Any features which are not digitised in an anticlockwise direction will be made so. If /REVERSE is specified without a direction qualifier, then /ANTI_CLOCKWISE is the default.
/CLOCKWISE
- when used in conjunction with the /REVERSE qualifier, results in all closed features being checked for direction of digitising. Any features which are not digitised in an clockwise direction will be made so. If /REVERSE is specified without a direction qualifier, then /ANTI_CLOCKWISE is the default.
/CLOSE[=real]
/NOCLOSE
- requests that IFIXAREA should check for open features and if any are found, close them. A feature is considered to be open if it has three or more points, and the distance between the start and end points is less or equal to the specified close tolerance. If no tolerance is specified, then all open features are closed. The tolerance is specified in IFF units.
Features are closed by adding an extra point at the end of the feature with the same coordinates as the start of the feature. However, if /NEAR is specified, then features being closed whose endpoints are within the 'almost repeated' tolerance are closed by moving the end point onto the start point, rather than by adding an extra point.
/DELETE
/NODELETE
- requests the deletion of repeated adjacent vertices.
/DFAD
- specifies that the input file contains DFAD data. In level 2 DFAD data, area features can be distinguished as having feature code 102. Unless the /AC qualifier is used to enforce level 1 DFAD conventions (q.v.), corrections will be applied to all DFAD level 2 area features within the file or specified layers. /DFAD is invalid for use with /FC.
If /DFAD is specified, the functions specified by the /CLOSE, /REVERSE and /NEAR qualifiers are performed. There is no need to specify /CLOSE, /REVERSE and /NEAR explictly.
/FC=integer[,...]
- process only features with the specified feature codes. Ranges of feature codes may be specified with starting and ending feature code numbers that are separated by a colon (/FC=230:890). When specifying more than one range of FCs, separate each range with a comma (/FC=(20:40,60:89)) This qualifier is invalid with /DFAD. A maximum of 1024 feature codes may be specified.
/LAYER=integer[,...]
- process only the specified layers. Ranges of layers may be specified with starting and ending layer numbers that are separated by a colon (/LAYER=56:58). When specifying more than one range of layer numbers, separate each range with a comma (/LAYER=(1:5,56:89)). A maximum of 1024 layer numbers may be specified.
/LOG
/NOLOG
- this will result in supplementary messages being sent to SYS$OUTPUT and to an output file if one has been specified with the /OUTPUT or /PRINT qualifiers. Supplementary messages are generated when a file is successfully opened, and a reassuring message output each time a new IFF layer is encountered in the IFF file. A report is made of each feature number and the correction performed. With large files this output can be voluminous !
/NEAR[=real]
- requests that IFIXAREA should check for 'almost repeated' vertices, i.e_. those that lie within the distance specified of each other. If such vertices are found, then the second of each pair is not output to the output IFF file. The tolerance used in the comparison may be specified as 'real', a value in IFF units. If no tolerance is specified, then if NINT(x1)_-NINT(x2) and NINT(y1)-NINT(y2) are both 0, the adjacent vertices x1,y1 and x2,y2 are considered to be 'almost adjacent'. Note that if too large a tolerance is specified, then excessive numbers of vertices may be thrown away!
/OUTPUT [=file-spec]
- by default output will be to SYS$OUTPUT. This option allows the user to redirect output to the specified file.
/PRINTER
/NOPRINTER
- queues the IFIXAREA output for printing under the name given by the /OUTPUT qualifier. If you specify /PRINTER without the /OUTPUT qualifier, the output is directed to a file named SYS$DISK:IFIXAREA.LIS which is queued automatically for printing and then deleted.
/REVERSE
/NOREVERSE
- requests the reversal of features which have digitising order at variance to the direction specified by the /CLOCKWISE or /ANTI_CLOCKWISE qualifiers. The default direction for /REVERSE is anticlockwise.
Checking takes place by default for all features in the file. Alternatively a restricted class of features may be selected for checking. The restriction may be made by specifying one or more layer numbers which are to be processed with the /LAYER qualifier , and/or by specifying one or more feature codes with the FC qualifier.
Features not checked are copied to the output IFF file, and errors detected in other features are corrected before writing the feature to the output IFF file. The order of error correction is first repeated or 'almost repeated' vertices, then feature closure and finally direction of digitising. In 'almost repeated' vertices, the second vertex is removed. All combinations of check options are possible although /NEAR makes the /DELETE qualifier redundant. Not all combinations of selection options are valid however (see restrictions section). IFIXAREA aborts if no qualifiers are specified as the file would merely be copied to the output IFF file.
At the end of the run a summary is given containing the total number of features in the file and total numbers of features closed and reversed if the respective qualifiers are specified. If /DELETE or /NEAR is specified, the total number of points removed from all features appears in the summary.
IFIXAREA cannot deal with features containing more than 100000 points.
--------------------------------------------------------------------------------
$ IFIXAREA TEST1.IFF/LOG/CLOSE/NEAR/REVERSE/PRINT TEST1.NEW%IFIX-I-DEFANTICLK, anti-clockwise rotation defaults %LSLLIB-I-IFFOPENED, DUA3:[TOM.TEST]TEST1.IFF; opened for read %LSLLIB-I-IFFOPENED, DUA3:[TOM.TEST]TEST1.NEW opened for write %IFIX-I-LAYPROC, processing layer 1 %IFIX-I-FSNCLO, feature with FSN 337 (377) closed %IFIX-I-FSNPTDEL, 1 point deleted in feature with FSN 338 (338) %IFIX-I-NOCLPTS, feature with FSN 338 (338) not closed, only 2 points %IFIX-I-FSNPTDEL, 1 point deleted in feature with FSN 335 (335) %IFIX-I-FSNCLO, feature with FSN 335 (335) closed %IFIX-I-FSNREVD, feature with FSN 335 (335) reversed %IFIX-I-NOCLPTS, feature with FSN 326 (326) not closed, only 2 points %IFIX-I-FSNCLO, feature with FSN 336 (336) closed %IFIX-I-FSNCLO, feature with FSN 370 (370) closed %IFIX-I-FSNCLO, feature with FSN 369 (369) closed %IFIX-I-FSNREVD, feature with FSN 369 (369) reversed %IFIX-I-FSNCLO, feature with FSN 1568 (1568) closed %IFIX-I-FSNCLO, feature with FSN 1569 (1569) closed %IFIX-I-FSNREVD, feature with FSN 1569 (1569) reversed %IFIX-I-FSNCLO, feature with FSN 1570 (1570) closed %IFIX-I-NOCLPTS, feature with FSN 1633 (1633) not closed, only 2 points %IFIX-I-FSNCLO, feature with FSN 1681 (1681) closed %IFIX-I-FSNREVD, feature with FSN 1681 (1681) reversed %IFIX-I-FSNPTDEL, 1 point deleted in feature with FSN 1682 (1882) %IFIX-I-FSNCLO, feature with FSN 1682 (1682) closed %IFIX-I-FSNREVD, feature with FSN 1682 (1682) reversed %IFIX-I-FSNCLO, feature with FSN 1687 (1687) closed %IFIX-I-FSNREVD, feature with FSN 1687 (1687) reversed %IFIX-I-FSNPTDEL, 1 point deleted in FSN 1684 (1684) %IFIX-I-FSNCLO, feature with FSN 1684 (1684) closed ............etc.......... %IFIX-I-LAYPROC, processing layer 2 %IFIX-I-FSNREVD, feature with FSN 2030 (2030) reversed %IFIX-I-FSNPTDEL, 1 point deleted in feature with FSN 1320 (1320) %IFIX-I-LAYPROC, processing layer 111 %IFIX-I-FSNPTSDEL, 7 points deleted in feature with FSN 1938 (1938) %IFIX-I-FSNREVD, feature with FSN 1938 (1938) reversed %IFIX-I-FSNREVD, feature with FSN 2044 (2044) reversed %IFIX-I-FSNPTDEL, 1 point deleted in feature with FSN 1706 (1706) %IFIX-I-FSNPTSDEL, 5 points deleted in feature with FSN 154 (154) %IFIX-I-FSNCLO, feature with FSN 154 (154) closed %IFIX-I-FSNREVD, feature with FSN 154 (154) reversed %IFIX-I-FSNPTDEL, 1 point deleted in feature with FSN 1616 (1616) %IFIX-I-FSNPTSDEL, 8 points deleted in feature with FSN 1776 (1776) %IFIX-I-FSNPTSDEL, 2 points deleted in feature with FSN 1593 (1593) %IFIX-I-FSNREVD, FSN 1593 reversed SUMMARY: 857 features processed 13 features closed 29 features reversed 117 points deleted ELAPSED: 00:00:08.43 CPU: 0:00:04.63 BUFIO: 10 DIRIO: 120 FAULTS: 133 $
This example demonstrates the use of the /LOG, /CLOSE, /NEAR, /REVERSE and /PRINT qualifiers. The user specified the input file to be LSL$IF:TEST1.IFF, the output file to be LSL$IF:TEST1.NEW, and gave the qualifiers to check for closure of features, 'almost repeated' vertices, and direction of digitising. The checks are carried out in the order specified in the documentation and not in the order that they are specified in the command line, so the first check carried out is for 'almost repeated' vertices. The input file is not changed. Features that are not in error are copied to the output IFF file and features in error are 'fixed' and then copied to the output file.
The user did not specify a distance for the /NEAR qualifier so the default is taken. The /CLOSE qualifier checks that all features with three or more points have equal start and end points. In this case the default operates. The /REVERSE qualifier was specified but no direction qualifier specified so again the default ANTI_CLOCKWISE operates, and a message is output to this effect. The /LOG qualifier has the effect of sending supplementary messages to SYS$OUTPUT. As the example shows messages are output when files are successfully opened, when different layers are encountered, when any changes are made to any of the features, and why any features are not closed. When the end of the file is reached a summary of all the changes made is output with timing information . As the /PRINT qualifier was specified a summary of the program execution is also sent to the printer. This includes confirmation of the input and output IFF files, information about the user, the command line specified and messages about changes made to each feature.
$ IFIXAREA _Input-file: CHELSEA/NEAR/CLOSE/LAY=111/FC=30/REVERSE/CLOCKWISE/OUTPUT_Fixed-IFF-file: CHELSEA.NEW ================================== IFIXAREA ================================== Input file: LSL$IF:CHELSEA.IFF; Output file: LSL$IF:CHELSEA.NEW;0 IFIXAREA invoked by: TOM, Process: Tom Timms, on: 28-AUG-86 09:29:25 Command line: IFIXAREA CHELSEA/NEAR/CLOSE/LAY=111/FC=30/REVERSE/CLOCKWISE/OUTPUT CHELSEA.NEW Copying layer 1 Copying layer 2 Processing layer 111 SUMMARY: 57 features processed 13 features closed 9 features reversed 7 points deleted ELAPSED: 00:00:08.27 CPU: 0:00:02.84 BUFIO: 4 DIRIO: 92 FAULTS: 120 $
In this example the user typed the command IFIXAREA and was prompted for the input and output files. The input file specified was CHELSEA which is expanded to the default LSL$IF:CHELSEA.IFF. The check qualifiers specified were /NEAR, /CLOSE, /REVERSE, as in the previous example but in this case the user specified the /LAYER and /FC qualifiers to limit the checking to features with a feature code of 30 within layer 111. The user also specified the /CLOCKWISE qualifier so that all features with the specified attributes would be checked for clockwise rotation. The /OUTPUT qualifier has the effect of sending supplementary messages about input and ouput file, the user and the different layers as they are encountered to SYS$OUTPUT. These messages could have been directed to a file if a file specification had been given with the /OUTPUT qualifier. The output file specification given was CHELSEA.NEW (expanded to LSL$IF:CHELSEA.NEW by default).
$ IFIXAREA CHELSEA/NEAR=1.3/CLOSE/LAY=111/REVERSE/CLOCKWISE/OUTPUT_Fixed-IFF-file: CHELSEA.FIX ================================== IFIXAREA ==================================== Input file: LSL$IF:CHELSEA.IFF; Output file: LSL$IF:CHELSEA.FIX IFIXAREA invoked by: TOM, Process: Tom Timms, on: 28-AUG-86 09:29:34 Command line: IFIXAREA CHELSEA/NEAR=1.3/CLOSE/LAY=111/REVERSE/CLOCKWISE/OUTPUT CHELSEA.FIX Copying layer 1 Copying layer 2 Processing layer 111 SUMMARY: 85 features processed 1 features closed 0 features reversed 1 point deleted ELAPSED: 00:00:06.96 CPU: 0:00:02.91 BUFIO: 5 DIRIO: 91 FAULTS: 139 $
In this example the user specified almost exactly the same qualifiers as in the previous example except that the the qualifiers were typed on the same line as the IFIXAREA command. The input file specification is the same as in the previous example but in this case the /FC qualifier was omitted and an argument was specified with the /NEAR qualifier (1.3) to over-ride the default 'almost adjacent' distance. As no output file was specified the program prompted for one. The user typed CHELSEA.FIX as a file specification (confirmed by the output messages).
$ IFIXAREA NEW_YORK.IFF/OUTPUT=NEW_YORK.LIS/CLOSE NEW_YORK.CLO%LSLLIB-E-IFFOPEN, IFF error opening "LSL$IF:NEW_YORK.IFF;" for read %IFF-E-OPEN, error opening IFF file -RMS-E-FNF, file not found ELAPSED: 00:00:00.76 CPU: 0:00:00.30 BUFIO: 1 DIRIO: 1 FAULTS: 105 $
In this example the user specified that the file NEW_YORK.IFF should be checked for feature closure with the output file being NEW_YORK.CLO. An output file NEW_YORK.LIS was also requested to contain a summary of program execution. However the input file NEW_YORK.IFF was not found in LSL$IF:, either the filename was incorrect or the logical name LSL$IF: was not pointing to the correct directory or device.
$ IFIXAREA DFADWOODS.IFF/OUT/DFAD/AC TESTDFAD=================================== IFIXAREA =================================== Input file: LSL$IF:DFADWOODS.IFF; Output file: LSL$IF:TESTDFAD.IFF;0 IFIXAREA invoked by: TOM, Process: Tom Timms, on: 28-AUG-86 09:29:49 Command line: IFIXAREA DFADWOODS.IFF/OUT/DFAD/AC TESTDFAD Processing layer 2 SUMMARY: 324 features processed 40 features closed 19 features reversed 3 points deleted ELAPSED: 00:00:41.16 CPU: 0:00:19.78 BUFIO: 10 DIRIO: 554 FAULTS: 126 $
This example demonstrates the use of the /DFAD and /AC qualifiers on a suitable DFAD file DFADWOODS.IFF. The output file was specified as TESTDFAD which defaults to LSL$IF:TESTDFAD.IFF. As /OUTPUT was specified supplementary messages were sent to SYS$OUTPUT. The /AC qualifier caused selection of DFAD features on the basis of AC rather than feature code. These qualifiers are specific to DFAD type files and should not be used on non-DFAD files.
$ IFIXAREA TTT/CLOSE/LAY=1/REVERSE/DELETE QQQSUMMARY: 85 features processed 35 features closed 25 features reversed 9 points deleted ELAPSED: 00:00:07.85 CPU: 0:00:03.64 BUFIO: 4 DIRIO: 103 FAULTS: 121 $
This example demonstrates a typical production run of IFIXAREA with no supplementary information requested by /LOG or /OUTPUT qualifiers. The file to be fixed was TTT.IFF and the requested checks (on layer 1 only) were for closure, for direction of digitising (with the default anticlockwise rotation assumed), and for repeated adjacent vertices (the /DELETE qualifier). The output IFF file was specified as QQQ.IFF. On program completion a summary was given of the number of features closed and reversed and the number of points deleted.
--------------------------------------------------------------------------------
These messages give information only, and require no immediate action by the user.
DEFANTICLK, anticlockwise rotation defaults.
Explanation: The /REVERSE qualifier has been specified with no qualifier to define the rotation of features. The message confirms that the default anticlockwise rotation is taken.
User action: None.
FSNCLO, feature with FSN 'integer' ('integer') closed
Explanation: The specified feature has been closed.
User action: None.
FSNPTSDEL, 'integer' point(s) deleted in feature with FSN 'integer'
('integer')
Explanation: The /DELETE or /NEAR qualifiers have been selected and IFIXAREA is reporting that points have been deleted from the specified feature.
User action: None.
FSNREVD, feature with FSN 'integer' ('integer') reversed
Explanation: The specified feature has been reversed.
User action: None.
LAYCOP, copying layer 'integer'
Explanation: The specified layer in the input IFF file has been found, but it is not one of those selected by the /LAYER qualifier. The message confirms that the current layer is just being copied to the output IFF file.
User action: None.
LAYPROC, processing layer 'integer'
Explanation: The specified layer in the input IFF file has been found, and is being checked.
User action: None.
LSTOPNOUT, list file 'file-spec' opened for output.
Explanation: The /OUTPUT = 'file-spec' qualifier has been specified and the message is confirming that the output file has been opened.
User action: None.
NOCLPTS, feature with FSN 'integer' ('integer') not closed, only
'integer' point(s)
Explanation: The specified feature was not closed as it contained insufficient points.
User action: None.
NOCLINVIS, feature with FSN 'integer' ('integer') not closed,
'integer' invisible segment(s).
Explanation: The specified feature was not closed because it contained the specified number of invisible segment(s).
User action: None, unless invisible lines are not expected, when further investigation may be required.
These messages are output when an error has occurred that can be corrected immediately by the user.
ACNOTYFNOVAL, no type field in AC 7 entry FSN 'integer' ('integer').
Explanation: The /DFAD and /AC qualifiers have been specified but the required type field is missing from the type 7 AC text field.
User action: Check that the DFAD data is correctly specified by the AC type 7 using IPATCH. If the AC text is missing then add the correct text using LITES2 or IPATCH and rerun the program.
EXTCOLIGN, Only coordinates processed in CB - feature FSN integer
(integer)
Explanation: IFIXAREA has encountered a CB entry containing more than three X,Y,Z data columns. IFIXAREA does not reproduce non-coordinate columns in the output file.
User action: Check that no useful information is being lost.
LSTNSPLDEL, listing file not spooled or deleted
Explanation: The program has been unable to spool or delete the listing file specified by the /OUTPUT or /PRINT qualifier.
User action: Check that any listing file specification is correct. Check that the print queues are functioning correctly. If the problem continues notify the system manager.
LSTNSPL, listing file not spooled
Explanation: The program has been unable to spool the listing file specified by the /OUTPUT or /PRINT qualifier.
User action: Check that any listing file sepecification is correct. Check that the print queues are functioning correctly. If the problem continues notify the system manager.
--------------------------------------------------------------------------------
ERRCLOINP, error closing input IFF file 'file-spec'
ERRCLOFIX, error closing output IFF file 'file-spec'
Explanation: An error has occured in closing the specified IFF file.
User action: The accompanying messages should help you to interpret the cause of this error. Check that there is sufficient disk space for the file and that the disk is functioning properly. If the problem continues, notify the system manager.
ERROPLST, error opening list file 'file-spec'
Explanation: The supplied file specification is erroneous, or the file is nonexistent, or you do not have read access to the file.
User action: The accompanying messages will help you to interpret the cause of the error. Check the file specification for errors, check that you have read access to the file. If the problem continues, notify the system manager.
INVALFC, invalid Feature Code 'integer' specified
Explanation: An invalid feature-code has been specified either less than 0 or greater than 32767.
User action: Re-run the program with valid feature codes specified.
INVALLAY, invalid LAYER 'integer' specified
Explanation: An invalid layer has been specified either less than 0 or greater than 32767.
User action: Re-run the program with valid layer specified.
NOQUALIFIERS, no fixing qualifiers specified - aborting
Explanation: None of the checking/fixing qualifiers /CLOSE, /NEAR, /DELETE, /REVERSE, or /DFAD have been specified and the input file would merely be copied to the output file!
User action: Ensure that you have read this documentation before re-running IFIXAREA.
TOOMNYPTS, too many points in feature with FSN 'integer' ('integer')
Explanation: You have a very large feature ! There are more than 100000 points in the feature wiht FSN 'integer' and IFIXAREA cannot process more than that number of points.
User action: Either split the feature using LITES2 or reduce the number of points by thinning the feature using IFILTER.
UNEXPEOF, unexpected end of IFF file
Explanation: This message indicates there is something seriously wrong with the IFF file which has caused immediate termination of the program. IFIXAREA has detected the end of the IFF file, but has not detected an IFF 'EJ' entry.
User action: Use IMEND on the file, which will correctly position the EOF marker and insert an EJ entry at the end of the file. Re-run IFIXAREA on the corrected file.
In addition to the above messages which are generated by IFIXAREA itself, other messages may be produced by the command line interpreter (CLI) and by Laser-Scan libraries. In particular, messages may be generated by the IFF library. These are introduced by '%IFF' and are documented in the IFF library users' guide. In most cases IFF errors will be due to a corrupt input file, and this should be the first area of investigation. If the cause of the error cannot be traced by the user and Laser-Scan are consulted, then the input file should be preserved to facilitate diagnosis.