--------------------------------------------------------------------------------
MODULE IDIFFERENCE
--------------------------------------------------------------------------------
REPLACES DAMP module CMPIFF
--------------------------------------------------------------------------------
IDIFFERENCE is the IMP IFF file comparison utility. It compares the file header entries (the RA,HI,etc), and then for each layer that is present in both files, it compares the features. Features are compared if they have the same FSN (Feature Serial Number). If several features in one layer have the same FSN, only the last encountered is compared. Note that layers and features within the files need not be sorted.
--------------------------------------------------------------------------------
$ IDIFFERENCE master-file-spec revision-file-spec
Command qualifiers Defaults
/DEBUG No debug information
/FRT=file-spec No FRT
/[NO]IGNORE=([FSFC],[FSSTATUS],[FSPCTEXT], /NOIGNORE
[FSUSERWORD],[HI],[MD],[NS],
[TH])
/LOG No logging
/LOOKAHEAD=integer /LOOKAHEAD=20
/[NO]OS /NOOS
/OUTPUT=file-spec Output to SYS$OUTPUT
/[NO]PLOT=([COORDINATES],[ATTRIBUTES],[OTHER]) /NOPLOT
/PRINTER Output is not printed
/SUMMARY See text
/TOLERANCE=([DEFAULT=real],[FACTOR=real]) See text
--------------------------------------------------------------------------------
_File1: master-file-spec
_File2: revision-file-spec
--------------------------------------------------------------------------------
master-file-spec
- specifies the master IFF file with which comparison is to be made. Any part of the file specification which is not supplied will be taken from the default specification LSL$IF:IFF.IFF;0
The master IFF file is referred to as "file 1" by the program, and is regarded as the 'correct' file.
revision-file-spec
- specifies the IFF file which is to be compared with the master file. Any part of the file specification which is not explicitly given will be taken from the parsed master file specification.
If the revision-file-spec is ommitted, then IDIFFERENCE will attempt to use the previous version of the master file as the revision file. It generates the revision-file-spec by subtracting 1 from the master file's version number. If no version number is given in the master-file-spec, then IDIFFERENCE will look for version ";-1", which is VMS short-hand for the previous version.
The revision file is referred to as "file 2" by the program.
--------------------------------------------------------------------------------
/DEBUG=integer
- this qualifier requests various types of debugging messages. It is documented here for completeness, but is not recommended for use by customers as it will produce voluminous output.
/FRT=file-spec
- this qualifier specifies an FRT file which will be read to provide ACD definitions. These specify customer or application specific AC and CB column types and names. If no FRT file is read, then only the Laser-Scan default ACD definitions will be understood by IDIFFERENCE. This means that only AC and CB data with these ACD types will be compared according to their datatype, and labelled correctly in difference listings. If an FRT file is specified, its specification will be filled out from the default file-spec LSL$FRT:.FRT;0
/IGNORE=(FSFC,FSSTATUS,FSPCTEXT,FSUSERWORD,HI,MD,NS,TH)
/NOIGNORE (default)
- this qualifier specifies whether an entry/or list of entries in the input IFF files is/are to be ignored during the comparison process of IDIFFERENCE.
The following keyword arguments to the /IGNORE qualifier specify the IFF entries, or part entries, which are to be excluded from the file comparison:
Part-entry keywords:
File level entry keywords:
Feature level entry keywords:
The default value for this qualifier is /NOIGNORE.
/LOG
- this qualifier results in supplementary messages being sent to SYS$OUTPUT. Messages are produced when files are successfully opened.
/LOOKAHEAD=integer
- this qualifier sets the acceptance window for point comparison within a feature. If there are no more than the given number of different points between equal points, then the feature being compared is considered to match (compare with the /MAXIMUM_DIFFERENCES and /WINDOW qualifiers of the VMS DIFFERENCE utility). The default value for /LOOKAHEAD is 20.
/OS
/NOOS (default)
- this qualifier forces IDIFFERENCE into Ordnance Survey (UK) mode. This differs from the default mode of IDIFFERENCE in that:
/OUTPUT=file-spec
- by default all output is to SYS$OUTPUT. This qualifier specifies that output should be redirected to the named file, with an additional header at the start of the file noting the command line, etc. If 'file-spec' is ommitted, then a file IDIFFERENCE.LIS will be generated. Note that /LOG messages are still output to SYS$OUTPUT, and not to the /OUTPUT file.
/PLOT=(COORDINATES,ATTRIBUTES,OTHER)
/NOPLOT (default)
- this qualifier requests that IDIFFERENCE produce three IFF files to reflect the differences between the master and revision files. The plot IFF files have the same file-spec as the master file, except that the file name of each file has extra characters added to it:
The arguments to the /PLOT qualifier are used to specify which features are to be output to the third (difference) file.
In addition to any features which are found to be different, the plot files also contain a frame representing the area covered by the two files. The frame is placed in a separate layer. The number of this layer is determined using the maximum layer number from the 2 input files, plus one.
/PRINTER
- if this qualifier is specified, then program output will be written to a file, which will be queued for printing on SYS$PRINT and then deleted when IDIFFERENCE finishes. If /OUTPUT has also been specified, then the file concerned is the /OUTPUT file. Otherwise, a default file called IDIFFERENCE.LIS will be used.
/SUMMARY
- if this qualifier is specified, then only the final summary of differences will be output.
/TOLERANCE=(DEFAULT=real,FACTOR=real)
- this qualifier specifies the tolerances to be used in determining whether real (floating point) attributes (including X and Y) are to be considered as identical. The numbers specified may not be negative. If an attribute has an interval defined in its ACD, then the tolerance used for comparison is the FACTOR value multiplied by that interval. Otherwise, the DEFAULT value is used. If the user does not specify the FACTOR value, then a default of 1.0 is used. If the user does not specify the DEFAULT value, then IDIFFERENCE uses the maximum coordinate range divided by 10000. The maximum coordinate range is deduced by taking the range entries of both input files into consideration.
When comparing real attributes (and for line strings this includes the X and Y coordinates), two values a1 and a2 are considered equal if ABS(a1-a2) is less than or equal to the relevant tolerance.
--------------------------------------------------------------------------------
IDIFFERENCE takes two IFF files as input, and detects
Depending on the command qualifiers all the information regarding these differences will be output to SYS$OUTPUT or to a listing file. If there is more than one map in either input file, only the first will be compared. IDIFFERENCE expects FSNs (Feature Serial Numbers) to be unique within each layer.
IDIFFERENCE compares the
IDIFFERENCE ignores junction entries. Specifically, it does not look for SH or JB entries amongst the file header entries, and it ignores any JP entries found within a feature.
Various obsolete entries are not recognised - these are
Voids (VO entries) are always ignored.
Note that when comparing the 'file header' entries (ie everything before the first layer of the files - the RA,HI,etc), the order of the entries is not relevant to IDIFFERENCE. Before reading in each header entry, IDIFFERENCE rewinds to the start of the file and then searches forwards for the entry.
IDIFFERENCE also ignores those entry/list of entries that are explicitly specified in the /IGNORE qualifier - these are
When comparing floating point quantities, a direct check for equality is not sensible. Instead, IDIFFERENCE checks that real values are the same within a tolerance. Three tolerances are used:
The RA entries are compared to see whether the range of coordinates described is the same. Range elements are considered equal if they differ by less than the standard real tolerance.
The HI entries are checked to see whether they contain the same number of history records, and whether the history records within each entry are identical. If they do not match then the complete HI entry from each file is output.
HI entries are ignored only when the qualifier /IGNORE=HI is specified.
The fields of the MH are compared in turn. Differences are reported on the basis of which longword field of the MH does not match, and each mismatched field is output as a hexadecimal quantity.
Note that if the /OS qualifier is selected, then the first four fields in the MH (job number, scale and SW corner easting and northing) are recognised separately, and output in an appropriate form.
The MD entries are checked to ensure that they are of a valid type, and that they are both the same length. If they are compatible, then their contents are compared, and if any of the fields vary then the complete map descriptor will be output. Real MD elements are considered equal if they differ by less than the standard real tolerance, integer elements are required to match exactly.
MD entries are ignored only when the qualifier /IGNORE=MD is specified.
IDIFFERENCE (like most of the other IMP utilities) is not intended to deal with files that have just been digitised, and are thus split into multiple sections. Files produced by LASERAID should be processed with LAPROCESS to perform any transformations necessary, and all new files should be processed by IMERGE or LITES2 to consolidate the separate sections in which files are normally digitised.
IDIFFERENCE assumes that there is only one section in the IFF files being compared, and only compares the first NS entry in each file. If the entries do not match, then they will both be output.
NS entries are ignored only when the qualifier /IGNORE=NS is specified.
Again, it is assumed that the file has been processed to consolidate sections. Thus IDIFFERENCE will only look for one CC entry in each file. The entries for the two maps are compared. If any differences are found the whole of the CC entry for each file is output. Coefficients are considered equal if they differ by less than the standard real tolerance.
Again, it is assumed that the file has been processed to consolidate sections. Thus IDIFFERENCE will only look for one CP entry in each file. If the control points of the two files are different in any respect then the complete CP entry for each file is output. Control points are considered equal if they differ by less than the standard real tolerance.
IDIFFERENCE does not require that layers be in order within the IFF files being compared, nor does it require that they be 'continuous'. That is, if a file has several layers with the same layer number (which is stored in the NO entry), then IDIFFERENCE will recognise the data within them as all being part of the same layer.
After comparing the file header entries (above), IDIFFERENCE scans the input files to establish where all of the NO (New Overlay) entries are. It then compares the layers in ascending numerical order. If a layer is only present in one file, then this is reported (and no comparison is made of the features within that layer).
Within each layer, features are compared according to their FSN (Feature Serial Number). That is, if a feature in layer 3 in one file has FSN 77, it will be compared with the feature with FSN 77 in layer 3 in the other file. Internal sequence numbers are ignored by IDIFFERENCE.
IDIFFERENCE does not require that features be sorted into FSN order - when it starts comparing a layer, it builds an internal table of the addresses of each feature. It can then compare them in ascending order of FSN by looking up the location of the relevant feature in each file.
If there are several features with the same FSN in a layer, then IDIFFERENCE will use the last of the features (that is, the one nearest the end of the IFF file) as the one to be compared. Each time that a duplicate FSN is encountered, IDIFFERENCE outputs a message warning that it is using the latest version of the feature.
When features are compared, they may be counted as identical, different or unmatched. The summary of differences at the end of the program lists how many features were in each category. A single feature is only counted once, and if it is found to be both different and unmatched then it is counted as unmatched.
For each feature, the FS (Feature Status), AC (Ancillary Code), TS (Text Status), TH (Text Height or THickness), RO (ROtation), TX (TeXt) and CB, ST or ZS (coordinate block or string) entries are compared. A feature is rejected as malformed if it does not contain an FS and at least one CB (or ST/ZS) entry, and if it does not end with an EF entry.
The entries are compared as follows:
The text/symbol bits in word three of the FS entry are decoded for each feature to determine if it is a text, a symbol or a line. If both features do not have the same bits set, they are considered unmatched, and comparison of the FS entry is abandoned. User must note that this comparison will be performed only when the command qualifier /IGNORE=FSPCTEXT is not specified.
If the text/symbol bits match, then the rest of the FS entries are compared. Any differences result in the features being considered different.
If only one feature has AC entries, then a warning message is output and the features are considered different.
If both features contain the same number of ACs, these are compared in the order that they occur. If any difference is found, or if the features have a different number of ACs, then all the ACs for both features are printed out, and the features are different.
The TS entry starts a text component. This is effectively a 'sub-text-feature', and may contain all of the entries found within a normal text feature, except for FS and AC entries. A text component is terminated by the next TS or by the EF (End of Feature) entry, and is compared as if it were indeed a sub-feature - that is, each text component is compared in turn, in the order that they are encountered in the features.
If only one of the features being compared has a text component, then a warning is given and the features are considered different. Note that in this case, the feature without a text component will be compared to the entries before the text components in the other. This will generally produce a series of "entry 'entry' missing" messages, as the feature with text components should only have an FS and possibly ACs before its first TS entry.
If the features contain differing numbers of text components, then as many as possible are compared. The features will be considered different.
For each text component, the TS entry is compared, and then the rest of the text component is compared, in the same way as a normal feature. Words one and three of the TS entry are compared in the same way as words one and three of an FS entry (qv), except that word three must have the text bit set. Words two and four are reserved, and should be zero.
If only one feature has a TH entry, then a warning message is output, and the features are considered different
If both features contain TH entries, they are compared. If they do not match, then the features are considered different.
TH entries are ignored only when the qualifier /IGNORE=TH is specified.
If only one feature has an RO entry, then a warning message is output, and the features are considered different.
Otherwise, the two RO entries are compared, and if they do not match the feature is considered different. Note that the rotations are considered to match if they differ no more than the standard real tolerance.
If only one feature has a TX entry, then a warning message is output, and the features are considered different.
Otherwise, if the texts have a different number of characters, or if the characters in the texts do not match, then the differing texts are printed out, and the features are considered to be different.
Every feature must contain at least one X,Y coordinate pair, held in a CB, ST or ZS entry.
IFF revision level 0 files hold their coordinates in ST or ZS (2d or 3d coordinate string) entries. IFF revision level 1 files use CB (Coordinate Block) entries instead. IDIFFERENCE converts all ST and ZS entries to CB entries internally - it thus never actually sees any of the older type of entry.
The actual distribution of points within coordinate blocks is not important - that is, if one feature has two CBs of 150 and 30 points, and the other has one CB containing 180 points, IDIFFERENCE will still compare each point with its corresponding point in the other file.
Before comparing the CB entries for a feature (or text-component), IDIFFERENCE scans the relevant CB entries, to determine how many columns (attributes) are used within the feature, what they are, and how many points there actually are. If the columns (attributes) in the two features differ, a warning will be output, and the features will be considered different.
Each point x1,y1,... from file 1 is compared with the corresponding point x2,y2,... in file 2, and they are considered to match if all of the attributes (including the X and Y coordinates) are found to match. Real attributes are compared using the appropriate tolerance - for X, Y and Z coordinates this will be the default real tolerance.
If the two points match, but their visibility does not (that is, there is an invisible line segment ending at one, and a visible line segment ending at the other), then they will be output, and the feature will be considered different.
If the points do not match, then the point in file 1 is compared with the next point in file 2, and so on until 'lookahead' points from file 2 have been compared. 'lookahead' is the value specified with the /LOOKAHEAD qualifier, and defaults to 20. If the points have still not matched, the next point from file 1 is checked against these same 'lookahead' points from file 2 (note that this includes the point in file 2 which did not match initially). This too is repeated until 'lookahead' points from file 1 have been tried.
If at any stage in this process a match is found, then comparison of the feature continues from the matched points, and a list of the unmatched points (and the first matched point) is output. In this case the features are considered different.
If a match is not found, the comparison is abandoned and a list of the unmatched points tried is output. The features are considered unmatched. Features are also considered unmatched if all of their points fail to match, even if the number of points is less than 'lookahead'.
Difference in CBs are counted slightly differently than differences in other entries within a feature. Four separate counts are kept:
Note that comparison of one feature might be counted towards more than one of these totals.
When the comparison is complete a summary of the differences found is output. This takes the form:
Summary of differences ********************** The following header entries did not match: (1) RA (RAnge) MD (Map Descriptor) 'integer' different layers were found (2) Number of layers compared 'integer' (3) Missing layers in file 1 'integer' (4) Missing layers in file 2 'integer' (5) 'integer' features required comparison: (6) Identical 'integer' (7) Different 'integer' (8) Unmatched 'integer' (9) How features differed by entry type: (10) FS entry 'integer' CB entries - geometry 'integer' CB entries - attributes 'integer' Missing features in file 1 'integer' (11) Missing features in file 2 'integer' (12) Duplicated FSNs in file 1 'integer' (13) Duplicated FSNs in file 2 'integer' (14)
If any of the file header entries was not matched, then line (1) is output, followed by a list of those entries that were different. In this example, the RA and MD entries differed.
Line (2) notes how many different layers were present in the files. Line (3) then records how many of these were present in both files, and lines (4) and (5) indicate how many layers were in one file but not the other. Note that the quantities in lines (3) to (5) sum to the number in line (2).
Line (6) indicates how many features were actually compared. This does not include any features in layers that were ignored, nor does it include features that were missing, or ignored because of duplicated FSNs. Line (7) shows how many features were considered to be identical - ie no differences at all. Line (8) shows the number of different features, and line (9) the number of unmatched features.
If any of the features differed, then line (10) will be output, followed by an indication of how many features differed by each entry type. Note that difference within CB entries (and thus also ST or ZS entries) are counted in four ways - see the section on the comparison of CB entries above. In this example, the only differences observed were in FS entries, and in the actual geometry and attributes of CB entries.
Lines (11) and (12) record how many features were present in one file, but not in the other. Note that if a layer in a file contained several features with the same FSN (Feature Serial Number), and there are no features with that FSN in that layer in the other file, then this only contributes a count of 1 to the 'missing' total.
Lines (13) and (14) record how many features were ignored because they had the same FSN as another feature in the same layer.
--------------------------------------------------------------------------------
$ IDIFFERENCE TJI1 TJI2 /FRT=RONACD<CR> File 1 is LSL750$DUA0:[LSL.IFF]TJI1.IFF;4 File 2 is LSL750$DUA0:[LSL.IFF]TJI2.IFF;15 Comparing with lookahead 20, point tolerances: default 0.03412, factor 1.00 HI (HIstory) entry missing in file 1 HI (HIstory) entry missing in file 2 Comparing layer 1 ******* Feature 1 line feature ======= CB data - differences for file 1 Point X Y 200: 17.4755 87.266922 201: 18.21361 91.21772 202: 18.247231 96.905792 ...equal ------- CB data - differences for file 2 Point X Y 200: 18.247231 96.905792 ...equal ******* Feature 2 line feature CB entries - some columns will not be compared Column Z ( 93) is only present in file 2 ******* Feature 3 line feature FS entry: Feature Code - in file 1 = 0, file 2 = 1 ======= TH entry: file 1 = 0, file 2 = 5 ======= CB data - differences for file 1 Point X Y CAPTURE_XY 6: 50.737034 164.85843 62 7: 50.983398 164.81369 62 8: 51.230087 164.77017 62 9: 51.477097 164.72789 62 10: 51.724419 164.68683 62 11: 51.972038 164.64699 62 ...equal ------- CB data - differences for file 2 Point X Y CAPTURE_XY 6: 50.737034 164.85843 61 7: 50.983398 164.81369 61 8: 51.230087 164.77017 61 9: 51.477097 164.72789 61 10: 51.724419 164.68683 61 11: 51.972038 164.64699 62 ...equal ======= CB data - differences for file 1 Point X Y CAPTURE_XY 23: 54.963589 164.26456 62 24: 55.214287 164.24066 62 25: 55.465157 164.21799 62 26: 55.716187 164.19653 62 ...equal ------- CB data - differences for file 2 Point X Y CAPTURE_XY 23: 54.963589 164.26456 57 24: 55.214287 164.24066 57 25: 55.465157 164.21799 57 26: 55.716187 164.19653 62 ...equal ======= CB data - differences for file 1 Point X Y CAPTURE_XY 27: 55.967377 164.17632 62 28: 56.218708 164.15732 62 ...equal ------- CB data - differences for file 2 Point X Y CAPTURE_XY 27: 55.967377 164.17632 57 28: 56.218708 164.15732 62 ...equal ******* Feature 5 symbol feature FS entry: differing text/symbol codes - in file 1 = symbol, in file 2 = line ======= --- unmatched --- ******* Feature 6 symbol feature ======= AC entries: in file 1 AC Name ( Type) Value Text AC CHANGE_DATE ( 1002) 10-DEC-1987 "" AC DATE_EXAMPLE (12007) 1-JAN-1900 "" ------- AC entries: in file 2 AC Name ( Type) Value Text AC CHANGE_DATE ( 1002) 10-DEC-1987 "" AC DATE_EXAMPLE (12007) 1-JAN-1988 "" AC ? ( 2009) 8 "K200/3/4-B" ******* Feature 7 line feature ======= CB data - differences for file 1 Point X Y Z SURVEY_DATE 1: 5.0 3.0 0.0 23-DEC-1962 2: 6.0 4.0 1.0 14-NOV-1965 ...equal ------- CB data - differences for file 2 Point X Y Z SURVEY_DATE 1: 5.0 3.0 0.0 5-JAN-1988 2: 6.0 4.0 1.0 14-NOV-1965 ...equal ======= CB data - differences for file 1 Point X Y Z SURVEY_DATE 4: 1.0 9.0 8.0 5-MAY-1966 5: 9.0 1.0 2.0 7-JUL-1945 (ends unequal) ------- CB data - differences for file 2 Point X Y Z SURVEY_DATE 4: 8.0 9.0 8.0 5-JAN-1988 5: 9.0 10.0 10.0 5-JAN-1988 (ends unequal) ******* Feature 8 line feature ======= CB data - differences for file 1 21 points left in file 1 ======= --- unmatched --- ******* Feature 9 line feature ======= CB data - differences for file 1 18 points left in file 1 Summary of differences ********************** 1 layer was found Number of layers compared 1 Missing layers in file 1 0 Missing layers in file 2 0 9 features required comparison: Identical 1 Different 6 Unmatched 2 How features differed by entry type: FS entry 2 AC entries 1 CB entries - columns 1 CB entries - geometry 3 CB entries - attributes 2 CB entries - point count 2 TH entry 1 Missing features in file 1 0 Missing features in file 2 0 Duplicated FSNs in file 1 0 Duplicated FSNs in file 2 0 ELAPSED: 0 00:00:17.53 CPU: 0:00:12.63 BUFIO: 171 DIRIO: 179 FAULTS: 168 8
This example illustrates various types of difference between the features in these two IFF files.
The summary then reports on the file in general. One layer was compared, and 9 features. Of these, 1 matched, 2 were considered unmatched, and 6 differed in less severe ways. The differences are then itemised according to entries within a feature. Note that the CB differences are split up - one feature had differing numbers of columns between the files, 3 features had differences in the geometry (ie X,Y,Z or visibility), 2 features had differences in CB attributes (all other columns), and 2 features differed in the number of points (or rows) left after the CBs had been compared. Note that although the matched/unmatched/different values add up to the number of feature compared, the entry summary does not, as one feature may differ in several ways.
$ IDIFFERENCE RWRB RWRD /OUTPUT=RWR<CR> ELAPSED: 0 00:00:20.26 CPU: 0:00:10.42 BUFIO: 64 DIRIO: 295 FAULTS: 1896 $ TYPE RWR.LIS<CR> ============================ I D I F F E R E N C E ============================= IDIFFERENCE invoked by TONY using terminal RTA1: at 5-JAN-1988 14:03:05.29 Command line: IDIFFERENCE RWRB RWRD/OUTPUT=RWR ================================================================================ File 1 is LSL750$DUA0:[LSL.IFF]RWRB.IFF;2 File 2 is LSL750$DUA0:[LSL.IFF]RWRD.IFF;1 Comparing with lookahead 20, point tolerances: default 0.10000, factor 1.00 RA (RAnge) entry in file 1 0.0000 1000.0001 -0.0000 1000.0001 RA (RAnge) entry in file 2 0.0000 1000.0001 -0.0000 1000.0001 HI (HIstory) entry missing in file 1 HI (HIstory) entry missing in file 2 MH (Map Header) entry longword 4 in file 1 = 00079D38, file 2 = 0007A120 (hex) longword 23 in file 1 = 00079D38, file 2 = 0007A120 (hex) Map descriptors - type 2 MDs do not match File 1: - Local origin: 599500.0000, 499000.0000 - Map scale: 1250.0000 - Projection: 101 (UK national grid) - Spheroid: 9 (Airy) - Units: 2 (metres) File 2: - Local origin: 599500.0000, 499500.0000 - Map scale: 2500.0000 - Projection: 101 (UK national grid) - Spheroid: 9 (Airy) - Units: 2 (metres) Comparing layer 1 Comparing layer 11 Summary of differences ********************** The following header entries did not match: RA (RAnge) MH (Map Header) MD (Map Descriptor) 2 different layers were found Number of layers compared 2 Missing layers in file 1 0 Missing layers in file 2 0 53 features required comparison: Identical 53 Different 0 Unmatched 0 Missing features in file 1 0 Missing features in file 2 0 Duplicated FSNs in file 1 0 Duplicated FSNs in file 2 0
In this example, the output is directed to a file, and this file is then typed. The files differed in their range, map header and map descriptor entries only, as reported in the summary at the end. Note that, for the map descriptor, all of the information compared is reported, even though it is only the scale and local origin that differ.
$ IDIFFERENCE FILE1 FILE2 /LOG/PLOT=COORDINATES/OUTPUT=FILE<CR> %LSLLIB-I-IFFOPENED, LSL750$DUA0:[LSL.IFF]FILE1.IFF;2 opened for read %LSLLIB-I-IFFOPENED, LSL750$DUA0:[LSL.IFF]FILE2.IFF;1 opened for read %LSLLIB-I-LOGOPNOUT, log file FILE.LIS opened for write %LSLLIB-I-IFFOPENED, LSL750$DUA0:[LSL.IFF]FILE2_DEL.IFF;2 opened for write %LSLLIB-I-IFFOPENED, LSL750$DUA0:[LSL.IFF]FILE2_CRE.IFF;2 opened for write %LSLLIB-I-IFFOPENED, LSL750$DUA0:[LSL.IFF]FILE2_DIF.IFF;2 opened for write ELAPSED: 0 00:01:28.09 CPU: 0:01:17.63 BUFIO: 35 DIRIO: 912 FAULTS: 1720
In this example, the user has specified /LOG, and thus the opening of all files is reported. The /PLOT=COORDINATES qualifier means that coordinate differences will be output to the output IFF files FILE2_DEL, FILE2_CRE and FILE2_DIF. The /OUTPUT qualifier redirects the actual difference output to the text file FILE.LIS
$ IDIFFERENCE TL1659NE.IFF1 TL1659NE_AFTER.IFF1 /SUMMARY<CR> Summary of differences ********************** The following header entries did not match: HI (HIstory) 1 layer was found Number of layers compared 1 Missing layers in file 1 0 Missing layers in file 2 0 427 features required comparison: Identical 422 Different 4 Unmatched 1 How features differed by entry type: CB entries - geometry 5 CB entries - attributes 5 Missing features in file 1 0 Missing features in file 2 0 Duplicated FSNs in file 1 0 Duplicated FSNs in file 2 0 ELAPSED: 0 00:01:23.27 CPU: 0:01:14.67 BUFIO: 33 DIRIO: 905 FAULTS: 1526
In this example, the /SUMMARY qualifier is used to suppress the main difference output, so that only the final summary is produced.
$ IDIFFERENCE CODETEST CODESORT /OS<CR> File 1 is LSL750$DUA0:[OS.IFF]CODETEST.IFF;3 File 2 is LSL750$DUA0:[OS.IFF]CODESORT.IFF;1 Comparing with lookahead 20, point tolerances: default 0.10000, factor 1.00 HI (HIstory) entry missing in file 1 HI (HIstory) entry missing in file 2 Comparing layer 1 Ignoring layer 11 Summary of differences ********************** 2 different layers were found Number of layers compared 2 Missing layers in file 1 0 Missing layers in file 2 0 706 features required comparison: Identical 706 Different 0 Unmatched 0 Missing features in file 1 0 Missing features in file 2 0 Duplicated FSNs in file 1 0 Duplicated FSNs in file 2 0 ELAPSED: 0 00:01:26.54 CPU: 0:01:16.78 BUFIO: 35 DIRIO: 1394 FAULTS: 194 5
This example illustrates the result of comparing two files with identical contents. Note that we do not know that the order of occurrence of features within the file is the same, since comparison is by feature serial number within each layer.
$ IDIFFERENCE TJI1 TJI3<CR> File 1 is LSL750$DUA0:[LSL.IFF]TJI1.IFF;4 File 2 is LSL750$DUA0:[LSL.IFF]TJI3.IFF;1 Comparing with lookahead 20, point tolerances: default 0.03412, factor 1.00 HI (HIstory) entry missing in file 1 HI (HIstory) entry missing in file 2 Comparing layer 1 ******* Feature 1 line feature ======= CB data - differences for file 1 Point X Y 2: 2.8696361 20.28903 3: 4.7384071 28.668381 ...equal ------- CB data - differences for file 2 Point X Y 2: 2.8729999 20.188999 3: 4.7371998 28.669201 ...equal Summary of differences ********************** 1 layer was found Number of layers compared 1 Missing layers in file 1 0 Missing layers in file 2 0 9 features required comparison: Identical 8 Different 1 Unmatched 0 How features differed by entry type: CB entries - geometry 1 Missing features in file 1 0 Missing features in file 2 0 Duplicated FSNs in file 1 0 Duplicated FSNs in file 2 0 ELAPSED: 0 00:00:12.60 CPU: 0:00:05.82 BUFIO: 51 DIRIO: 178 FAULTS: 1480
In this example, one feature is found to differ. Compare it with the next example.
$ IDIFFERENCE TJI1 TJI3 /TOLERANCE=(DEFAULT=0.001)<CR> File 1 is LSL750$DUA0:[LSL.IFF]TJI1.IFF;4 File 2 is LSL750$DUA0:[LSL.IFF]TJI3.IFF;1 Comparing with lookahead 20, point tolerances: default 0.00100, factor 1.00 HI (HIstory) entry missing in file 1 HI (HIstory) entry missing in file 2 Comparing layer 1 ******* Feature 1 line feature ======= CB data - differences for file 1 Point X Y 2: 2.8696361 20.28903 3: 4.7384071 28.668381 4: 4.315804 32.933281 ...equal ------- CB data - differences for file 2 Point X Y 2: 2.8729999 20.188999 3: 4.7371998 28.669201 4: 4.316 32.9333 ...equal ======= CB data - differences for file 1 Point X Y 7: 5.1894598 39.32761 8: 7.4283938 43.95649 ...equal ------- CB data - differences for file 2 Point X Y 7: 5.1894999 39.330101 8: 7.4278998 43.9566 ...equal Summary of differences ********************** 1 layer was found Number of layers compared 1 Missing layers in file 1 0 Missing layers in file 2 0 9 features required comparison: Identical 8 Different 1 Unmatched 0 How features differed by entry type: CB entries - geometry 1 Missing features in file 1 0 Missing features in file 2 0 Duplicated FSNs in file 1 0 Duplicated FSNs in file 2 0 ELAPSED: 0 00:00:13.93 CPU: 0:00:05.95 BUFIO: 64 DIRIO: 175 FAULTS: 1513
In this example the user has specified the DEFAULT tolerance, to be used for comparing real attributes that do not have an explicit interval in their ACD definition. In the previous example the same two files were compared using the default value of 0.03412, or 1/1000th of the maximum sheet extent. In this example, several more points are discovered to be 'different', due to the finer tolerance.
--------------------------------------------------------------------------------
IDIFFERENCE message output differs from the other IMP utilities in two ways:
Thus in the following sections, only those messages that are produced in unusual circumstances, or that might be puzzling, are listed. Also, all messages are presented as they would appear - that is, the full message text is shown, including the %'utility'... message header when appropriate.
--------------------------------------------------------------------------------
Most IDIFFERENCE messages may be regarded as informational. Apart from messages arising directly from the succesful comparison of two files, the following may be produced:
FSN 'integer' duplicated in file 'integer' - first occurrence ignored
Explanation: Whilst scanning the current layer for features to be compared, IDIFFERENCE has found a feature with the same FSN as a previous feature in that layer. As the message indicates, the program will use this latest feature for comparison.
User action: None.
**COMPMD** Type 'integer' MD in file 'integer' has invalid length
Explanation: The program has attempted to read in an MD (Map Descriptor) entry, but the entry is of the wrong length for the indicated version (1 or 2) of MD. The entry will not be compared.
User action: Investigate why the entry is the wrong length using IPATCH - it may be that the MD type field is set incorrectly, since type 1 and type 2 MD entries have different sizes.
**GETCOD** Unexpected end of file while searching for FS
feature 'integer' in file 'integer'
Explanation: IDIFFERENCE was looking for the FS entry of a feature that only occurs in one of the IFF files, so that it could determine its graphical type. Unfortunately, the feature did not contain an FS entry, and IDIFFERENCE found the end-of-file instead. This indicates that the file is incorrectly terminated in some way. IPATCH will not output a correct message for this feature.
User action: Use IPATCH to examine the end of the file, and use IMEND or LITES2 to correct the file.
**GETEF** Unexpected end of feature 'integer' in file 'integer'
Explanation: IDIFFERENCE was scanning a feature before comparing it, and found end-of-file before it had encountered an EF entry. IDIFFERENCE will abandon comparison of this feature.
User action: Use IPATCH to examine the end of the file, and use IMEND or LITES2 to correct the file.
**GETEF** Unrecognised code 'entry' in feature 'integer', file 'integer'
Explanation: IDIFFERENCE found an IFF entry that it did not expect whilst scanning a feature before comparing it. The entry will be ignored.
User action: Dependent upon the entry reported. If you believe that the entry is correct, and that IDIFFERENCE should compare it, then please consult Laser-Scan. Otherwise, determine why the entry occurred within that feature.
**GETEF** more than 'integer' AC entries in feature 'integer' in file 'integer'
Explanation: When scanning a feature before comparing it, IDIFFERENCE remembers all the feature's AC entries in an internal buffer. This message indicates that that buffer is now full, and further ACs in that feature will be ignored.
User action: Consult Laser-Scan about increasing the size of the internal buffer.
**READCB** Too many rows (points) in 'entry' at 'address' in file 'integer' (found 'integer', max is 200)
Explanation: A CB (or ST or ZS) entry with more than 200 points has been encountered. IDIFFERENCE will attempt to use the first 200 points for the purposes of comparison - this is the standard maximum number of points in a single coordinate block.
User action: Use ITOTEXT and IFROMTEXT to correct this particular file, and correct the program that produced the coordinate string.
**READIN** Non-empty feature with FSN 0 in file 'integer'
- feature ignored
Explanation: IDIFFERENCE has encountered a feature with FSN 0, which does not immediately end with an EF. Historically, features with FSN 0 are 'empty' features, used as place-holders for TC entries. The feature is ignored.
User action: If the feature is meaningful, correct its FSN using IPATCH, IRENUMBER, etc. If the feature is intended as an empty feature 0, then use ITOTEXT and IFROMTEXT to remove its contents.
**READIN** Unexpected end-of-file in file 'integer'
scanning layer 'integer' which starts at 'address'
attempting to continue
Explanation: This error should never occur - it probably reflects an internal consistency error in the program.
User action: Please report this problem to Laser-Scan with as many details as possible.
**SCANSUB** Unexpected end of feature 'integer' in file 'integer'
Explanation: IDIFFERENCE was scanning a text component before comparing it, and found end-of-file before it had encountered an EF entry. IDIFFERENCE will attempt to compare as much of the component as it has read.
User action: Use IPATCH to examine the end of the file, and use IMEND or LITES2 to correct the file.
**SCANSUB** Unknown code 'entry' in feature 'integer', file 'integer'
Explanation: IDIFFERENCE found an IFF entry that it did not expect whilst scanning a text component before comparing it. The entry will be ignored.
User action: Dependent upon the entry reported. If you believe that the entry is correct, and that IDIFFERENCE should compare it, then please consult Laser-Scan. Otherwise, determine why the entry occurred within that text-component.
**SCANSUB** No CB entry in component
Explanation: IDIFFERENCE has not found any coordinate entries in a text component. This means that the component is erroneous. The program will compare those entries it did find.
User action: Investigate why the text component does not contain a CB (or ST or ZS) entry. If the file was produced by a user written program, correct the program; if it was produced by a Laser-Scan program, please consult us with as many details as possible.
**SCANSUB** Unexpected end-of-file in feature 'integer' in file 'integer'
Explanation: IDIFFERENCE was scanning a text component to locate all of its entries, and found end-of-file before finding an EF. THe program will attempt to continue comparison, as if it had found and EF.
User action: Use IPATCH to examine the end of the file, and use IMEND or LITES2 to correct the file.
**SCANTS** Unexpected end of file scanning feature 'integer' in file 'integer'
Explanation: IDIFFERENCE was scanning a composite text to locate all of the TS entries, and found end-of-file before finding an EF. THe program will attempt to continue comparison, as if it had found and EF.
User action: Use IPATCH to examine the end of the file, and use IMEND or LITES2 to correct the file.
**SCANTS** more than 'integer' TS entries in feature 'integer' in file 'integer'
Explanation: When comparing composire text features, IDIFFERENCE remebers the start of each text component in an internal buffer. This error indicates that the program has found more text components than it can remember. It will compare the components that it has room for.
User action: Consult Laser-Scan about increasing the size of the internal buffer.
**WRPLOT** Layer mismatch
Explanation: This message indicates that an error has occurred whilst outputting data to one of the IFF plot files. It should never occur, and indicates that the program has become confused as to which layer it is outputting - an internal array has not been sorted correctly. IDIFFERENCE will continue outputting data.
User action: Please report this problem to Laser-Scan, with as much information as possible.
--------------------------------------------------------------------------------
These messages indicate an error in processing which has caused the program to terminate. The normal cause is an error related to command line processing and file manipulation.
%IDIFF-E-2NDNAME, cannot parse file 'file-spec' to deduce a second file
Explanation: If the user has only specified the master file-spec, then IDIFFERENCE will try to compare it with the previous version of the file. This message indicates that something went wrong with that process, and will be accompanied by appropriate LSLLIB error messages.
User action: Dependent upon the associated messages.
%IDIFF-E-LOOKAHEAD, /LOOKAHEAD value 'integer' should be in range 1 to 'integer'
Explanation: An invalid number was specified with the /LOOKAHEAD qualifier.
User action: Specify a value in the range shown by the message.
%IDIFF-E-NEGTOL, /TOLERANCE value 'real' should not be negative
Explanation: A negative tolerance value has been specified with the /TOLERANCE qualifier. This does not make sense.
User action: Specify a non-negative value.
%IDIFF-E-NOPREV, cannot produce the previous version of file 'file-spec'
Explanation: This message is essentially the same as the %IDIFF-E-2NDNAME message above - the same comments apply.
User action: As for the 2NDNAME error.
%IDIFF-E-NORANGE, cannot compare IFF files without RA entries
Explanation: Since IDIFFERENCE may use the range entries to establish a tolerance for comparing real numbers, it requires that all files to be compared contain a range. The most likely cause of this error is an attempt to compare two Laseraid patch files.
User action: Do not use IDIFFERENCE on these files. If they are indeed patch files, use ITOTEXT and compare the resultant text files with DIFFERENCE.
%IDIFF-E-OUTOPEN, error opening text output file 'file-spec'
Explanation: The program could not open the /OUTPUT file. The LSLLIB messages output with this error should clarify the problem.
User action: Dependent upon the LSLLIB messages.
%IDIFF-E-PLOTCRE, cannot parse plot IFF file spec 'file-spec'
Explanation: To produce a file-spec for the /PLOT IFF files, IDIFFERENCE must parse the master file-spec. This message indicates that it failed to do so. Associated LSLLIB error messages should clarify the situation.
User action: Dependent upon the LSLLIB messages.
%IDIFF-E-PLOTSPEC, cannot parse file-spec 'file-spec' to produce plot IFF file-spec
Explanation: To produce a file-spec for the /PLOT IFF files, IDIFFERENCE adds four characters to the end of the file name. This message indicates that it could not do this. Associated LSLLIB messages should help clarify the situation, but it is probable that the original file name was too long to have four characters added.
User action: Dependent upon the LSLLIB messages.
%IDIFF-E-SCANCB, error scanning CB entries in feature 'integer' in file 'integer'
Explanation: Before comparing them, IDIFFERENCE scans the CB entries for each feature or text component to work out how many columns are present, what they are, etc. This message indicates that the scanning process has failed. It will be followed by another message indicating the nature of the problem.
User action: Dependent upon the following messages.
--------------------------------------------------------------------------------
These messages indicate that the program has failed in some catastrophic manner. IDIFFERENCE fatal error messages will always be followed by one of the following sequences of text:
*** FATAL EXIT *** This is almost certainly due to a bug in the program. Please report it to Laser-Scan with as many details as possible
or
*** FATAL EXIT *** This is due to some limitation in the program. If this causes serious problems, consult Laser-Scan about increasing the limit.
%IDIFF-F-GETNOV, cannot find next layer - DIFNOS is 'integer'
Explanation: An internal error has occurred in the mechanism which locates the next layer in the IFF file.
User action: Report the problem to Laser-Scan, with as much information as possible.
%IDIFF-F-MAXNOS, more than 'integer' NO entries, after 'address' in file 'integer'
Explanation: The specified input file contains more NO (start of layer) entries than will fit into the internal buffers. This does not necessarily mean that the file contains too many layers, but rather that it is too fragmented.
User action: Use IMERGE to consolidate the layers. If the problem continues, then either there is a bug in the program, or the IFF file has a very large number of layers. In either case, consult Laser-Scan.
**'name'** lost position in input IFF file 'integer' at address 'address'
abandoning comparison
**'name'** lost position in output IFF file 'file-spec' at address 'address'
abandoning comparison
**'name'** lost position in IFF file on lun 'integer' at address 'address'
abandoning comparison
Explanation: IDIFFERENCE was trying to move to a known position in the relevant IFF file, and for some reason arrived at the wrong place. This represents a bug in the program, specifically a problem in the IDIFFERENCE routine 'name'.
User action: Report the problem to Laser-Scan, with as much information as possible.
**GETEF** Entry read as 'entry' - should be seen as a CB
Explanation: All ST and ZS entries should be translated into the corresponding CB entry by the IFFLIB library before reaching IDIFFERENCE itself. This message indicates that the translation has failed.
User action: Report the problem to Laser-Scan, with as much information as possible.
**READIN** found FSN 'integer' in file 'integer' - bigger than 65535 !
Explanation: It should not be possible for the program to encounter an FSN of this size - something has gone wrong internally.
User action: Report the problem to Laser-Scan, with as much information as possible.
**READIN** found FSN 'integer' in file 'integer' - less than zero !
Explanation: It should not be possible for the program to encounter a negatibe FSN - something has gone wrong internally.
User action: Report the problem to Laser-Scan, with as much information as possible.
**SCANSUB** Entry read as 'entry' - should be seen as a CB
Explanation: All ST and ZS entries should be translated into the corresponding CB entry by the IFFLIB library before reaching IDIFFERENCE itself. This message indicates that the translation has failed.
User action: Report the problem to Laser-Scan, with as much information as possible.
--------------------------------------------------------------------------------
In addition to the above messages which are generated by IDIFFERENCE 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.