------------------------------------------------------------------------------- MODULE ITOTEXT
-------------------------------------------------------------------------------
REPLACES DAMP module I2TEXT.
-------------------------------------------------------------------------------
ITOTEXT reads an IFF file and outputs a text file. Each IFF entry is output with the appropriate two letter code followed by the accompanying entry information. ITOTEXT is designed to be used for the conversion of data into text form for transfer to external customers.
-------------------------------------------------------------------------------
$ ITOTEXT IFF-file-spec text-file-spec Command qualifiers Defaults /[NO]ABSOLUTE /NOABSOLUTE /[NO]ADDRESS /NOADDRESS /[NO]BRIEF /NOBRIEF /[NO]CUSTOMER /NOCUSTOMER /[NO]DECIMAL_PLACES = integer /NODECIMAL_PLACES /FRT = file-spec No FRT file is specified /[NO]MH /MH /[NO]KEEP /NOKEEP /[NO]LOG /NOLOG /[NO]PRINTER /NOPRINTER /[NO]QUOTED_TEXT /QUOTED_TEXT /REVISION_LEVEL = integer /REVISION_LEVEL = -1 /[NO]WIDTH = integer /NOWIDTH
Output may be directed to a terminal by specifying SYS$OUTPUT: as the output file-spec.
-------------------------------------------------------------------------------
--------------------------------------------------------------------------------
input-file-spec
- specifies the IFF file from which a text file is to be made. Any part of the input-file-spec which is not supplied will be taken from the default specification 'LSL$IF:IFF.IFF;0'.
text-file-spec
- specifies the text file which is to be created. Any part of the output-file-spec which is not explicitly supplied will be taken from:
"SYS$DISK:" + 'input-file-name'+".TXT".
If a file with the specified name already exists a new file will be created with the version number incremented by one.
-------------------------------------------------------------------------------
/ABSOLUTE
/NOABSOLUTE (default)
- if /ABSOLUTE is specified all coordinate values output are converted to absolute values using the origin offset in the type 2 Map Descriptor ('MD') entry. The numbers output may be produced with a user specified format using the qualifiers /WIDTH and/or /DECIMAL_PLACES. Without these settings, the numbers are output at maximum precision with minimum width.
/ADDRESS
/NOADDRESS (default)
- causes the address (hexadecimal) of the IFF entry to be output at the end of the line of text. The address is prefixed by an exclamation mark which will be treated as a comment and ignored by IFROMTEXT.
/BRIEF
/NOBRIEF (default)
- a shortened output file is produced. No coordinates are output. (See the Description Section for further details).
+----------------------------------------------------+ | WARNING | | The output file produced by the /BRIEF qualifier | | is not valid for use with IFROMTEXT. | +----------------------------------------------------+
/CUSTOMER
/NOCUSTOMER (default)
- if /CUSTOMER is specified no MH (Map Header), CC (Cubic Coefficients) or HI (HIstory) entries are written to the text output file. /CUSTOMER is not available for use with the /MH qualifier.
/DECIMAL_PLACES = integer
/NODECIMAL_PLACES (default)
- if /DECIMAL_PLACES is specified all coordinate values output are converted to absolute values using this number of decimal places. The allowed value lies between 0 and 16 to produce sensible double precision values, if required, on output and must be less than the value specified with the /WIDTH qualifier if given.
/FRT = file-spec
- specifies an FRT file which contains an ACD definitions table. Any part of the file specification not supplied is taken from the default LSL$FRT:FRT.FRT.
This qualifier should only be specified if non-standard ACD definitions are required to define attributes in CB entries. (See IFF user guide for a description of standard ACD definitions)
/KEEP (default)
/NOKEEP
- available only with the /PRINT qualifier. /NOKEEP causes deletion of the output file after printing.
/LOG
/NOLOG (default)
- this will result in supplementary messages being sent to SYS$OUTPUT. Supplementary messages are output when files are successfully opened, and a reassuring message output each time a new IFF layer is encountered in the IFF file.
/MH
/NOMH (default)
- if /MH is specified the map header is interpreted as an MCE map header and is output in readable format. /MH is not available for use with the /CUSTOMER qualifier.
/PRINTER
/NOPRINTER (default)
- queues the ITOTEXT output for printing under the name given as the output file-spec.
/QUOTED_TEXT (default)
/NOQUOTED_TEXT
- if /QUOTED_TEXT is specified all text values output are surrounded by quotes. This qualifier is set on by default, and the /NOQUOTED_TEXT qualifier must be used to output the text without them.
/REVISION_LEVEL = integer
- defines the representation of CB, ST and ZS entries in the IFF file. The revision level takes one of three values -1, 0 or 1. The default is revision level -1. The various values operate as follows: -
/WIDTH = integer
/NOWIDTH (default)
- if /WIDTH is specified all coordinate values output are converted to absolute values using this field width. The allowed value lies between 0 and 20, (and must be greater than the number given with the /DECIMAL_PLACES qualifier, if supplied) to produce sensible (double precision) values on output, if required.
-------------------------------------------------------------------------------
ITOTEXT reads an IFF file and outputs a readable text file. Each IFF entry is output with the appropriate two letter entry code followed by the accompanying entry information.
It is envisaged that ITOTEXT will be used for the conversion of data into text form suitable for transfer to external customers. Alternatively ITOTEXT can be used in conjunction with IFROMTEXT to enable non-graphical editing of IFF files. This is done by converting an IFF file into text form using ITOTEXT, editing the text file, and creating a new IFF file from the edited text file using IFROMTEXT.
It is recommended that the user reads the "IFF User Guide" before attempting to edit the text file produced by ITOTEXT. In particular the user should be familiar with the section describing the structure of an IFF file.
---------------------------------------------------------------------
If a HI entry is present in the IFF file a full text expansion is made of every record used in the HI entry. (For a description of the effect of the /CUSTOMER qualifier see below). The following is an example of a HI entry text expansion:
HI 27-MAR-1987 14:13 TIM ISTART Create 00:00:10 00:00:00 00000001 27-MAR-1987 14:23 TIM IPATCH Modify 00:00:10 00:00:00 00000001
It is not possible to reformat an HI entry text expansion back into an IFF file using IFROMTEXT. It is considered that the HI entry should only be updated by IFF utility programs, thus preventing the falsification of HI entry records by the user.
---------------------------------------------------------------------
ITOTEXT will display the contents of a type 2 MH entry as longword integers. Those fields which contain real numbers are not interpreted as floating point values.
An example of a type 2 MH entry, when converted to text is given below:
MH 174 2
0 436500 122000 1250 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 436500 122000 0 0
50 1250 6500 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 4260880 4260880
4260880 4260880 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 4260880 4260880
4260880 4260880 4260880 4260880 0 0
0 0 0 9439170 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
If the IFF MH entry is a type 3 or 4 OS Map Header, then it is displayed as an ASCII block in lines of 80 characters. Type 3 and 4 OS Map Headers are only intended for use by Ordnance Survey (Great Britain).
Here is an example of a type 3 OS Map Header when converted to text as an ASCII block.
MH 0 3
-1 0 436500 122000 50 1250 0 6500 -20 1
9 86 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0
0 0
---------------------------------------------------------------------
Two text representations of a version 2 MD (Map Descriptor) entry are produced by the ITOTEXT program. The first is unformatted and is included if ITOTEXT is used for outputting the IFF file for subsequent retranslation with IFROMTEXT, eg.:
MD 2 17352 0 17224
0 17786 0 0 0 0
0 0 0 0 0 0
etc.
The second formatted version 2 MD is preceded by a '!' and is thus ignored by IFROMTEXT, eg.:
!MD LO 0.000000000000000 0.000000000000000 ! SC 0.000000000000000 ! PR 0 ! UN 0 ! SP 0
A version 1 map descriptor is written only once, and will be automatically recognised by IFROMTEXT. IFROMTEXT considers a version 1 map descriptor to be one where an alphabetic character follows the MD rather than the numeric values of the unformatted version 2, eg.:
MD MA -1 0.0 0.0 0.0 0.0 GR 0 0.0 0.0 0.0 0.0 SC 0.0 PS 0 0 AG 0 0.0 0.0 0.0 0.0
---------------------------------------------------------------------
Although by default ITOTEXT will translate the entire contents of the IFF file into a textual representation, the treatment of specific entries will vary depending upon the selection of the /CUSTOMER and /MH qualifiers.
Display of the following entries will be suppressed if the /CUSTOMER qualifier is specified:
Alternatively, display of the MH entry only will be suppressed if the /NOMH qualifier is specified.
---------------------------------------------------------------------
Some user applications require only a list of the entries present within an IFF file without a need for detailed listings of the contents of each entry.
The /BRIEF qualifier enables ITOTEXT to produce such summary output. Such output will not of course be suitable for reconversion into an IFF file using IFROMTEXT.
The following example file shows the result of specifying the /BRIEF qualifier:
! IFF file in brief - not valid for use with IFROMTEXT RA -0.729576 400.1828 -0.156608 401.0827 MH MD NS CC CP NO 1 0 NF 1 1 TH 30 FS 5 0 0 0 AC 3 170.0 ST 124 0 ST 116 1 EF EO EM EJ
---------------------------------------------------------------------
Some applications, in particular the Laser-Scan Gothic platform, require all coordinates to be full or absolute values, created using the origin offset stored in the MD Map Descriptor IFF entry.
The /ABSOLUTE qualifier enables ITOTEXT to produce these absolute coordinate values for all entries, in particular the RA Range, the CP Corner Point and all coordinate entries (ST, ZS and CB). In addition, the use of /ABSOLUTE allows the user to specify the output format for these double precision numbers, with the /WIDTH qualifier (with values between 0 and 20), specifying the overall size of the numbers, and the /DECIMAL_PLACES qualifier (with values between 0 and 16, and less than the /WIDTH size), specifying the number of decimal places to use for the numbers.
In the absence of these two format qualifier extensions for the /ABSOLUTE option, all double precision numbers are output with maximum precision in minimum width.
The qualifiers /WIDTH and /DECIMAL_PLACES are allowed with or without the /ABSOLUTE qualifier.
---------------------------------------------------------------------
ITOTEXT produces text output for SH, JP and JB entries. These are not recoverable with IFROMTEXT. If junction structure is required in the IFF file produced by IFROMTEXT, the file should be processed using the ILINK utility (available as part of the STRUCTURE package).
A full text expansion is made of a sector header entry which is from necessity, a complex entry. It contains information defining the position and size of the sectors into which the data are divided. The approach used by ITOTEXT for the display of SH entries differs from that used with other entries in the IFF file. The SH entry refers to address information stored in the forepart of the IFF file. The forepart lies before the first user data block within the file (ie. before the RA (RAnge) entry. This area of an IFF file is not normally accessible to the user. When dealing with an SH entry, ITOTEXT not only displays the actual contents of the entry but also the address information contained in the forepart of the file.
---------------------------------------------------------------------
The text file produced by ITOTEXT may be edited using a text editor, for example VMS EDIT or TPU. This enables the user to change the content of an IFF file without reference to a graphics screen. Non-graphic changes to the content of an IFF file may also be made using IPATCH. IPATCH, however, works in-situ on the binary form of the IFF file, not a textual representation of it. IFF files are sequential. This means that no material which would overflow the space occupied by an existing entry may be inserted into the IFF file using IPATCH. The text files produced by ITOTEXT are not sequential. The file may be altered in any way, including extension of existing entries. This makes the combination of ITOTEXT-EDIT-IFROMTEXT a very powerful mechanism for the generation of test data or the rapid addition or alteration of the non-graphic components of IFF data, eg. text in AC, (Ancillary Code), TC (Transmitted Comment), or TX (TeXt) entries, without using valuable time on a graphic work station.
---------------------------------------------------------------------
The following example illustrates ITOTEXT output. The /ADDRESS qualifier is used to produce the hexadecimal addresses (in words from the beginning of the IFF file) separated from the text by "!" comment delimiters.
RA -0.534355 2.87809 14.83076 20.61997 ! 00000001
MH 0 0 ! 0000000A
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
MD MA -1 0.0 0.0 0.0 0.0 ! 0000016A
GR 0 0.0 0.0 0.0 0.0
SC 0.0
PS 0 0
AG 0 0.0 0.0 0.0 0.0
NS Digitised by Thomas using LAJ Version 3.7 on 14-Oct-1986 ! 0000018A
CC .00000000E 000 .00000000E 000 ! 0000018B
.10000000E 001 .00000000E 000
.00000000E 000 .10000000E 001
.00000000E 000 .00000000E 000
.00000000E 000 .00000000E 000
.00000000E 000 .00000000E 000
.00000000E 000 .00000000E 000
.00000000E 000 .00000000E 000
.00000000E 000 .00000000E 000
.00000000E 000 .00000000E 000
CP 0.0 400.0 0.0 400.0 ! 000001B4
0.0 0.0 0.0 0.0
400.0 0.0 400.0 0.0
400.0 400.0 400.0 400.0
NO 1 0 ! 000001D5
NF 1 1 ! 000001DA
TH 30 ! 000001DD
FS 5 0 0 0 ! 000001DF
AC 3 170.0 ! 000001E4
ST 4 0 ! 000001E8
-0.534355 14.83076
0.850608 16.83937
2.229042 18.84541
2.87809 20.61997
EF ! 0001012A
EO ! 0001012B
EM ! 0001012C
EJ ! 0001012D
The same file output with /REVISION_LEVEL = 1 would result in the ST being converted to a CB and output as follows.
CB FL 0
GT 1
NR 4
NC 2
NA 0
HC 91 92
DA -0.534355 14.83076
0.850608 16.83937
2.229042 18.84541
2.87809 20.61997
-------------------------------------------------------------------------------
$ ITOTEXT
$ ITOTEXT LOTTEST/LOG/BRIEF/ADDRESS OUTFIL
-------------------------------------------------------------------------------
See itotextmsg.html generated from ITOTEXTMSG.RNO.