-------------------------------------------------------------------------------- MODULE ICUT
-------------------------------------------------------------------------------- REPLACES None, ICUT is a completely new IMP utility.
--------------------------------------------------------------------------------
ICUT takes existing features from an input IFF file and creates a new IFF file containing features generated from the input features. The generated features are subject to constraints of length and number of points per feature. Valid command line switches are:
If more than one criterion for selection is specified then all specified criteria have to match for a feature to be processed. Features not matching the selection criteria are not processed, but simply copied to the output file.
--------------------------------------------------------------------------------
$ ICUT input-file-spec output-file-spec
Command qualifiers Defaults
/AC=(FSN , FC , Z) No ACs are added
/FC=integer[,...] All features selected
/FCP=fcpfilename No file
/[NO]INVISIBLES /NOINVISIBLES
/LAYER=integer[,...] All layers selected
/[NO]LOG /NOLOG
/LENGTH = integer No length restriction
/NEWFC=integer keep input feature codes
/POINTS=integer features contain one point only
/XYONLY height coordinates retained
--------------------------------------------------------------------------------
_From: input-file-spec _To: output-file-spec
--------------------------------------------------------------------------------
input-file-spec
- specifies the IFF file from which selections are to be made. Any part of the file specification which is not supplied will be taken from the default specification 'LSL$IF:IFF.IFF'.
output-file-spec
- specifies the IFF file which is to be created. Any part of the file specification which is not supplied will be taken from the parsed input file specification. Note that a version number must not be specified for the output file. If a file with the specified name already exists, a new file will be created with the version number incremented by one.
/AC=KEYWORD
- Where KEYWORD is one or more of: FC (feature code), FSN (feature serial number) or Z (height).
- Enables the ancillary codes which are to be attached to the output features. By default no ancillary codes are attached to the output features. If qualifier arguments are supplied then only the specified ancillary codes will be attached.
- If /AC=Z is specified, the program checks that the output file is restricted to containing only single point features (/POINTS=1). If the value specified to /POINTS is not 1, then ICUT issues an error message.
/FC=integer[,...]
- Enables selection of all features which have a FC of the specified numbers. Selected features will be processed before corresponding features are written to the output file. Features that are not selected will be copied to the output file. Ranges of FCs may be specified. IFF feature codes must lie in the range 0 to 32767. A maximum of 1024 feature codes may be specified.
/FCP=fcpfilename
- Specifies the file which contains pairs of feature codes (input FC, output FC). The specified output FCs will be generated in the output file if the specified input FCs are detected in the input file. IFF feature codes must lie in the range 0 to 32767. a maximum of 1024 feature code pairs may be specified.
/INVISIBLES
/NOINVISIBLES
- Enables cutting of features at invisible (pen-up) steps on a feature.
/LAYER=integer[,...]
- Enables selection of all features which lie in the layers with the specified values. Selected features will be processed before corresponding features are written to the output file. Features that are not selected will be copies to the output file. Ranges of layers may be specified. IFF layer numbers must lie in the range 1 to 32767. A maximum of 1024 layer numbers may be specified.
/LENGTH = real
- enables dissection of the linear features in the input file to features in the output file which have lengths less than the specified length. If the specified length is smaller than the length of an input feature, then the feature will not be dissected.
- Note that the length of a 2-Dimensional feature is its length along the ground. For a 3-Dimensional line feature, the length is its length in space.
/LOG
/NOLOG
- this will result in supplementary messages being sent to SYS$OUTPUT. Supplementary messages are generated when files are opened or closed, and at important stages of processing.
/NEWFC=integer
- Specifies the global feature code for features to be written to the output file. The specified FC will be used for all selected features from the input file. Input features which are not selected will retain their feature codes. The IFF feature code must lie in the range 0 to 32767.
/POINTS=integer
- Specifies the number of points per feature in the output file. The output features will be created by bisecting the input features at the specified interval. The specified interval must be greater than 0.
/XYONLY
- Enables discarding of height coordinates from the output file.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
ICUT creates a new IFF file containing features cut (dissected) from features from an existing IFF file selected on the basis of attributes specified by qualifiers on the command line. Features may be selected on the basis of:
The characteristics of the output features may be selected on the basis of:
If more than one criterion for selection is specified then all specified criteria have to match for a feature to processed and corresponding point features written to the output file.
In the event of a feature not matching all the selection criteria, the feature will be copied unmodified to the output file.
In the event of no features matching the selection criteria, ICUT issues an error message and deletes the output file.
An IFF HI (HIstory) entry is written to the output file only if the input IFF file contains an HI entry. Similarly, a type 2 MD entry is only written to the output file if the input file contains a type 2 MD entry.
--------------------------------------------------------------------------------
$ ICUT INPUT OUTPUT /POINTS=5ELAPSED: 0 00:00:03.51 CPU: 0:00:00.39 BUFIO: 6 DIRIO: 29 FAULTS: 195 $
In this example, ICUT takes input from the IFF file "INPUT.IFF" and produces the output IFF file "OUTPUT.IFF".
The /POINTS=5 qualifier specifies that the output file will contain features which contain no more than 5 points each.
$ ICUT INPUT OUTPUT /LENGTH=300
In this example, ICUT takes input from the IFF file "INPUT.IFF" and produces the output IFF file "OUTPUT.IFF".
The /LENGTH=300 qualifier specifies that the output file will contain features which are no longer than 500m each.
$ ICUT INPUT OUTPUT /POINTS=5 /LOG
This example shows that when the /LOG qualifier is specified, additional diagnostic messages are output to SYS$OUTPUT.
The command line is parsed and any qualifiers detected are output as informational messages. In this case /LOG and /POINTS have been detected (as expected).
ICUT then opens the IFF files and performs basic checks on the input file. If the input file passes the checks, ICUT shows the highest feature serial number (FSN) it encountered , and proceeds to process the file.
At the end of processing, ICUT shows how many features it wrote to the output file.
$ ICUT INPUT OUTPUT /POINTS=5 /FCP=FRED.PAIR
This is an example of the use of the /FCP qualifier. The file "FRED.PAIR" contains information on which feature codes ICUT will operate on, and their corresponding output feature codes. The /POINTS qualifier specifies that the output features will contain no more than 5 points each.
$ ICUT INPUT OUTPUT /POINTS=5 /AC=(FSN,FC,Z) /LOG
This example shows the use of the /AC qualifier.
As before, ICUT parses the command line. In this case it has detected incompatible qualifiers "/AC=Z" and "/POINTS=5". ICUT assumes that output features which consist of more than 1 point (i.e. a line feature) can have separate heights for each of the points contained in them. These features can not be have an overall height associated with them and ICUT cancels the /AC=Z qualifier.
ICUT then proceeds to open the IFF files and after checking the input IFF file, processes it.
The /AC=FC and /AC=FSN qualifiers cause the FC and FSN attributes of the input features to be attached to the output features as ancillary codes.
--------------------------------------------------------------------------------
The following examples illustrate badly formed command line specification to ICUT. They illustrate the types of error messages that are likely to be encountered when using ICUT. They will cause an error condition to be generated and will cause ICUT to terminate processing.
$ ICUT
Here the CLI routines have detected a premature
termination of the command line and issue a warning message. ICUT then
terminates. The minimum information that is required on the command line for
ICUT to run is the input and output IFF filenames.
This error can also occur while batch processing if the line being
submitted does not contain both the input and output IFF filenames.
$ ICUT NONEXISTENT OUTPUT
In this example, ICUT has failed to detect the presence of
either the /POINTS or the /LENGTH qualifiers. ICUT assumes as a default that
the output file will consist of single point features and sets /POINTS=1. and
displays warning messages.
ICUT then attempts to open the IFF file "NONEXISTENT.IFF" and fails. This
generates and ICUT terminates with an error condition.
$ ICUT INPUT OUTPUT /POINTS=5 /LENGTH=300
Here ICUT has detected incompatible qualifiers /POINTS
and /LENGTH. Since only one of these must be specified, ICUT terminates with
an error condition.
$ ICUT INPUT OUTPUT /POINTS=5 /FCP=FRED.PAIR /NEWFC=300
In this example ICUT has detected incompatible
qualifiers /FCP and /NEWFC.
Since /FCP defines an input file which contains details on the features to
cut, and the feature codes of the resulting output features, /NEWFC is
redundant. ICUT terminates with an error condition since it has no way of
knowing which of the two qualifiers was actually wanted.
--------------------------------------------------------------------------------
These messages give information only, and require no immediate action by the
user (except perhaps to verify that the correct options have been selected).
Generally they will only appear if /LOG has been specified on the command line.
Explanation: ICUT is to delete the specified output IFF file
because an error occurred while processing the input IFF file. The output
IFF file is therefore incomplete and useless.
User action: Determine why the input IFF file is corrupt and attempt
to fix the problem (e.g. using IMEND, IPATCH). Re-run ICUT with corrected IFF
file or use a different input iff file.
Explanation: The specified layer has been found in the input file and
is being processed.
User action: None.
Explanation: An error occurred while processing a line from pair-file.
ICUT is ignoring the offending line and continuing processing.
User action: None.
Explanation: Neither the /POINTS nor the /LENGTH qualifiers were
specified on the command line. ICUT is assuming that the output features will
be restricted to single point features.
User action: None.
Explanation: The /AC=Z was specified, but /POINTS was specified to be
a value other than 1. ICUT assumes that the /AC=Z qualifier is incorrect and
sets it accordingly.
User action: None.
Explanation: This is a diagnostic message and is output when the
input IFF file has been checked for consistency.
User action: None.
Explanation: This message is diagnostic and is output at the end of
processing.
User action: None.
Explanation: This message is diagnostic and confirms that ICUT has
correctly analysed the command line arguments.
User action: None.
Explanation: This indicates that ICUT is unable to process the
specified entry as it has not been implemented in the current version of the
software.
User action: None.
These messages indicate that an error has occurred from which processing
is continued. These are accompanied by messages which indicate how the program
is dealing with the error. Processing will continue until normal completion or
a severe error is detected (see next section). No user action is required
until the termination of the program.
Explanation: The comma which separates the integer pairs in the pair
file was not found.
Explanation: a comma was found as the first entry of a line in the
pair file, or a comma was found but no integer.
Explanation: Self-explanatory
Explanation: neither the /POINTS or /LENGTH qualifiers were specified
on the command line.
Explanation: while processing a feature, ICUT has found an entry
which it did not expect.
These messages indicate an error in processing which has caused the
program to terminate. The most likely causes are a corrupt or otherwise invalid
input IFF file, or an error related to command line processing and file
manipulation. With the exception of the IFF file closure errors, no output file
will be produced if one of these error messages is output.
Explanation: The specified file cannot be closed. This message will
be accompanied by another giving the reason for the failure.
User action: The accompanying message should indicate the cause of the
error. If the problem continues, notify the system manager.
Explanation: The specified file cannot be closed. This message will
be accompanied by another giving the reason for the failure.
User action: The accompanying message should indicate the cause of the
error. If the problem continues, notify the system manager.
Explanation: The specified file cannot be opened. This message will
be accompanied by another giving the reason for the failure.
User action: The accompanying message should indicate the cause of the
error. If the problem continues, notify the system manager.
Explanation: IFF feature codes lie in the range 0 to 32767.
User action: Respecify the ICUT command line and ensure that the
arguments for the /FC and /NEWFC qualifier are in the range 0 to 32767.
Explanation: The smallest number of points in an IFF feature is 1.
User action: Respecify the ICUT command line and ensure that the value
for the /POINTS qualifier is greater than 1.
Explanation: Self-explanatory.
User action: Respecify the ICUT command line and ensure that the value
for the /LENGTH qualifier is valid.
Explanation: IFF layer numbers lie in the range 0 to 32767.
User action: Respecify the ICUT command line and ensure that the
arguments for the /LAYER qualifier lies within the specified range.
Explanation: The input IFF file terminated before an IFF EJ
entry was encountered.
User action: Use IPATCH to determine whether the file has an EJ entry.
If the file lacks an EJ entry use IMEND to correctly terminate the file.
Try re-running the IMP utility which failed. If the problem persists then the
internal structure of the IFF file is probably corrupt. Try reading it into
LITES2 and then EXIT from LITES2. Re-run the IMP utility.
Explanation: An error has occurred while reading a non IFF file.
User action: Check the any non-IFF files specified on the command
line. Check that the specified pair file contains only text entries and it is
free from control characters. If the problem persists, the pair file is
probably corrupted and must be repaired or re-written before re-running the
IMP utility.
The following errors indicate that the structure of the input IFF file
is corrupt. Use IPATCH to determine where the problem is and IMEND to attempt
to fix the problem.
In addition to the above messages which are generated by ICUT 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.
\POINTS\
ELAPSED: 0 00:00:00.64 CPU: 0:00:00.03 BUFIO: 2 DIRIO: 0 FAULTS: 107
\FCP\
ELAPSED: 0 00:00:00.86 CPU: 0:00:00.03 BUFIO: 2 DIRIO: 0 FAULTS: 106
MESSAGES (INFORMATIONAL)
--------------------------------------------------------------------------------
DELETE, deleting output file 'file-spec'
LAYER, layer 'integer' found
LINESKIP, skipping over line
SETPTS, defaulting to /POINTS=1
CANAZ, cancelling /AC=Z
HIGHINFSN, highest FSN from input IFF file is 'integer'
OUTFFT, 'integer' features were written to the output IFF file
CMDQUAL, the following command qualifiers were detected on the
command line:
UNIMPLE, Processing of entry code 'string' not implemented in
this version'
MESSAGES (WARNING)
--------------------------------------------------------------------------------
WARNNOCMA, expected comma not found
WARNNOINT, expected integer not found
UNEXPEOL, unexpected end of line
WARNINSUFSWITCH, neither /POINTS or /LENGTH specified
UNEXPENTRY, unexpected entry found
MESSAGES (ERROR)
--------------------------------------------------------------------------------
ERRCLINFL, error closing input IFF file 'file-spec'
ERRCLOUTFL, error closing output IFF file 'file-spec'
ERROPN, error opening input file 'file-spec'
INVALFC, invalid /FC or /NEWFC argument - "'integer'" is outside
range 0 to
32767
INVLAPT, invalid /POINTS argument -"'integer'" is less than 1
INVALLEN, invalid /LENGTH argument - "'number'" is too small
INVALLAY, invalid /LAYER argument - "'integer'" is outside range 0 to
32767
UNEXPEOF, unexpected end of IFF file
UNEXPERR, unexpected error while reading from a file
MESSAGES (OTHER)