LITES2 is an interactive graphical editing program which has been designed to be particularly suitable for work with cartographic type data, but can also be used on other types of feature-orientated data. It has facilities for reading, drawing, amending, creating, and deleting features.
It is assumed that the user is already familiar with general use of the VAX/VMS operating system (see the DEC VAX/VMS manuals), and with the principles of digital cartography. This manual is supplementary to the "LITES2 User's Guide", which should be read before any use is made of LITES2, and before referring to this document.
This manual describes the full LITES2 command language, including some commands which are included for compatibility with future enhancements. The presence or absence of any facility from this manual does not imply any future commitment by LSL. See the current version of the LITES2 SPS (Software Product Specification) for a description of currently supported facilities.
LITES2 is a reimplementation of the previous LSL cartographic editor LITES1, (variously referred to as LITES, MADES, IGES, or SOLADI). The reimplementation has achieved the following major advances over LITES1.
For further details of the VAX computer series, see the DEC documents 'VAX Technical Summary', and the 'VAX Handbooks' (which describe the Architecture, Hardware, and Software of the machine).
For further details of VAX/VMS, see 'VAX Software handbook', published by DEC. Other manuals of direct relevance to the user of this manual are 'Introduction to VAX/VMS', and 'VAX/VMS Command Language Reference Manual'.
Refer to the LITES2 SPS (Software Product Specification) for currently supported VMS versions and hardware and software prerequisites.
For graphic interaction it requires an LSL-supported GKS workstation configuration. This can include either one or two graphics screens (referred to as primary and secondary displays). Refer to the LITES2 SPS (Software Product Specification) for currently supported workstation types.
The refresh capability of the graphical display serves to provide a positional marker or cursor on the screen, to highlight features selected on the screen and to provide temporary display within graphical constructions.
Each IFF file contains a single MAP. Data within a map may be grouped into LAYERS (sometimes known as OVERLAYS). The basic elements of map data are called FEATURES. The editor deals with twelve different categories or graphical types of feature. See the FRTLIB Reference Manual for details of treatment of graphical types. The list is:
1 line string
2 clockwise arc
3 anticlockwise arc
4 three point arc
5 full circle
6 curve
7 unoriented symbol
8 oriented symbol
9 scaled symbol
10 text string
11 symbol string
12 fill area
Logical name LSL$LITES2LOCK must be set to the full file specification of a file containing the LITES2 licence.
Logical name LSL$LITES2WORK must be set to a directory in which LITES2 is to put workspace and dump files. If a LITES2 session is terminated abnormally (e.g. by computer failure, or CTRL/Y) then the workspace file will be left in this directory, so the directory should be checked periodically, and old versions of files deleted.
Logical name LSL$LITES2CMD must be set to a directory in which LITES2 expects to find command files (default extension .LCM). The edgematching problem file is written to this directory.
Logical name LSL$LITES2JNL must be set to a directory into which LITES2 writes a journal file of commands given during a session (extension _.LJN). It is advisable either to regularly purge this directory, or to set a version limit on it (using the DCL command SET DIRECTORY/VERSION_LIMIT=n), so that journal files do not build up without limit.
Logical name LSL$LITES2SETUP must be set to a directory in which LITES2 preserves table setup parameters for use in future sessions (extension _.SET). It is often convenient to use the same directory as LSL$LITES2JNL for this.
If the logical name LSL$LITES2TERMINAL is set to a string, then this string is used as the terminal name when naming device dependent files. If LSL$LITES2TERMINAL is not assigned then the logical translation of SYS$COMMAND is used as the terminal name.
If the logical name LSL$LITES2ROUTINES is set to the full file
specification of a shareable image containing the LITES2 user routines,
then the LITES2 command USER will execute the code in this image.
Similarly the logical names LSL$LITES2ROUTINES_n (where n is an
integer in the ranges 1 - 5 or 101 - 105) supply the images to be
executed with the corresponding ROUTINE command.
See the chapter on user routines for details of how to create your own
user routines. If these files are not present, then the corresponding
LITES2 commands will not be available.
Logical name LSL$IF must be set to a directory in which LITES2 expects to find IFF files (input and output map data).
Logical name LSL$FRT must be set to a directory in which LITES2 expects to find FRT, SRI, and TRI files (feature representation files).
Logical name LSL$DTI must be set to a directory in which LITES2 expects to find DTI image files.
Logical name LSL$LSI must be set to a directory in which LITES2 expects to find LSI image files.
Logical name LSL$LSR must be set to a directory in which LITES2 expects to find LSR image files.
Logical name LSL$HELP must point to the directory containing the LITES2 help library, LITES2.HLB. This may be used outside LITES2 by typing e.g. $ HELP_/LIBRARY=LSL$HELP_:LITES2.
If the logical name LSL$LITES2INI is set to a file specification, then the contents of this file will be read as a series of LITES2 commands, when the program is first invoked (see section 4.3 below).
By default the maximum number of user macros that may be declared is 600. This value may be altered by defining the logical name LSL$LITES2_MACROMAX to be the appropriate number.
By default the maximum number of menu squares and puck buttons that may be declared is 500. This value may be altered by defining the logical name LSL$LITES2_MENUSQUAREMAX to be the appropriate number.
By default the maximum number of user variables that may be declared is 1000. This value may be altered by defining the logical name LSL$LITES2_VARIABLEMAX to be the appropriate number.
As in other Laser-Scan programs which are able to fill areas, the maximum number of points allowed in a solid filled area may be controlled by defining the logical name LSL$FILL_POINTSMAX to be the required number. The default value is 8192 points, with the minimum allowed being 100. Exceeding the limit for number of points will result in fill areas being drawn incorrectly or being drawn as an outline. When drawing raster images, LITES2 uses the same logical name to control the maximum number of pixels that can be drawn across an image, so the message "Buffer too small to draw DTI/LSR - zoom in or increase LSL$FILL_POINTSMAX" can be avoided in a future run of LITES2 by increasing the value of this logical name. Similarly the maximum number of times which a scan line may cross the boundary of an area may be controlled by defining the logical name LSL$FILL_CUTSMAX to be the required number. The default value is 100 intersections, with the minimum allowed being 10. Exceeding the limit for intersections will result in messages 'FILL_SIDE - Too many intersections found - ignored'. Memory has to be allocated in proportion to these numbers, so unnecessarily large values should be avoided.
If the logical name LSL$IFF_OUTPUT_REVISION is set to the value 1, then the IFF files that LITES2 outputs will contain CB entries and edits made to point attributes will be retained. If, however, LSL$IFF_OUTPUT_REVISION is set to the value 0, or is not set up at all, the IFF files that LITES2 outputs will contain ST (and ZS entries). The commands which add other attributes will still appear to work, but the attributes will not appear in the file.
The logical names LSL$TEXT_ROUTINE and/or LSL$SYMBOL_ROUTINE may be set to point to shared images that can be used to draw texts and symbols differently from the standard FRT routines used by LITES2. More details of this facility is available in the chapter on alternative text and symbol drawing routines.
The logical name LSL$LITES2_GET_SHEET_ROUTINES may be set to point to a shared image which can be used to supply a user defined map indexing system. This image is then called when the system variable $MAP_SHEET is accessed. This substituted routine may be passed either the absolute position of the cursor or its geographical position. Example source files that contain instructions to build this image are supplied in LSL$PUBLIC_ROOT:[LITES2.ROUTINES.EXAMPLES] and are called GET_SHEET_GEOG_EXAMPLE.FOR and GET_SHEET_GRID_EXAMPLE.FOR.
If this logical name is not set up, the variable $MAP_SHEET will use the sheet naming convention specified for the Ordnance Survey of Great Britain.
If the logical name LSL$OS_MH_TABLE points to a file name, this file will be opened and read as a translation table to locate the update flags in OS map headers type 3 and 4 for use with the OPERATION OS_MH_FLAGS command. If this logical name is not set up prior to invoking LITES2, it will not be possible to read IFF files with these type of map headers if an OPERATION OS_MH_FLAGS command has been given, or it will not be possible to give an OPERATION OS_MH_FLAGS command after reading IFF files that have these type of map headers. See the CONVERT package documentation for details of this table and the logical name.
The logical name LSL$LITES2_TERMINATOR_MASK may be used
to control which
characters will be taken as line terminators when typed at
the terminal. It should be defined as a comma-separated list
of ASCII codes and ranges of codes (use quotes if the list
contains commas, otherwise a search-list will result). For
example
_$ DEFINE LSL$LITES2_TERMINATOR_MASK "13,26,128-159"
would cause carriage-return (13), Ctrl-Z (26), and also the upper
control characters (128-159) to terminate lines.
If the logical name is not defined, then it is left to the
VMS terminal driver to decide which characters are terminators.
This is affected by the command
_$ SET TERM/LINE_EDITING
The purpose of this is to allow characters which would by default have terminated the line to be input as characters, for example into text strings or AC entries. Note that even if they are set not to terminate the line, most control characters will not echo as anything sensible at the terminal.
Certain functions in LITES2 are supplied as shared images, which are only mapped when they are first accessed. This keeps the LITES2 image smaller, and thus more efficient, for those users who do not require the extra functionality that these shared images supply. These shared images are pointed to by the following logical names:
At some sites, the system manager will have included LITES2 as part of a captive command procedure so that the user will not have to give the actual command to start up LITES2. However, if you are presented with the "$" (dollar) prompt, then you can start up the program by typing
LITES2
The program will announce itself as
LITES2 ([version]) V[n] of [hh:mm:ss dd-mmm-yy]",
where [version] is the name of the hardware specific version of LITES2 in user, [n] is the version number, and [hh:mm:ss dd-mmm-yy] is the time and date of linking of this release. This is followed by a message indicating the licensed users of this version.
There will then be a pause while first stage initialisation is carried out, and normally an initialisation command file containing options and menu definitions will be read. You will then be presented with a prompt from LITES2, which is an asterisk by default, but may have been changed in the initialisation command file eg
*
and commands to the program may be given (eg HELP).
There is underlying structure to editing operations, which often need to be performed in a certain sequence or in the correct context. This structure is reflected in the fact that LITES2 is always in one or other of a small number of command states. Within each state, a given range of commands is valid and certain commands or operator actions are used to move between states. The main command states and their transitions are shown diagramatically in the figure below.
On starting up, the editor is in INITIAL state in which options and attribute files can be specified, and which continues until the commands have been given which specify the map file(s) to be edited. The map is then read-in to the workspace file, and optionally drawn. The editor then enters READY state. It is possible to return to INITIAL state by using EXIT, DUMP, or QUIT commands when DISABLE EXIT is in operation.
The majority of commands are available in READY state, which is the principal operating level of the editor. LINE state is entered when a linear feature is identified using the FIND command. TEXT state and SYMBOL state are the equivalents for text features and symbols.
EDIT state and MODIFY state are both entered as the result of editing operations which require an END command to terminate. ON state is entered by commands which require the cursor to be constrained on a linear feature. CONSTRUCT state is entered during construction of linear features.
WINDOW state is entered by a WINDOW command to allow specification of an area of the map to be enlarged onto the graphics screen, or by a REGION WINDOW command for constructing a rectangular region. MACRO state is entered while defining macro commands. AC state is entered to allow editing of ancillary coding (AC/TC/CH entries). SETUP state is entered while digitising map corners on a raster image on the screen. PAINT state is entered while editing a raster image using the IMAGE PAINT command.
The current program state is displayed by the command SHOW STATE. It is also displayed in the status line (ENABLE STATUS), and is used as a prompt if PROMPT STATE is in action. System variable $STATE is set to the current state.
The possible program states are: INITIAL - Awaiting specification of input maps (IFF files) READY - Ready for an editing command, no operations in progress LINE - Line type feature found CIRCLE - Circle arc feature found TEXT - Text feature found SYMBOL - Symbol feature found EDIT - Edit operation on line type feature in progress MODIFY - Modification of text or symbol feature in progress ON - Constrained on line feature during part edit operation WINDOW - Defining a window for drawing CONSTRUCT - Constructing a line type feature, or a BRIDGE AC - Editing ancillary codes of a feature or attribute set DEBUG - Not used RECOVER - Deleted (or 'limbo') feature found SETUP - Setting up corners of IFF files on a raster image PAINT - Editing a raster image using the IMAGE PAINT command MACRO - Defining a macro
INIT state
|
(IFF/READ commands)
|
V
READY state
|
+------------------+---+------------+----------+--------+
| | | | |
| | | | |
(FIND text/symbol) (FIND line) (construct line) | (WINDOW command)
| | | | |
V V V | V
TEXT or SYMBOL LINE state CONSTRUCT state | WINDOW state
states / | |
| / | |
| / | |
| / | |
| / | |
(editing command) (constraining) (MACRO command)
| | |
| | |
V V V
EDIT or MODIFY state ON state MACRO state
Next, LITES2 obtains the device name from the translation of LSL$LITES2TERMINAL if it exists, or else from SYS$COMMAND. This will normally be the user's login terminal e.g. TTA0. This is used to gain access to several files specific to this terminal. The command @terminal is implicitly obeyed, so that if, for instance, the user is on TTA0, the file LSL$LITES2CMD:TTA0.LCM will be obeyed if it exists. This mechanism is normally used to configure LITES2 for the particular hardware available on each terminal line, or to set up menus and pucks.
Finally LITES2 obeys any commands given on the DCL command line, and is then ready for interactive input. If LITES2 is to be run non-interactively, then the commands for the complete session should be contained in the initialisation files or command line. (These may of course invoke other command files.)
Certain LITES2 commands ("privileged commands") are only valid if encountered in initialisation files, so that a degree of control may be exercised over the use of these by ordinary users.
While reading initialisation files, the "Now in state..." messages are suppressed independently of the setting of ENABLE NOW, so that the defining of menus or pucks or other macros does not cause an excess of messages to be output.
Check that the file is complete. If the file is LOCKED, then use the DCL command UNLOCK on it. If part (or all) of the file appears to be missing, and the number of blocks used is less than the number of blocks allocated (as shown by the DCL command DIRECTORY), then use the DCL command SET FILE/END_OF_FILE, and then edit to remove any garbage at the end. If necessary, edit the file. If for instance the session was lost due to the operator accidentally typing QUIT, then the QUIT command must be removed, otherwise it will be executed again.
It is advisable to RENAME or COPY the journal file to a different
filename, to avoid confusion when LITES2 creates another of the same
name. It is convenient to rename the file into LSL$LITES2CMD: with
extension .LCM, so that the directory and extension need not be
specified when it is used e.g.
$RENAME LSL$LITES2JNL:terminal.LJN LSL$LITES2CMD:CRASH.LCM
where CRASH is a name of your choice.
Define logical name LSL$LITES2REC as the journal file, e.g.
$DEFINE LSL$LITES2REC CRASH (if file is LSL$LITES2CMD:CRASH.LCM)
and run LITES2.
The command in the recovery file will be read instead of any initialisation files. It will be necessary to set up maps on the table if this was done in the original session. After reading the recovery file, provided that it does not contain an EXIT, DUMP, or QUIT command, LITES2 will prompt for interactive input, and editing may be continued.
Finally DEASSIGN logical name LSL$LITES2REC, so that LITES2 does not use the recovery file for the next session. Delete the recovery file when it is finished with.
While reading a recovery file, LITES2 always continues on error, whether or not ENABLE CONTINUE has been specified.
If using the workspace file for input, then great care should be taken to ensure that data is not lost.
If a digitising table is used, then it will be possible to set up source documents (maps), menus, and a tracking area on it. The digitising puck will normally have more than one button on it, and in this case each button may be programmed to execute a LITES2 command. The lowest numbered button is usually reserved for tracking the screen cursor around the map, or tracking area, and may not be programmed to do anything else. If any other button is pressed while within a map or tracking area, the cursor will be positioned to the appropriate place before the button's own command is obeyed, so it is not compulsory to track the cursor to the correct place first using the lowest numbered button. Some LITES2 commands cause the screen cursor to move to a computed position, for instance CLOSE and LOOP (which create closed loops), and FIND (which moves onto a nearby feature). If the next command after one of these is given from a puck button, then no cursor movement will occur even if within a map or tracking area. This allows, for instance, an END command to be given without spoiling the computed cursor position, or having to move the puck off the map area. Any button (but sometimes not the lowest numbered button) may be used to access a menu box, but a facility exists (PRIORITY PUCK) to cause certain buttons to perform their puck functions even when pressed over a menu.
The same comments as for tables apply to bitpads (tablets), but there are some differences. Source documents may not be set up on bitpads (they are usually too small and inaccurate). Bitpads are always connected locally to the workstation, and can perform some sort of cursor tracking on the screen without the intervention of the computer - this often leads to LITES2 having two screen cursors - its own position and the bitpad position. In these cases, the lowest numbered button on the bitpad puck causes the LITES2 cursor to move to the position of the bitpad cursor. Because of this local tracking, there is not usually any reason to set up a tracking area on a bitpad. The other buttons may be used to access bitpad menu boxes, or be programmed in their own right.
If a screen menu is provided, then it is usually accessed by moving the bitpad cursor to the required box and pressing the lowest numbered button.
The setup of a map, menu, or tracking area may be aborted by pressing CTRL/C at the keyboard (Control and C keys pressed simultaneously), or by pressing the highest numbered button on any puck (provided that the puck has been defined using the PUCK command).
The previous setup values may be used by pressing the penultimate button on any puck (again providing that the puck has been defined).
Some messages are purely informational and are sometimes unsolicited, and sometimes the result of an operator command requesting the information. These are known as 'INFORM' type messages, and may be suppressed if required using the DISABLE INFORM command.
The sort of operator errors which are expected to occur occasionally, such as failing to find a feature, or an invalid command, result in the production of a 'MOAN' type message, which is preceded by '???', and is usually accompanied by an audible warning.
'NASTY' type messages are preceded by '!!!' and should not normally occur. They usually indicate that an internal consistency check has failed, which may lead to catastrophic failure of the program.
The final type of message is 'LEARN' type, which is preceded by '...'. These are only output if ENABLE LEARN is in operation, and are intended to provide extra information while learning to use the program.
The occurrence of a 'MOAN' or 'NASTY' error will result in any macros and command files being abandoned, and LITES2 returning to interactive input, unless ENABLE CONTINUE is used.
When an editing command is given, any found-feature becomes the FEATURE-IN-HAND in order that a second feature can be found if needed for the editing operation. For example, during a complex editing operation such as JOIn, there will be both a feature-in-hand which is the line to join from, and also a found-feature, which is the line to join to.
The current found-feature, and feature-in-hand, if any, are highlighted in refresh mode on the display screen. For linear, arc, curve and symbol string features, the string of line segments linking the data points is highlighted (or a portion of it if the whole cannot be refreshed). For symbol features the whole symbol is highlighted. For text features each character is highlighted, or on some workstations a highlighted box is drawn around the text,
In particular, when linear features are FILTERed, then the whole new feature will be created with no point attributes. (Note that squaring and offsetting does retain point attributes)
When new points are created within features (e.g. with the various PART operations or with the CLIP, INSERT or BRIDGE commands) then the new point created does not inherit any of the attributes of the points adjacent to it. When JOINing two features together, two points are condensed into one; in this case the resulting point inherits the attributes of the point that was found when the JOIN command was given.
A command line consists of zero or more commands, separated by the character " ", followed by an optional comment preceded by the character "_!". The characters " " and "_!" may never be used for any other purpose.
For example: FIND DELETE _! deletes the nearest feature
Commands may be followed by compulsory or optional arguments
eg TOLERANCE FIND 3.0 (argument is compulsory) POSITION 400.0 450.0 (arguments are optional) POSITION (position to centre of screen is assumed)The precise effect of omitting an optional argument is described with each individual command.
In the case of text arguments, exactly what is required is described with the individual commands, but it should be noted that in the case of commands taking an arbitrary text string (eg for insertion in the map data, or as a message), any leading spaces or tab characters are ignored. The text may be enclosed in double quotation marks, within which a repeated quotation mark may be used to include a quotation mark in the text. Quotation marks must be used if leading spaces or tabs are to form part of the text.
A few commands that deal with ancillary codes (ACs) or point attributes take a special form of argument, consisting of a code, (usually referred to as a "type" when referring to ACs), possibly followed by a value.
The code is either an integer which identifies the attribute, or a name
that corresponds to this integer. Laser-Scan has defined some codes and
names that are available to all users, but it is possible for the user
to define his own in addition. This is done in the ACD (attribute code
definition) part of the FRT.
Details of the Laser-Scan standard codes and of how to define further
codes can be found in the "FRT User Guide".
The format of the value part of the argument depends on the data type associated with the attribute code. Each of the Laser-Scan standard attribute codes has a data type associated with it; user defined attribute codes have data types associated with them when they are defined in the FRT.
The possible data types are:-
24
3.414 366 0.123E3
Examples of valid character values are
"abcd" abcd " d"
Examples of valid dates are
2-JAN-1987 31-DEC-1899 -- today's date
Examples of valid times are
02:23:45.76 2:00:00.00 :: just now
The most common use of command files is for LITES2 initialisation, but their use is not restricted to this. A possibly lengthy and rarely used sequence of editing commands may be better stored as a command file than as a macro (see below). A macro could still be set up to invoke the file rather than having the user type @filename.
It is possible to define a macro with the same name as one of the LITES2 primitive commands (or whose abbreviation is the same as that of a primitive command). In these circumstances, the macro will take precedence. If the primitive command is intended, the command name should be preceded by the character "_%" which prevents the command being looked up as a macro.
It is good practice to use the "_%" escape character with primitive commands in macros and command files, so that these will continue to work even if macros with ambiguous names are defined later. (Command decoding will also be slightly faster.)
The parameters are only available within the command file or macro actually called. If this calls another command file or macro, then a new set of parameters will be available within the inner procedure. When the flow of control returns to the outer procedure, then the first set of parameters will be available again.
For example:
* add_text Red House
calls a macro passing two parameters. $P1 = "Red", $P2 = "House",
$PCOUNT = 2, and $PLINE = "Red House" (the parameters do not actually
contain the quotes).
* add_text "Red House"
This time there is only one parameter, $P1 = "Red House". $PLINE does
contain the quotes.
Spaces between the menu name and the box number are optional. The macros for unused boxes or buttons should be left undefined - they will then do nothing. Menu or puck macro commands are normally generated automatically by the interactive interface when the boxes are probed or the buttons pressed, but there is nothing to prevent them being used at the keyboard, or in command files or other macros.
F1 through to F5 cannot be used to give LITES2 commands. Which of the other keys are available depends on the terminal settings using the DCL commands SET TERM/[NO]LINE_EDITING, and SET TERM /APPLICATION_KEYPAD or /NUMERIC_KEYPAD. If the terminal is set to perform line editing, then F6 through F14 and the arrow keys will perform their line editing function and cannot be used to give LITES2 commands. If line editing is disabled, then these keys may be programmed. The keypad numeric keys, and also '.' '-' ',' and Enter may only be programmed if APPLICATION_KEYPAD is set, otherwise they just transmit their own character. The remaining keys (there are 16 of them) may always be programmed. The DCL SET TERM commands may be SPAWNed from LITES2, and some settings (particularly APPLICATION or NUMERIC KEYPAD) may sometimes be set locally on the terminal.
The layout of a VT220 type keyboard is shown below, with the puck button number shown below each key
F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 Help Do F17 F18 F19 F20
x x x x x 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Fin Ins Rem PF1 PF2 PF3 PF4
40 41 42 21 22 23 24
Sel Prv Nxt 7 8 9 -
43 44 45 37 38 39 25
Up 4 5 6 ,
46 34 35 36 26
Left Down Right 1 2 3
48 47 49 31 32 33
0 . Ent
30 28 27
Unless affected by the mechanisms described below, commands are obeyed in order one by one until the end of a command line is reached. A new line is then obtained from the current source (command file or interactively). A macro is treated internally as a single line with multiple commands separated by " ". When the current source is exhausted, execution continues at the command following that which invoked the command file or macro.
One way in which the flow of control can be altered is if a command causes a MOAN or NASTY type error. Unless ENABLE CONTINUE has been used, this causes all currently active command files and macros to be abandoned, and control is returned to interactive. This mechanism (with DISABLE CONTINUE in force) can be used to terminate a repetitive sequence (eg when SEARCH NEXT gives an error because there are no more features), but this method is not recommended since it will fail if there is no interactive input available (as for instance in a batch job).
The next method of altering the flow of control is the JUMP command. This transfers control to a named macro or label. In the case of a JUMP to a macro, any commands following the JUMP at the current level (macro or command file) are abandoned and execution begins at the start of the named macro. This means that is is only sensible for JUMP to occur as the last command in a command file or macro, unless the following command has a label which is the target of a JUMP elsewhere. A label must occur in the same macro or line as the JUMP command which refers to it.
JUMP does not use up a level of macro/command file nesting, and the target of the JUMP can be the current macro. This means that simple repetitive loops can be constructed using macros which repeat until a error occurs. NB DISABLE CONTINUE must be in force, otherwise CTRL/C must be used to break out of the loop.
More versatile than JUMP are JTRUE, JFALSE, THEN, ELSE, and ABORT. The behaviour of these depends on whether the condition flag (see below) is TRUE or FALSE.
JTRUE and JFALSE are the same as JUMP, except that the jump is only made if the conditional flag is TRUE or FALSE respectively. Unlike JUMP, these therefore can usefully be followed by other commands in a command file or macro.
THEN and ELSE are followed by a command (possibly itself a macro or @filename) which is obeyed only if the condition flag is TRUE or FALSE respectively. These do use up a level of command nesting, and also differ from JUMP in that, whether or not the command is obeyed, execution continues at the next command.
The ABORT commands may be used just to terminate execution of procedures. ABORT INPUT terminates all active command files and macros and returns to interactive input, while ABORT ALWAYS (the ALWAYS secondary command is optional) just skips the rest of the current line or macro. ABORT TRUE and ABORT FALSE are the same as ABORT ALWAYS, but depend on the setting of the condition flag. ABORT FILE skips the rest of the current command file, even if called from within a macro invoked by the command file.
The condition flag used by JTRUE, JFALSE, THEN, ELSE, and ABORT is set using the commands TEST, OR, and AND. These compare the value of a LITES2 variable (see below), with an expression (see below).
The RESPOND command will pause execution of a macro or command file and prompt for the user to enter commands interactively. When finished, the CONTINUE command will return control the the command file or macro, alternatively CANCEL RESPOND or CTRL/C may be used to abandon all command files and macros and return to ordinary interactive input.
CHARACTER: Contains a string of characters
INTEGER: Contains an integer value in the range -2147483648 to 2147483647
REAL: Contains a real value value in the range +/- 0.29E-38 to
1.7E38 with a precision of 7 to 8 decimal digits. Real
variables are displayed with 8 significant figures (with
trailing zeros suppressed) but the eighth figure may not be
completely accurate.
DOUBLE: Contains a real value value in the range +/- 0.29E-38 to
1.7E38 with a precision of 15 decimal digits.
Variables may be used in several different ways:
Some variables always exist within LITES2. These have names which begin with the character "_$", and are known as system variables. They contain values such as the current cursor position, or the current point on the found feature, and may not be set by the user. Some system variables have a compulsory argument (or subscript), e.g. $CUTREGION 2, and a few have an optional argument, e.g. $CURSINWIN 0.8. A complete list of available system variables is given below.
User variables must be declared using the DECLARE command before use. They can then be given values using the LET and INQUIRE commands. It is possible to declare array variables by following the name by the number of elements required.
By default the maximum number of user variables that may be declared is 1000. This maximum may be altered by setting the logical name LSL$LITES2_VARIABLEMAX to the required value before LITES2 is started.
The current value of variables can be displayed using the SHOW VARIABLES command, and can be tested using the TEST, AND, and OR commands.
The value of a variable may be substituted into a command by enclosing its name in single quotation marks (provided that ENABLE SUBSTITUTION is set). The trailing quotation mark may usually be omitted, as the variable name is taken to end at the first character which is not alphabetic or an underline. The trailing quote therefore must be present if two variables are to be substituted without any intervening spaces. If present, the trailing quote must immediately follow the variable name. There is no restriction on which parts of a command may use a variable. The substituted value may be a single argument, or (usually for a character variable) several arguments or even the whole command.
Eg. The command: SEARCH FSN 'NUMBER' will search for serial number 3 if NUMBER is an INTEGER variable with value 3. The effect would be identical if NUMBER were a CHARACTER variable containing the string "3", but note that only INTEGER, REAL, and DOUBLE variables can be used for arithmetic and to perform numerical comparisons.
In the case of array variables, another integer variable may be used as the subscript, thus if FSNS was an integer array containing a list of feature serial numbers, and I was an integer variable containing the required subscript, then the command: SEARCH FSN 'FSNS'I'' could be used. Both the trailing quotes are optional. A particular subscript may of course be used explicitly, as in SEARCH FSN 'FSNS4'.
The values of variables are never substituted while a macro is being defined. The presence of ' in any line in a macro will prevent the line being checked for syntax as the macro is defined, since the value of the variable is unknown at this stage.
For CHARACTER variables, an expression consists simply of a string of characters. The string may be completely absent (the empty, or null string), and may optionally be enclosed in double quotation marks. Within double quotes, the character " is represented by "". The trailing quotation mark may always be omitted. The case of letters in character variables matters, so that, for instance a variable containing "A" will not be considered equal to the expression "a".
For INTEGER, REAL, or DOUBLE variables, an expression consists of one or more numbers together with the operators + - * / and _^ (exponentiate), and functions (SIN, COS, TAN, ASIN, ACOS, ATAN, ABS, LN, LOG - see below). Unary minus and functions have highest precedence, followed by _^, then * and /, then + and -. Operators of equal precedence are evaluated from left to right. Parentheses ( and ) may be used to force the order of evaluation. Note that the exponentiation operator may be used to obtain square roots, e.g. 4_^0.5 is 2.
When setting an INTEGER variable using LET or INQUIRE, an attempt is made to evaluate the expression using integer arithmetic. If this fails (due to the presence of a decimal point, an E exponent, or a real valued function), then real arithmetic is used, with the final result being truncated to integer.
When setting a REAL or DOUBLE variable, the expression is always evaluated using real arithmetic.
If an INTEGER variable is compared with a real expression in a TEST, AND, or OR command, then the integer is converted to real before the comparison.
For example (assuming I is an INTEGER variable, and R is a REAL):
LET I=(3+8)/3 + 2/3 sets I to 3 using entirely integer arithmetic LET I=(3+8)/3.+ 2/3 sets I to 4 since decimal point forces real arithmetic LET R=(3+8)/3 + 2/3 sets R to 4.333333 (real arithmetic always used)
INTEGER variable True if low bit is set (value is odd) REAL variable True if not equal to 0.0 DOUBLE variable True if not equal to 0.0 CHARACTER variable True if low bit of first character is setIn particular, this means that for INTEGER variables, 0 is false and -1 is true. These values are used for system variables which take a logical value. For CHARACTER variables, strings beginning with "Y" or "y" are true, while strings beginning with "N" or "n" are false. The null string is false.
$ABSX
DOUBLE Contains absolute X value of cursor position (IFF units). It
is equivalent to $CURSX + $MDOFFSET1
$ABSY
DOUBLE Contains absolute Y value of cursor position (IFF units). It
is equivalent to $CURSY + $MDOFFSET2
$ACCVALUE
CHARACTER Contains the value (as 4 characters) of the current AC of
the feature.
$ACDATATYPE
INTEGER Contains the data type of the current AC of the feature. The data
type is an integer in the range 1 - 5.
1 means interpret the value as an integer 2 means interpret the value as a real number 3 means interpret the value as 4 characters 4 means interpret the value as a date 5 means interpret the value as a time
$ACIVALUE
INTEGER Contains the value (as an integer) of the current AC of the
feature.
$ACNAME
CHARACTER Contains the name allocated to the type of the current AC
(in either the LSL supplied list of types, or in the current FRT)
$ACPRESENT
INTEGER -1 if the found feature has any ACs, TCs or CHs, else 0
$ACRVALUE
REAL Contains the value (as a real) of the current AC of the feature.
$ACSVALUE
CHARACTER Contains the value (as an character string) of the current
AC of the feature. This string is encoded using an
appropriate format, depending on the data type.
$ACTEXT
CHARACTER Contains the text of the current AC (or TC or CH) of the feature.
$ACTEXTLEN
INTEGER Contains the length of the text of the current AC (or TC or CH)
of the feature.
$ACTOTAL
INTEGER Contains the total number of ACs, TCs and CHs associated with
the feature.
$ACTYPE
INTEGER Contains the type of the current AC of the feature.
Note: TCs are considered to be ACs with a type of -1,
and CHs are considered to be ACs with a type of -2.
$ANGLE
REAL Contains the angle (anti-clockwise from horizontal) in degrees
of the current feature. For linear features this is the angle
of the current vector. This variable is not available for circle arcs.
$ANNOTATION_JOURNAL_NAME
CHARACTER Contains the name of the current annotation journal macro.
$ANNOTATION_JOURNAL_STATUS
INTEGER Contains the status of annotation journalling. 0 closed,
1 off, 1 on.
$AREA
DOUBLE Contains the area enclosed by the current feature in square
IFF units. For features that are not closed, the first point is
considered to be joined to the last, by a straight line. For texts and
symbols the area of the bounding box is given.
A positive area indicates that the feature has been digitised in a
clockwise direction, negative areas indicate counter clockwise
digitising. Degenerate features (with two or less vertices) give an area
of 0.0
$ASK_CHAR n Must be followed by an integer in the valid range;
this range is determined by which ASK command has been called.
CHARACTER Contains character value(s) from the last successful
invocation of an ASK command that returned character values.
$ASK_INT n Must be followed by an integer in the valid range;
this range is determined by which ASK command has been called.
INTEGER Contains integer value(s) from the last successful invocation
of an ASK command that returned integer values.
$ASK_REAL n Must be followed by an integer in the valid range;
this range is determined by which ASK command has been called.
REAL Contains real value(s) from the last successful invocation of
an ASK command that returned real values.
$ATTCODE n Must be followed by an integer in the range 1 - $ATTTOTAL.
INTEGER Contains the code (as an integer) of the specified attribute of
the point.
$ATTCVALUE n Must be followed by an integer in the range 1 - $ATTTOTAL.
CHARACTER Contains the value (as 4 characters) of the specified attribute
of the point.
$ATTDATATYPE n Must be followed by an integer in the range 1 - $ATTTOTAL.
INTEGER Contains the data type of the specified attribute of the point.
The data type is an integer in the range 1 - 5.
1 means interpret the value as an integer 2 means interpret the value as a real number 3 means interpret the value as 4 characters 4 means interpret the value as a date 5 means interpret the value as a time
$ATTIVALUE n Must be followed by an integer in the range 1 - $ATTTOTAL.
INTEGER Contains the value (as an integer) of the specified attribute
of the point.
$ATTNAME n Must be followed by an integer in the range 1 - $ATTTOTAL.
CHARACTER Contains the name allocated to the type of the specified
attribute of the point (in either the LSL supplied list of
types, or in the current FRT).
$ATTRVALUE n Must be followed by an integer in the range 1 - $ATTTOTAL.
REAL Contains the value (as a real) of the specified attribute of the
point.
$ATTSVALUE n Must be followed by an integer in the range 1 - $ATTTOTAL.
CHARACTER Contains the value (as a character string) of the specified
attribute of the point. This string is encoded using an
appropriate format, depending on the data type.
$ATTTOTAL
INTEGER Contains the total number of attributes associated with the point.
$BEARING
REAL Contains the bearing (clockwise from grid north) in degrees
of the current feature. For linear features this is the bearing
of the current vector. This variable is not available for circle arcs.
$BOX n Must be followed by an integer in the range 1 - 4.
REAL Contains the coordinates of the limits of the box surrounding
the current feature.
$BOX 1 is the minimum X coordinate (IFF units) $BOX 2 is the maximum X coordinate (IFF units) $BOX 3 is the minimum Y coordinate (IFF units) $BOX 4 is the maximum Y coordinate (IFF units)
$BUTTON
INTEGER Contains the button number of the last puck button used.
$CATEGORY
INTEGER Contains category field for text.
$CLOSED
INTEGER -1 if the found feature is closed, else 0.
$COEFFS n Must be followed by an integer in the range 1 - 6.
REAL Contains the current transformation parameters
$COEFFS 1 is the rotation angle (in degrees) $COEFFS 2 is the scale factor $COEFFS 3 is the X coordinate of the rotation point (IFF units) $COEFFS 4 is the Y coordinate of the rotation point (IFF units) $COEFFS 5 is the translation in the X direction (IFF units) $COEFFS 6 is the translation in the Y direction (IFF units)
$COLOUR
INTEGER Contains the colour (from the FRT) of the current feature.
$CONSTRUCTION_FC
INTEGER Contains the feature code to be used when a feature is
constructed
$CONSTRUCTION_GT
INTEGER Contains the graphical type of the feature code to be used
when a feature is constructed
$CONSTRUCTION_LAYER
INTEGER Contains the number of the layer that constructed features
go in
$CONSTRUCTION_MAP
INTEGER Contains the number of the map that constructed features
go in
$CPxzz n Must be followed by a map number in the range 1 - 100.
x is either X or Y and zz is one of NW, SW, SE or NE.
REAL Contains coordinates of the control points for each map
$CPXNW n is the X coordinate of the NW control point for map n $CPYNW n is the Y coordinate of the NW control point for map n $CPXSW n is the X coordinate of the SW control point for map n $CPYSW n is the Y coordinate of the SW control point for map n $CPXSE n is the X coordinate of the SE control point for map n $CPYSE n is the Y coordinate of the SE control point for map n $CPXNE n is the X coordinate of the NE control point for map n $CPYNE n is the Y coordinate of the NE control point for map n
$CURSINGEOMETRY n Must be followed by the number of a defined
area type geometry.
INTEGER -1 if the cursor is in the specified geometry, +1 if it
is on the boundary, else 0.
$CURSINIMAGE
INTEGER The number of the selected image in which the cursor lies, or
0 if the cursor is not in a selected image.
$CURSINREGION n Must be followed by a valid region number.
INTEGER -1 if the cursor is in the specified region, +1 if it
is on the boundary, else 0.
$CURSINWIN [r]
INTEGER -1 if the cursor is in the current window, else 0.
May be followed by a number in the range 0.0 _-> 1.0, to indicate the
part of the window to be tested. For example, a value of 0.8 indicates
that a window (centred on the centre of the screen) with sides 0.8 that
of the screen will be tested.
$CURSX
REAL Contains X value of cursor position (IFF units)
$CURSY
REAL Contains Y value of cursor position (IFF units)
$CURSZ
REAL Contains Z value of cursor position (IFF units)
Note the cursor may not have a Z value. The variable $CURSZ_EXIST tells
if this variable is valid
$CURSZ_EXIST
INTEGER -1 if the variable $CURSZ contains valid data, else 0
$CUTGEOMETRY n Must be followed by a valid area type geometry number.
INTEGER -1 if the found feature cuts the specified area geometry,
else 0
$CUTREGION n Must be followed by a valid region number.
INTEGER -1 if the found feature cuts the boundary of given REGION,
else 0.
$DATETIME
CHARACTER Contains the current date and time, in VMS format.
$DISPLAY
INTEGER -1 if there is a graphics display in use on the LITES2
workstation, else 0.
$DISPLAYCOLUMNS
INTEGER Contains the number of pixels across the display that has
been selected with the DISPLAY NUMBER command. (Only available on
certain hardware).
$DISPLAYNUMBER
INTEGER Contains the current display number (ie the DISPLAY selected
by the DISPLAY NUMBER command)
$DISPLAYROWS
INTEGER Contains the number of pixels up and down the display that
has been selected with the DISPLAY NUMBER command. (Only available on
certain hardware).
$DISTANCE
REAL Contains the distance in IFF units from the start of the feature
to the current cursor position, measured along the feature.
$ELAPSEDSEC Synonym for $SYSELAPSED
$END
INTEGER -1 if at first or last point of found feature, else 0
$EOF
INTEGER -1 if at end of file has been read with the FILE READ
command, else 0
$EXIT_RANGE n Must be followed by an integer in the range 1 - 4.
DOUBLE Contains the range (in absolute coordinates) of the last map
that was output.
$EXIT_RANGE 1 is the minimum X coordinate (IFF units) $EXIT_RANGE 2 is the maximum X coordinate (IFF units) $EXIT_RANGE 3 is the minimum Y coordinate (IFF units) $EXIT_RANGE 4 is the maximum Y coordinate (IFF units)
$FC
INTEGER Contains the feature code of the found feature.
$FILELINE
CHARACTER Contains the text string read with the latest FILE READ
command.
$FILENAME n Must be followed by a valid file number
CHARACTER Contains the name of the specified file. This will fail
if the specified file is not open.
$FILESELECTED
INTEGER Contains the number of the file selected by the most recent
FILE command that selects files. If no file is selected, then 0 is returned.
$FILESTATUS n Must be followed by a valid file number
INTEGER Contains the status of the specified file
0 - file closed 1 - file opened for read 2 - file opened for write 3 - file opened for append
$FINDTOL
REAL Contains the current find radius. If the find radius is
fixed, then the value represents IFF units, and
can be reset at any time by the commands
UNITS IFF TOLERANCE FIND 'xxxx(where xxxx is a user variable that has been assigned the value in $FINDTOL).
If the find radius is currently being zoomed, then the value represents screen mm, and it can be reset at any time by the command
TOLERANCE FIND 'xxxx
$FIND_COUNT
INTEGER After a FIND command, contains the number of found features
which repeated use of FIND (without moving the cursor) will
cycle round. 0 if the use of FIND would find new features.
See also $FIND_ITEM.
$FIND_ITEM
INTEGER After a FIND command, contains the position of the found
feature in the list of nearby features which repeated use
of FIND (without moving the cursor) would cycle round.
It will be 1 after an initial FIND, and range up to
$FIND_COUNT for subsequent FINDs.
$FIRST
INTEGER -1 if at first point of the found feature, else 0.
$FIXEDFIND
INTEGER -1 if the find radius is currently fixed, and is not altered
when the picture is zoomed, else 0.
$FLY_TRANSFORMATION
INTEGER -1 if displaying on a different projection from the data, else 0
$FOUND
INTEGER -1 if there is a found feature, else 0.
$FRT
CHARACTER Contains the name of the FRT file currently in use.
$FSN
INTEGER Contains the feature serial number of the found feature.
Note that $FSN is not necessarily unique. The only way of
uniquely identifying a feature is to save $IFFADDR (and
$MAP if there is more than one map).
$GEOG_STRING
CHARACTER Contains the latitude and longitude of the current cursor
position, in degrees, minutes and seconds. This variable only exists if
all maps have valid version 2 map descriptors.
$GEOMETRY n Must be followed by a valid geometry number.
INTEGER -1 if the specified geometry exists, else 0
$GEOMETRY_PARTS n Must be followed by a valid geometry number.
INTEGER Contains the number of parts that a geometry consists of.
$GEOMETRY_TYPE n Must be followed by a valid geometry number.
INTEGER Contains the type of the specified geometry
0 - point type geometry 1 - line type geometry 2 - area type geometry
$GROUP
CHARACTER Contains a list of the group names, separated by commas,
that the found feature is in.
$GROUP_FC n Must be followed by an integer.
CHARACTER Contains a list of the group names, separated by commas,
that the specified feature code is in. If the feature code does not
exist in the FRT, an error occurs
$GT
INTEGER Contains the graphical type of the found feature.
$GT_FC n Must be followed by an integer.
INTEGER Contains the graphical type of the specified feature code. If
the feature code does not exist in the FRT, 0 is returned.
$HADSELECT
INTEGER -1 if there is any selection in force, else 0
$HADSELECT_AC
INTEGER -1 if there is any selection by AC in force, else 0
$HADSELECT_CATEGORY
INTEGER -1 if there is any selection by text category in force,
else 0
$HADSELECT_FC
INTEGER -1 if there is any selection by feature code in force,
else 0
$HADSELECT_FLAG
INTEGER -1 if there is any selection by edited, unedited or deleted
in force, else 0
$HADSELECT_FSN
INTEGER -1 if there is any selection by feature serial number in
force, else 0
$HADSELECT_GEOMETRY
INTEGER -1 if there is any selection by geometry in force, else 0
$HADSELECT_LAYER
INTEGER -1 if there is any selection by layer in force, else 0
$HADSELECT_MAP
INTEGER -1 if there is any selection by map in force, else 0
$HADSELECT_PRIORITY
INTEGER -1 if there is any selection by feature code priority in force,
else 0
$HADSELECT_REGION
INTEGER -1 if there is any selection by region in force, else 0
$HADSELECT_STYLE
INTEGER -1 if there is any selection by text style in force, else 0
$HEIGHT
REAL Contains the height of found text feature (mm).
$HWTYPE
CHARACTER Contains the type of hardware this version of LITES2 runs
on.
$IFFADDR
INTEGER Contains the address in the IFF file of the found feature.
This provides a unique reference (within a map) of the feature.
Note that $FSN is not necessarily unique.
$IFF_REVISION n Must be followed by a valid map number.
INTEGER Contains the output revision level (0 or 1) of the specified
input file.
$IMAGEASPECT
REAL Contains the 'aspect' at the cursor position, derived from an
image file in the same way as $IMAGEVALUE. The aspect is the direction
of the normal to the surface, or the direction of maximum 'downhill'
gradient. It is measured in degrees clockwise from North.
$IMAGECOLUMNS n Must be followed by an image number in the range
1 - 8.
INTEGER Contains the number of columns in the specified image.
$IMAGEGRADIENT
REAL Contains the gradient, or slope, at the cursor position,
derived from an image file in the same way as $IMAGEVALUE.
$IMAGENAME n Must be followed by an image number in the range 1 - 8
CHARACTER Contains the name of the specified image
$IMAGEORIGINX n Must be followed by an image number in the range
1 - 8
DOUBLE Contains the X value of the origin for the specified image
$IMAGEORIGINY n Must be followed by an image number in the range
1 - 8
DOUBLE Contains the Y value of the origin for the specified image
$IMAGEPIXSX n Must be followed by an image number in the range 1
- 8
REAL Contains the pixel size in X for the specified image
$IMAGEPIXSY n Must be followed by an image number in the range 1
- 8
REAL Contains the pixel size in Y for the specified image
$IMAGEROWS n Must be followed by an image number in the range 1
- 8.
INTEGER Contains the number of rows in the specified image.
$IMAGEVALUE
INTEGER or REAL Contains the value extracted from the image file
pixel in which the cursor currently lies. An error message is given if
the cursor does not lie within one of the images specified in the most
recent IMAGE SELECT command. In the event of several images overlapping,
the highest numbered image will be used. The image from which the value
is taken need not be currently visible on the screen.
$IMAGE_EXIST n Must be followed by a valid image number.
INTEGER -1 if the specified image exists, else 0.
$IMAGE_RANGE_zzzz n Must be followed by a map number in the range 1 - 100.
zzzz is one of XMIN, XMAX, YMIN, YMAX, ZMIN or ZMAX
DOUBLE Contains the range of each image in absolute units.
$IMAGE_RANGE_XMIN n is the minimum X coordinate in image n $IMAGE_RANGE_XMAX n is the maximum X coordinate in image n $IMAGE_RANGE_YMIN n is the minimum Y coordinate in image n $IMAGE_RANGE_YMAX n is the maximum Y coordinate in image n $IMAGE_RANGE_ZMIN n is the minimum Z coordinate in image n $IMAGE_RANGE_ZMAX n is the maximum Z coordinate in image n
$IMAGE_SETUP
INTEGER -1 if the vector data has been setup to align with the
image(s), else 0
$INGEOMETRY n Must be followed by a valid area type geometry number.
INTEGER -1 if the found feature is entirely inside specified area
geometry, else 0
$INREGION n Must be followed by a valid region number.
INTEGER -1 if the found feature is entirely inside given REGION,
else 0.
$INVISIBLE
INTEGER -1 if the current vector of the found feature is INVISIBLE,
else 0
$LAST
INTEGER -1 if at last point of the found feature, else 0.
$LATITUDE
DOUBLE Contains the latitude of the current cursor position in
decimal degrees. May only be used if all maps have valid version 2
map descriptors.
$LAYER
INTEGER Contains the layer number of the found feature.
$LAYER_EXIST n Must be followed by a valid layer number.
INTEGER -1 if the specified layer exists, else 0.
$LENGTH
REAL Contains the total length of the found feature in IFF units.
$LIMITS n Must be followed by an integer in the range 1 - 4.
REAL Contains the coordinates of the limits of the LITES2 working
area. This is the total range of the maps that were originally
read in, plus 5% all round. Note that the range may have been
altered by subsequent edits.
$LIMITS 1 is the minimum X coordinate (IFF units) $LIMITS 2 is the maximum X coordinate (IFF units) $LIMITS 3 is the minimum Y coordinate (IFF units) $LIMITS 4 is the maximum Y coordinate (IFF units)
$LINE
REAL Contains the length of the current vector of the found feature,
in IFF units. For non-linear features (texts, symbols and
circle arcs) this variable is identical to $LENGTH.
$LOCATION
INTEGER Contains text location field for text.
$LONGITUDE
DOUBLE Contains the longitude of the current cursor position in
decimal degrees. May only be used if all maps have valid version 2 map
descriptors.
$MAP
INTEGER Contains the map number of the found feature.
$MAPNAME n Must be followed by a map number in the range 1 - 100.
CHARACTER Contains the name of the specified source map.
$MAPSTATUS n Must be followed by a valid map number
INTEGER Contains the status of the specified map (IFF file)
0 - not opened yet 1 - opened with READ command (map is read only) 2 - opened with IFF command 3 - opened with INSITU command
$MAPTOTAL
INTEGER Contains the total number of maps read in, excluding any since
removed using the QUIT n command.
$MAP_NUMBER
INTEGER Contains the next map number containing the string
specified by an ASK MAP_NUMBER command
This variable is a synonym for the variable $ASK_INT 1
$MAP_SHEET [n] May be followed by an integer representing the scale of the map sheet whose name is required (eg 1250 or 10560). If this value is not supplied the sheet scale currently being used by LITES2 is used.
CHARACTER Contains the name of the map sheet that covers the current cursor position. By default, the sheet naming convention is that used by the Ordnance Survey of Great Britain. This provides map names for the scales 1/1250, 1/2500, 1/10000, 1/10560, 1/25000. In addition a name will be generated for scales greater than 1/250000.
This default algorithm can be substituted by a user supplied one which can be passed either the absolute position of the cursor or its geographical position. This substitution is achieved by supplying a shared image pointed at by the logical name LSL$LITES2_GET_SHEET_ROUTINES. Example source files that contain instructions to do this are supplied in LSL$PUBLIC_ROOT:[LITES2.ROUTINES.EXAMPLES] and are called GET_SHEET_GEOG_EXAMPLE.FOR and GET_SHEET_GRID_EXAMPLE.FOR.
$MAXFSN n Must be followed by a map number in the range 1 - 100.
INTEGER Contains the maximum FSN number for the specified map
(excluding features specified by any FIDUCIAL command).
$MDOFFSET n Must be followed by an integer in the range 1 - 2.
DOUBLE Contains the coordinate offset for the LITES2 coordinate
system ($MDOFFSET 1 is x value, $MDOFFSET 2 is y value). This value is
to be added to any IFF coordinate, to get the real projection coordinate
of the point.
$MDSCALE
REAL Contains the scale of the LITES2 working area. It is the
scale of the first map that is read into LITES2. The value
comes either from the MD entry in the IFF file, or if that
value is less than or equal to 0.0 or DESCRIPTOR has been
disabled, then from the MH entry.
$MHARR n Must be followed by an integer in the range 1 - $MHLEN
INTEGER Contains the contents of the MH entry, of the first map
that was read into LITES2, as a series of 32 bit integers.
See IFFLIB documentation for the format of the MH entry.
$MHLEN
INTEGER Contains the number of 32 bit integers in $MHARR.
$MMFACTOR
REAL This is the factor to be used to convert from IFF units to
sheet mm.
$MOANED
INTEGER -1 if the last command caused an error, else 0.
$MODTCC
INTEGER Contains the text component code of the current subtext of
the text feature being modified.
$MODTEXT
CHARACTER Contains the text string for the current subtext of the
feature being modified.
For composite texts, this is the current text component (i.e. the
component that the cursor is on)
$MODTEXTLEN
INTEGER Contains the length of the text string of the current
subtext of the feature being modified.
For composite texts, this is the current text component (i.e. the
component that the cursor is on)
$OPTBIG
INTEGER -1 if BIG is currently enabled, else 0.
$OPTBLIN
INTEGER -1 if BLINK is currently enabled, else 0.
$OPTCOMP
INTEGER -1 if COMPOSITE text is currently enabled, else 0.
$OPTCONT
INTEGER -1 if CONTINUE is currently enabled, else 0.
$OPTENDS
INTEGER -1 if ENDS is currently enabled, else 0.
$OPTHEIG
INTEGER -1 if HEIGHT is currently enabled, else 0.
$OPTINFO
INTEGER -1 if INFORM is currently enabled, else 0.
$OPTLEAR
INTEGER -1 if LEARNER is currently enabled, else 0.
$OPTPATT
INTEGER -1 if PATTERN is currently enabled, else 0.
$OPTPSIZE
INTEGER -1 if PSIZE is currently enabled, else 0.
$OPTSUBS
INTEGER -1 if SUBSTITUTE is currently enabled, else 0.
$OPTVERI
INTEGER -1 if VERIFY is currently enabled, else 0.
$OUTGEOMETRY n Must be followed by a valid area type geometry number.
INTEGER -1 if the found feature is entirely outside specified area
geometry, else 0
$OUTREGION n Must be followed by a valid region number.
INTEGER -1 if the found feature is entirely outside given REGION
else 0.
$OVERLAY
INTEGER Contains the overlay number that the current feature will
be drawn in. It is the lowest numbered overlay that the overlay
selections satisfy for this feature; if no overlay satisfies the overlay
selections, overlay number 0 is returned
$OVERLAYNUMBER
INTEGER Contains the current overlay number (ie the OVERLAY selected
by the OVERLAY NUMBER command)
$P n
CHARACTER Contains the value of the n'th parameter supplied to the current
command file or macro, or a null string if none was supplied.
$PATTERN
INTEGER Contains the pattern index for linear features.
$PC
INTEGER Contains the process code of the found feature.
$PCOUNT
INTEGER Contains the number of parameters supplied to the
current command file or macro.
$PI
DOUBLE Contains the value of PI, the ratio of the circumference of
a circle to its diameter.
$PID
CHARACTER Contains the process identification string for the current
process
$PLINE
CHARACTER Contains the entire line of parameters supplied to the current
command file or macro, or a null string if none was supplied.
$POINT
INTEGER -1 if at a point of the found feature, else 0.
$POINTNO
INTEGER Contains the point number of the cursor on the found
feature.
$PRIVPOINT
INTEGER -1 if at a point has an attribute with a value specified
by a previous PRIVILEGE POINT command, else 0.
$PSIZE
INTEGER Contains the point size of found text feature.
$RANDOM [n] May be followed by a integer to be used as a seed
value.
REAL Contains a random number in the range 0.0 - 1.0.
NOTE: subsequent references to $RANDOM will produce different
values. By using the optional integer a repeatable series of random
numbers can be initiated.
$RANGE_PROBLEM
INTEGER Reports problems in calculating the sectored area after
reading an IFF file and transforming it to another projection.
This variable is valid after going from INITIAL to READY state, or when an IFF file has been read in READY state. It remains set until another file is read. It is -1 if a point has been detected outside the sectored area after transformation and 0 if no such point was detected.
$RANGE_zzzz n Must be followed by a map number in the range 1 - 100.
zzzz is one of XMIN, XMAX, YMIN or YMAX
REAL Contains the (original) range for each map.
$RANGE_XMIN n is the minimum X coordinate in map n $RANGE_XMAX n is the maximum X coordinate in map n $RANGE_YMIN n is the minimum Y coordinate in map n $RANGE_YMAX n is the maximum Y coordinate in map n
$REFRESH
INTEGER Contains the number of points that are refreshed when an
object is found.
$REGION n Must be followed by a valid region number.
INTEGER -1 if the specified region exists, else 0.
$REGIONAREA n Must be followed by a valid region number.
DOUBLE Contains the area enclosed by the specified region in
square IFF units.
A positive area indicates that the region runs in a clockwise direction,
negative areas indicate a counter clockwise direction.
$RESPOND
INTEGER -1 if in second level interactive input (ie the RESPOND
command has been given - awaiting a CONTINUE command), else 0.
$SCRFACTOR
REAL This is the factor to be used to convert from IFF units to
screen mm.
$SECONDARY
INTEGER Contains the secondary code (from the FRT) for the current
feature. See FRTLIB documentation, for what this represents
for different types of features.
$SIZE
REAL Contains the size of the currently found symbol.
$SIZE_FC n Must be followed by an integer.
REAL Contains the size entry of the specified feature code
in the current FRT file.
$SRI
CHARACTER Contains the name of the SRI file currently in use.
$STATE
CHARACTER Contains the current program state. (See HELP STATE)
$STYLE
INTEGER Contains the style index for the current text feature.
$SYSBUFIO
INTEGER Contains the number of buffered input/output operations
during this run of LITES2. This includes operations to
terminals on serial lines.
$SYSCPU
REAL Contains the CPU time elapsed in seconds during this run of
LITES2.
$SYSDIRIO
INTEGER Contains the number of direct input/output operations
during this run of LITES2. This includes operations to
disc files (in particular IFF files).
$SYSELAPSED
REAL Contains the time elapsed in seconds during this run of LITES2.
$SYSFAULTS
INTEGER Contains the number of page faults incurred during this
run of LITES2. Useful as a performance tool to check whether
LITES2 would benefit from increased memory or working set size.
$TABLE
INTEGER -1 if there is a digitising table in use on the LITES2
workstation, else 0
$TABLEXY n Must be followed by an integer in the range 1 - 2.
REAL Contains the coordinates of the table cursor after the last
successful invocation of the command ASK TABLE. Until the command ASK
TABLE has been executed successfully, contains the lower left coordinate
of the available LITES2 working area.
$TABLEXY 1 is the X coordinate (IFF units) $TABLEXY 2 is the Y coordinate (IFF units)
This variable is a synonym for the variable $ASK_REAL
$TCC
INTEGER Contains the text component code of the current subtext of
found text feature.
$TEXT
CHARACTER Contains the text string for the current text feature.
For composite texts, this is the text component that
the text was found by.
$TEXTLEN
INTEGER Contains the number of characters in the text string for
the current text feature. For composite texts, this is the text
component that the text was found by.
$TEXTTOTAL
INTEGER Contains the number of subtexts in a composite text feature.
$TOPFC
INTEGER Contains the highest feature code in the FRT table currently
in use.
$TOPGEOMETRY
INTEGER Contains the number of the highest geometry that has been
defined.
$TOPMAP
INTEGER Contains the highest map number currently in use.
$TRI
CHARACTER Contains the name of the TRI file currently in use.
$UIC
CHARACTER Contains the user identification code of the user.
$UNIT_DESC
CHARACTER Contains the descriptive string specified in the last
UNITS FACTOR command.
$UNIT_FACTOR
REAL Contains the number specified in the last UNITS FACTOR command.
$UNIT_TYPE
INTEGER Contains the type of UNITS command currently in force.
0 - none or NORMAL, 1 - IFF, 2 - MMS, 3 - FACTOR.
Contains the number specified in the last UNITS FACTOR command.
$USER
CHARACTER Contains the user name of the user
$VERSION
CHARACTER Contains the LITES2 version number.
$WARP_COEFFS_IMAGE Must be followed by an integer in the range
1 - 8 identifying which coefficient is required.
DOUBLE Contains the coefficients for transforming an image
coordinate to a map coordinate.
$WARP_COEFFS_MAP Must be followed by an integer in the range
1 - 8 identifying which coefficient is required.
DOUBLE Contains the coefficients for transforming a map
coordinate to an image coordinate.
$WARP_DIRTY
INTEGER -1 if the warp points have been altered since WARP FIT
was performed, otherwise 0.
$WARP_FITTED
INTEGER -1 if WARP FIT has been performed, and WARP ON will activate
the fit, otherwise 0.
$WARP_IMAGE_N
INTEGER The number of image control points for warping.
$WARP_IMAGE_X Must be followed by an integer identifying the
control point.
REAL The X coordinate of an image control point.
$WARP_IMAGE_Y Must be followed by an integer identifying the
control point.
REAL The Y coordinate of an image control point.
$WARP_MAP_N
INTEGER The number of map control points for warping.
$WARP_MAP_X Must be followed by an integer identifying the
control point.
REAL The X coordinate of a map control point.
$WARP_MAP_Y Must be followed by an integer identifying the
control point.
REAL The Y coordinate of a map control point.
$WARP_MODE
INTEGER The current warp mode. 0 if warping is off, 1 if warping
the image, 2 if warping the map.
$WARP_RESIDUAL_X Must be followed by an integer identifying the
control point.
REAL The X residual at a warp control point (transformed map
coordinate minus image coordinate).
$WARP_RESIDUAL_Y Must be followed by an integer identifying the
control point.
REAL The Y residual at a warp control point (transformed map
coordinate minus image coordinate).
$WARP_RMS_X
REAL The root mean square X residual at the warp control points
(calculated at the time the warp was fitted).
$WARP_RMS_Y
REAL The root mean square Y residual at the warp control points
(calculated at the time the warp was fitted).
$WARP_TRANSFORM
CHARACTER The name of the current warp transform (LINEAR, HELMERT,
AFFINE, EXTENDED, or PROJECTIVE).
$WIDTH
REAL Contains the line width of the current linear feature.
$WINDOW n Must be followed by an integer in the range 1 - 4.
REAL Contains the coordinates of the limits of the current window.
$WINDOW 1 is the minimum X coordinate (IFF units) $WINDOW 2 is the maximum X coordinate (IFF units) $WINDOW 3 is the minimum Y coordinate (IFF units) $WINDOW 4 is the maximum Y coordinate (IFF units)
$ZOOM
REAL Gives the number of times that the current picture on the
screen is magnified from the full map on the screen.
SIN COS TAN ASIN ACOS ATAN ABS LN LOG
Trigonometric functions deal with angles in degrees, and return a real value.
ABS returns a real or an integer value, depending on the context.
LN and LOG return the natural (base e) and common (base 10) logarithm respectively as a real value.
For example, the command LET R=SIN30 will set variable R to 0.5, while the command LET R=COS('ANGLE'+30) will set R to the cosine of ANGLE+30, assuming that ANGLE is a REAL variable, and that SUBSTITUTION is enabled.