Copyright: John A. Grant, Geological Survey of Canada
Citation: SurView, by John A. Grant, Geological Survey of Canada


Index (Table of Contents)
http://www.nrcan.gc.ca/gsc/	SurView 1.52 by John A. Grant Geological Survey of Canada Open File 2661 Airborne Geophysics Section Mineral Resources Division Geological Survey of Canada 601 Booth St., Room 591 Ottawa, Ontario, K1A 0E8 December 1, 1996
Read Appendix C for information on new features and changes!

______________________________________________________________________________

World Wide Web

Visit the Geological Survey of Canada on the Web at:

http://www.nrcan.gc.ca/gsc/

Visit the Airborne Geophysics Section on the Web at:

http://www.geophys.gsc.nrcan.gc.ca/_airgs/hp_e.htm

______________________________________________________________________________

Table of Contents

0. Foreword

1.  Introduction

2. Installation & Setup

2.1  Requirements

2.2  Installation & De-Installation

2.3  Customization & Tips

2.3.1 Working Directory

2.3.2 Creating an Icon for Each Survey

2.3.3 Command-Line Arguments

2.3.4 Creating an Icon for SurView Help

2.3.5 File Association

2.3.6 Windows Colours

2.3.7 The ENTER key

2.3.8 Calibration for Monitor Size

3. Types of Files

4.  How to Use SurView

4.1  Getting Started - Map View

4.2  Getting Started - Stacked Profile View

5. Drawing Colours and Attributes

6. Zoom/Pan Operation

6.1  Zoom/Pan

6.2  Copy to Windows Clipboard

7. Printing

8. SurView Operation: Map Menu

8.1  File

8.1.1  File Display List

8.1.2  Print Map

  	8.1.2.1 Map Titles

8.1.3  DOS

8.1.4  Exit

8.2  Edit

8.2.1  SLD Survey Line Data Files

8.2.1.1  Colours,Lines,Scales

8.2.1.1.1 Choose Colour

8.2.1.1.2  Drawing Attribute Table A,B,C

8.2.1.2  Filters

8.2.1.3  Symbols

8.2.2  GRX Grid Files

8.2.3  BOB Object & BLC Contour File Attributes

8.2.3.1  Point Attributes

8.2.4  ASX Shape Files

8.2.5  Other

8.2.6  Copy to Clipboard

8.3  View

8.3.1  Zoom

8.3.2  Unzoom

8.3.3  Redraw

8.3.4  Tile Map Windows

8.3.5  Tile Stacked Profiles

8.3.6  Smart (E,N) Cursor

8.3.7  Grid Legend

8.3.8  Legends

8.4  Options

8.4.1  Flight Line Options

8.4.2  Use Alternate Language Where Available

8.4.4  Use palette for non-grid items

8.5  Pick

8.5.1  Right Mouse Button Options

8.5.1.1 AOI Description for Picked Polygon/Polyline/Point

8.5.1.2 Displaying/Editing DBF Records for Picked Features

8.5.1.3 Other Actions for Picked Features

8.5.2  Measure Distance

8.6  Profiles

8.6.1  Choose line by Name

8.6.2  Choose Line with Mouse <<<anytime>>>

8.6.3  Print a Set of Stacked Profiles

8.7  Tools

8.7.1  Compile AOB/ALC/ASY Files to Create BOB/BLC/BSY Files

8.7.2  Compile LXF Files to Create SLD Files

8.7.3  Intersect SLD Flight lines with BOB Polygons

8.7.4  Intersect SLD Flight lines with Map Sheets

8.7.5  Find Grid Values at Point Locations

8.7.7  Import Point Data from .DBF File

8.7.8  Enter Point/Vector Data

8.7.9  View Symbol Names in .BSY Symbol or .BOB File

8.7.10 Import DXF File

8.8  Help

8.8.1  Getting Started

8.8.2  Index (Table of Contents)

8.8.3  Search for Help on...

8.8.4  System Information

8.8.5  About this Program

9. SurView Operation: Stacked Profile Menu

9.1  File

9.1.1  Print Stacked Profiles

9.1.2  Export Stacked Profile Data

9.1.3  DOS

9.1.4  Close

9.2   Edit

9.2.1  Stacked Profile Data

9.2.1.1  Colours,Lines,Scales

9.2.1.2  Filters,Wrap,Clip

9.2.2  Other

9.2.3  Copy to Clipboard

9.3  View

9.3.1  Zoom

9.3.2  Unzoom

9.3.3  Redraw

9.3.4  Return to Map View

9.4  Options

9.4.1  Polygon Background

9.4.2  Measure Distance

9.4.3  Use Point-to-Point Distance for X Axis

9.4.4  Stacked Profile Order

9.4.5  Use Trace Colour for Y Axis Colour

9.5  Help

9.5.1  Getting Started

9.5.2  Index (Table of Contents)

9.5.3  Search for Help on...

9.5.4  System Information

9.5.5  About this Program

Appendices

A. Glossary

B. About SurView

C. Revision History, Bugs, Known Problems

D. SurView File Descriptions and Formats

D.1  Survey Line Data (SLD) File

D.1.1  How to Create an SLD File

D.1.2  SLD File Format

D.2  Line Exchange Format (LXF) File

D.2.1  How to Create an LXF File

D.2.2  LXF File Format

D.3  Binary Object (BOB), Line Contour (BLC) & Symbol (BSY) Files

D.3.1  How to Create a BOB/BLC/BSY File

D.3.2  BOB/BLC/BSY File Format

D.4  ASCII Object (AOB) & Line Contour (ALC) Files

D.4.1  How to Create an AOB/ALC File

D.4.2  AOB/ALC File Format

D.4.3  Pick Id for Point/Line/Polygon: Syntax & Usage

D.5  ASCII Symbol (ASY) File

D.5.1  How to Create an ASY File

D.5.2  ASY File Format

D.6  ASCII Object Information (AOI) File

D.6.1  How to Create an AOI File

D.6.2  AOI File Format

D.7  Database Description Files: ZFILES.DBF & ZLINKS.DBF

D.7.1  How to Create ZFILES.DBF & ZLINKS.DBF

D.7.2  Format of ZFILES.DBF & ZLINKS.DBF

D.8  Grid Specification (GRX) File

D.8.1  How to Create a GRX File

D.8.2  GRX File Format

D.9  Grid/ASX Palette (RGB/CMY) File

D.9.1  How to Create an RGB/CMY File

D.9.2  RGB/CMY File Format

D.10  Grid Data Levels (LVL) File

D.10.1  How to Create an LVL File

D.10.2  LVL File Format

D.11  Arc/Info Shape File (ASX)

D.11.1  How to Create an ASX File

D.11.2  ASX File Format

D.11.3  ASX Theme File Format

D.12  File Display List (FDL) File

D.12.1  How to Create an FDL File

D.12.2  FDL File Format

D.13  Stacked Profile Specifications (STP) File

D.13.1  How to Create an STP File

D.13.2  STP File Format

D.14  Exported Line Data (XLD) File

D.14.1  How to Create an XLD File

D.14.2  XLD File Format

D.15  SurView Configuration File (SURVIEW.CFG)

D.15.1  How to Create a SURVIEW.CFG

D.15.2  SURVIEW.CFG File Format

E. Cartographic Projections

F. Reserved Colour, Symbol and Line Style Names for AOB, ASY & ASX Files


Foreword
0. Foreword

This document has been prepared to be viewed primarily as on-line Windows help, but also as a printed manual.  Therefore it is written in two styles:

1.	the usual manual format (i.e. descriptions, procedures)

2.	"You are now doing ....  You have asked for help, so this is how to proceed" (i.e. on-line help)

The original source document is formatted specially for creating a Windows help file.  It is too much work to maintain one document for the on-line help and another for the printed manual, so I just have the one that I use for the on-line help..  Before printing it, I temporarily removed the 'help' formatting and deleted a few page breaks.  The printed manual has no page numbers, but then there are no page references in the text either.  Conversely, the on-line help has no line borders in the tables, so they look a bit odd (the help compiler ignores table borders).

If you are viewing this document using the Windows on-line help facility, notice that two menu items (<<<Chapters>>> & <<<File Formats>>>) have been added to the standard menu bar to aid in navigating this help file.  These menu items apply only to SurView help.

The 'browse sequence' controlled by the [<<] & [>>] buttons at the top can be used to read the manual in a normal forward or reverse direction: no other sequence is implied.


Introduction to SurView
1. Introduction to SurView

SurView is a Windows program designed to allow the user to view and print a variety of geophysical survey data types.  There are two display types:

Map View:

· flight lines

· profile maps

· line contours

· gridded data, including composite (ternary) images

· additional auxiliary geological & topographical data

Stacked Profile View:

· stacked profiles

SurView...

·	is a simple, yet reasonably complete program: it is NOT an application for producing cartographic quality, large format production maps replete with legends, labels, logos and credits.  Furthermore, it is not an image analysis tool. These needs are met by other applications more suited to the specific requirements of the task.

·	allows geophysical data distributed to clients to be immediately and completely accessible for evaluation.  The data files are relatively simple and contain the original processed data sets in their most primitive form (i.e. NOT filtered, interpolated or otherwise converted to display formats).  This fulfills the need to distribute original data as well as provide a viewing package.

·	is a useful tool for providing access to data in the field, allowing personnel to use a portable laptop computer to bring a whole set of survey data to the field.  Coupled with a small  printer, this eliminates the need to bring along a massive amount of paper, i.e. grid maps, contour maps, stacked profiles, flight line maps.

·	is not specific to any particular data set.  The SLD data files are for airborne survey data, however the grid files and line contour files are applicable to most other data sets.

·	uses a generic grid file model which features 4 origin modes, row or column storage, any length header and 7 data types, including byte, integer and floating-point.  This model should be adequate for reading most grid files.

·	uses a general purpose object file design a which allows lines, closed polygons, text and points (symbols) to be displayed.  Specifically, these files are useful for showing drainage and geology quickly, without requiring a the overhead of a large commercial GIS system.

·	can be extended to support other file types, using the File Display List model

SurView Display Types

The initial window is a map view - there can be only one map window per application instance.  The map view displays the flight lines, profile maps, line contour and gridded data. The user can zoom and pan (and print) any portion of the area.  The map window has the following characteristics:

·	if the size of the map view window is changed, the map is rescaled to fit the new window size

·	an aspect ratio of 1:1 (isotropic scale factor) is always maintained, as is appropriate for viewing cartographic data.

From the map view, a flight line may be selected for viewing stacked profile data.  Several flight lines may be selected for viewing: for each flight line selected, a new window is created to display the stacked profile data for that flight line.  If a flight line was flown in more than one segment, all of the segments for that line are shown in the same window.  Each window showing stacked profile data has the following characteristics:

·	the flight line distance scale is different for each window and is recomputed each time the window is resized or the zoom function is used

·	the aspect ratio of the X & Y axes is the same for all variable, but is determined by the aspect ratio of the window

·	all stacked profile windows share the same display attributes:

· background colour

· line colours

· line styles

·	all stacked profile windows share the table of plot/noplot flags and order of data variables plotted

·	each window may be resized & moved independently

Finally, the contents of any window (map or stacked profile) may be printed using the File | Print.. menu selection for the window.


Installation: Requirements
2. Installation and Setup

2.1 Requirements

SurView is a Microsoft Windows 3.1 application.  It requires a minimum of a 80386 PC running Windows 3.1 in either standard or enhanced mode.  Presumably It can therefore use and support all of the display cards and printers supported by Windows 3.1.

A floating-point co-processor is not required, but SurView will run very slowly without it.

It is assumed that the user of SurView is familiar with the operation of:

· Windows 3.1

· the Windows clipboard

· use of mouse & keyboard in Windows

· Windows printer setup & selection

· the use of Ctrl-ESC and alt-TAB Program Manager functions

Consult your Windows manual for further information on these and other general topics.


Installation
2.2 Installation & De-Installation

SurView...

·	does not require any fancy setup

·	does not require any auxiliary files to operate (one .DLL, no *.INI, no configuration file)

·	does not require any special knowledge of directory structure: if Windows can find it, it will run

·	makes minimal changes to Windows files (Windows registry only)

Installation Step 1: SURVIEW.EXE & related files

If SurView resides on a CD-ROM, you do not need to copy SURVIEW.EXE to your hard disk - you can run it directly from the CD-ROM.  But you may copy the files to your hard disk if you wish (perhaps so you can run it without the CD-ROM).

To install SurView, simply copy the SURVIEW.EXE, SURVIEW.HLP and *.RGB/CMY files to any directory you wish, perhaps one of the following names:

c:\surview

c:\system\surview

c:\sys\surview

c:\software\surview

c:\soft.win\surview

c:\winsoft\surview

However, the location or name of the SurView directory is not important.

If you received a self-extracting ZSURVIEW.EXE file, copy it to the directory (as above) and execute it to unpack it. You may then delete ZSURVIEW.EXE. For example:

c:\> md surview	(create a directory)

c:\> cd surview	(go there)

c:\surview> copy a:zsurview.exe .	(retrieve zsurview.exe)

c:\surview> zsurview	(execute to unpack it)

c:\surview> del zsurview.exe	(delete it)

Installation Step 2: CTL3DV2.DLL (not required for Windows '95)

If you are running Windows '95, you can skip this step - CTL3DV2.DLL is not needed for Windows '95.

If you do not already have a CTL3DV2.DLL file in your ...\windows\system directory or if the supplied CTL3DV2.DLL file is newer than the existing file, copy the supplied CTL3DV2.DLL to the ...\windows\system directory.  Failure to do this will cause Windows to abort loading SurView.  The best way to do this copy is with File Manager: if the file already exists, File Manager will display a dialog box showing you the date, time and size of both versions of the file and asking you to confirm the copy.  Cancel the operation if the installed CTL3DV2.DLL file is newer than the version supplied with SurView.

When you run SurView,  if you get a message:

"This application uses CTL3DV2.DLL, which has not been correctly installed"

then ensure that you have only a single copy of CTL3DV2.DLL and that it is installed in your ...\windows\system directory.

Installation Step 3: Creating an Icon

Now start up Windows and choose File | New from Program Manager.  If you want to create a new group in which to install SurView, then choose 'Program Group' first to create the group.  Otherwise, select the group in which you wish to place SurView and choose 'Program Item'.  The fields of the dialog box might look like:

Description:	SurView

Command Line:	c:\software\surview\surview.exe (see also Section 2.3.3)

Working Directory:	(default is ok: see Section 2.3.1)

Shortcut Key:	(not required - read your Windows manual, or use Help)

Once the icon has been inserted into the appropriate group, you may start up SurView simply by double-clicking the icon.

Installation Step 4: File Association

In order to be able to launch SurView automatically by clicking on files from File Manager, you need to set the File Association, so that Windows knows where to find SURVIEW.EXE. SurView adds entries to the Windows registry file for File Association.  This only needs to be done once or if you move SURVIEW.EXE.

Start up SurView.  From the 'system' menu in the extreme upper left corner of SurView (icon in Windows '95), select 'File Association'. In the dialog box, click 'Add' and then 'Ok' to close the dialog box. See Section 2.35 for detailed instructions).

Installation Step 5: Data Files

If SurView has been provided with a set of geophysical data files in SurView format, you should keep those data files in a separate directory from SurView itself, i.e.

c:\surveys\xxx	(for survey area 'xxx')

c:\surveys\yyy	(for survey area 'yyy')

This reinforces the distinction between 'user' data files and 'system' software.  If the files are on CD-ROM, they can remain there or you can copy them to your hard disk.

De-Installation of SurView

1.	Run SurView one last time and select 'File Association' from the [--] system menu in the upper left corner. Click the 'Remove' button to remove the entries from the Windows registry. Note that SurView does not use any entries in the [Extensions] section of WIN.INI for File Association - just the Windows registry.

You can also do this from File Manager's File | Associate menu item. Enter each of the SurView file types (see Section 3) and enter the value 'none'.   If you are an experienced Windows user, you can also remove the File Association entries with the Windows REGEDIT utility.

2.	Delete the SurView icon from the program group in which it resides.

3.	Delete the entire ...\surview directory tree in which the SurView files (SURVIEW.EXE, SURVIEW.HLP & *.RGB) were placed.

4.	SurView maintains one configuration file: ...\windows\SURVIEW.CFG (see Appendix D.15).  Delete the SURVIEW.CFG file from the ...\windows directory

5.	Do NOT delete CTL3DV2.DLL from the ...\windows\system directory (whether you installed it there or not), because many other applications use it, i.e. it is not specific to SurView.


Customization and Tips
2.3 Customization and Tips

SurView can be run directly from Program Manager with the Run command.  Program Manager can also be used to add the program to a new or existing program group and/or adjust the Properties.  For further information, refer to the following sections:

2.3.1 Working Directory

2.3.2 Creating an Icon for Each Survey

2.3.3 Command-Line Arguments

2.3.4 Creating an Icon for SurView Help

2.3.5 File Association

2.3.6 Windows Colours

2.3.7 The ENTER Key

2.3.8 Calibration for Monitor Size


Working Directory
2.3.1 Working Directory

The working directory for the application is of special interest here.  When you install an application by inserting it's icon into a program group, you have the opportunity to specify the working directory.  You may also modify this value later, by choosing File | Properties in Program Manager.

The working directory is the directory in which the program comes 'up' - it is the DOS equivalent of going to that directory before invoking the application.  Each time you start up a file selector (to select an existing file or to specify an output file), the initial directory listing is the same as the 'working directory' you set up for the icon in Program Manager.  If you don't set this up correctly, you may find yourself doing a lot of unnecessary mouse-clicking for these operations.

The 'working directory' of an application is an often overlooked aspect of the Windows environment.  There are some misguided individuals (including some at Microsoft) who believe that the working directory should be the same as the directory in which the application resides.  This absurd piece of advice is based on the idea that you should create and maintain all of the data files for that application in the application's directory.  For most environments and applications, this is nonsense - user data files should be organized and grouped according to 'project', and not by the type of application which created them.

There are 3 possibilities for the 'working directory' field of the program item:

1.	working directory same as the location of the application

If you do this, each time you want to select a data file or save data to a file, the file selector dialog box will come 'up' in the directory where the application resides.  As already stated, user data files do NOT belong in the same directory as the application, i.e. you don't keep your WordPerfect files in the WP directory, you don't keep your FORTRAN files in the MSFORT directory.  Furthermore, you won't have write access to the application's 'home' directory if the application is installed on a network drive.

2.	blank

If you leave this field blank, then Windows uses the current (default) directory.  This is the directory in which you were located when you started up Windows, right?  Wrong!  Immediately after Windows is started, it changes the current directory to the ...\windows directory.  A blank working directory is the usual default for most Windows application and results in file selectors coming up showing a list of files in the ...\windows directory every time you do something like File | Open or File | Save.  This is not very useful.

3.	"none of the above"

This is the preferred setting.  A good generic choice is the root directory (i.e. c:\), but if you have a directory in which you keep all of your survey data, i.e. c:\surveys, then use that.  While you're at it, do yourself a favour and change the working directory of all of your applications to anything but 'blank'  or the application's home directory.


Creating an Icon for Each Survey
2.3.2 Creating an Icon for Each Survey

Windows allows you to have more than one copy of any icon (even in the same program group).  If you use the File | Copy feature of Program Manager to copy the SurView icon, you can specify a different 'description' and 'working directory' for each icon, i.e. if you have 3 different surveys XXX, YYY, ZZZ, you can have 3 icons with the following properties:

Description (Icon Title)	Working Directory
SurView: XXX	c:\surveys\xxx
SurView: YYY	c:\surveys\yyy
SurView: ZZZ	c:\surveys\zzz

You can also have several icons for the same survey, each one with a different set of files to display (see Section 2.3.3), supplied as command-line arguments.


Command-Line Arguments
2.3.3 Command-Line Arguments & FDL Options

Windows does not have a command-line interface per se, but it does allow you to specify the complete command-line, including arguments in the 'Command Line' of the icon setup (File | Properties).  In addition to the complete pathname of the SURVIEW.EXE executable, you may also list the filenames.

The first thing that SurView does is read all of the command-line arguments as specified in File | Properties.  It expects to see only filenames and options (below).  These filenames form the initial File Display List, in the order they appear.  You must specify the filename with the correct extension (otherwise SurView can not know the file type).  The easiest way to specify a set of files is to list them in a single FDL file and supply the name of the FDL file as a single command-line argument.

The files are the same as you would select in SurView's File | File Display List | Add operation and in the same order.

SurView treats each line of text read from an FDL file exactly like a command-line argument, so you may all of the following options in FDL files as well, provided each one appears on a separate line.

For example, you might have several icons for one survey, each with a different File Display List in the 'Command Line' property of the icon, i.e.:

c:\surview.1\surview.exe cape.sld	(just the line data)

c:\surview.1\surview.exe pot.grx cape.sld	(grid file & line data)

c:\surview.1\surview.exe ura.grx	(grid file only)

In addition, there are a few options which can be supplied on the command-line:

-ct=x

(suitable for either command-line  or FDL files)

This allows you to specify the active colour table (x=A, B or C) on SurView startup.  The default is colour table 'A'.  For further information on colour tables, see Section 8.2.1.1.2

-view=xmin:xmax:ymin:ymax

(generally only used in FDL files).

This specifies the initial 'view' of the files that are selected, either from the command-line arguments or interactively.  This view will remain in effect, even as files are added or removed from the File Display List), until the view is directly modified by zooming or panning.

The '-view' keyword must be immediately followed by 4 values, separated by ':' and with no embedded spaces.  The first 2 values are the left and right easting values (in projected co-ordinates), followed by the bottom and top northing values.  Note that SurView will adjust the values if necessary, to match the aspect ratio of the display window.

Example:

-view=200e3:400e3:5100e3:5150e3

-projection=...

(really only useful in FDL files)

This used only to specify a specific projection when working with geographic data files (SLD/BOB/BLC/ASX).  If the File Display List contains only geographic files, SurView normally chooses a reasonable UTM or Lambert Conformal Conic projection to display the files.  To over-ride this, create a .FDL file containing the -projection= keyword with the required projection. See Appendix E for the correct syntax of the projection specification.

-title=this is a title

-title2=this is an alternate title

(really only useful in FDL files)

This is used only to specify a specific title for SurView to use as a caption. The title describes the current set of files listed in the FDL file.  Subsequent occurrences of -title= encountered while processing the FDL are ignored. The 'title2' is displayed when the Options | Use Alternate Language Where Available menu option is enabled and is normally a 'french' title (title= is used for the english title). This was added so that a .FDL file could specify an english or french window caption to accompany the english or french ASX legends (see also the title2= keyword in  ASX files).

-altlang

(suitable for either command-line or FDL files)

This enables the option to use an alternate language (where available) and is identical to enabling the Options | Use Alternate Language Where Available menu option.

-nref

(suitable for either command-line or FDL files)

This disables the reference grid which is normally drawn as a background to the map.  This may also be enabled/disabled in the dialog box for 'Other' display attributes (see Section 8.2.5

-debug

(suitable for either coimmand-line or FDL files)

This enables the 'debug' checkbox in the dialog box for managing the File Display List (see Section 8.1.1).  The checkbox can be enabled on a per-file basis and is currently only used for .BOB files.  When enabled, each polygon is labelled with the sequence number in the .BOB file.


Creating an Icon for SurView Help
2.3.4 Creating an Icon for SurView Help

You don't have to start up SurView just to access the SURVIEW.HLP help file.  The WINHELP.EXE help engine provided with Windows is an application like any other Windows application.  You can create an icon for it just as you have done for SurView (see Section 2.2).  Use the Browse button to find the WINHELP.EXE file: it resides in the ...\windows directory.  The program item dialog box might look like:

Description:	SurView Help

Command Line:	c:\windows\winhelp c:\surview.1\surview.hlp

Working Directory:	c:\surview.1

Shortcut Key:	(read your Windows manual, or use Help)

If you don't supply the name of the SURVIEW.HLP as the command-line argument for the WINHELP.EXE application, it will still start up, but you will then have to select the SURVIEW.HLP file manually with WinHelp's File | Open menu.

WinHelp's icon is a large '?' character.  Now when you want to read the help file for SurView, you can just double-click the '?' icon and it will show the table of contents.  Of course, you can still access help from within SurView with the 'Help' menu item.


File Association
2.3.5 File Association

Windows 3.1 provides a feature known as File Association (refer to the Windows manual for further details).  This allows an application to be executed directly from Windows File Manager by double clicking on a filename whose filename extension has been 'associated' with the application.  If there is no association, it can be assigned using the File | Associate menu command in File Manager.  The association information resides in the Windows registration database.

SurView, like any other Windows application, supports File Association. If you have just installed SurView on your system or if you have moved SURVIEW.EXE, you need to create new File Association entries.  With SurView running, run 'File Association' from the [--] system menu in the upper left corner.  Click the 'Add' button to add the entries, which are then displayed in the list.  If the entries that are displayed are 'old', first click 'Remove' to remove them.  This allows File Manager to start up SurView when any of the following files are double-clicked:

SLD	GRX	BOB	BLC	FDL	ASX

Note: If you move SurView to a new location or rename the directory in which it resides, Windows will no longer be able to find SURVIEW.EXE. When you click on a SurView file, Windows will tell you that it can not find the application.  Therefore, you must re-do the 'File Association' so that Windows will be able to find SURVIEW.EXE to 'run' the files, i.e. from File Manager.  Running 'File Association' (as above) a second time will show the existing entries for the 6 file types.  For each entry, If the full pathname of SurView is different than the current full pathname, the entry is flagged with a warning: '<different>'.

The above procedure is new for version 1.28 of SurView - previous versions would add the File Association entries automatically when SurView was started up the first time.  This provided no easy way to modify the entries if SURVIEW.EXE was subsequently moved to a new location.  Now, if you move the ...\surview directory, the File Association entries can be reset to point to the new location of SurView by clicking 'Remove' to remove the existing entries, followed by 'Add' to add new entries for the current location of SURVIEW.EXE.

Drag & Drop

You may also 'drag and drop' files from File Manager onto a running copy of SurView.   This drag & drop technique is equivalent to using SurView's File | File Display List dialog box to select the file(s).  However drag & drop allows you to drop a group of files onto SurView, whereas SurView's file selector only allows you to select one file at a time.  The dropped file(s) must be a valid SurView type:  SurView will reject unrecognized files that are dropped onto it (curiously enough, File Manager allows you to drop any file on any application, rather than limiting it to just the 'associated' files).

The Windows drag & drop mechanism has an even stranger form.  If you drop a file (or files) onto the SurView icon, it creates a copy of the SurView icon (one for each of the files that is dropped), with the following characteristics:

Description:	<dropped filename without filename extension>

Command Line:	<full pathname of file>

Working Directory:	<directory containing dropped file>

Shortcut Key:	same as for SurView

This time, however, File Manager only allows you to drop valid 'associated' files onto the icon.  Yes, believe it or not, the 'command' property of an icon can be a filename!


Windows Colours
2.3.6 Windows Colours

For many years now, the DOS environment has provided most of us with dark (black) screens and light-coloured (white) text.  Such colour schemes are less likely to cause eyestrain and fatigue than dark-coloured text on light backgrounds.  If you don't believe me, try black text on a white background and see how long you last!

So now with the big changeover to a Windows environment, why have we reverted to dark text on light backgrounds?  Almost all of the Windows pre-defined colour styles have black text on a white background and to make it worse, most people seem inclined to accept that.  It just doesn't have to be that way.  Windows allows you to select a set of colours for menus, frames, buttons, text, background etc which will be used by all applications.

In the 'Main' group of File Manager, select 'Control Panel' and then 'Colours' and click "Custom Palette".  Now pick a colour scheme that suits you, and then customize it!  At the very minimum, you should consider choosing different text and background colours for the central part of the window.  A non-patterned dark blue background with either cyan or yellow text is a good choice.  Now click "Save Scheme", give it a new name (i.e. 'my favourite colours') and you are finished.

Now when you start up most applications (i.e. Write, Notepad and yes, even SurView), you will have light text on a dark background and using Windows will be much more enjoyable.  Of course, if you PREFER black text on a white background, well...


The ENTER Key
2.3.7 The ENTER Key

For decades, computer applications which presented fill-in-the-blank data entry screens have used the ENTER key (RETURN, CARRIAGE RETURN, NEWLINE, LINEFEED etc) as the key to use to advance to the next data entry field (also arrow keys, TAB etc).  The command to exit the screen has usually been something special, i.e. F10 or some other 'magic' key.

Now for some reason, Microsoft Windows has decided that the ENTER key shall be the magic key which terminates data entry and closes the dialog box.  In other words, ENTER activates the usual OK button designed for this purpose.  I have no idea why the 'standard' has been changed, but I have seen that it is frustrating for users who are used to pressing ENTER to go to the next field.  Having the dialog box close instead and perhaps starting printing before all of the fields have been filled in correctly just because ENTER was pressed is not acceptable.

Therefore, when a dialog box has data entry fields (the prime example being the dialog box used for scale factors, colours and line scales), the ENTER key will not close the dialog box.  Instead, the cursor will advance to the next field.  Of course all dialog boxes have the special OK button which is designated as the official method of closing the dialog box and accepting the selections.  Yes, this may go against the Windows design specifications, but it will at least reduce some frustration.


Calibration for Monitor Size
2.3.8 Calibration for Monitor Size

You only need to consider this section if either the map or stacked profile 'picture' does not fill the window or if it is clipped by the window.  You can also verify the calibration by examining the settings in the dialog box.

It's a long story why the monitor size is important to SurView, so here's the short version...  SurView's drawing code is structured to use a 'map scale' (i.e. 1:50 000) to scale all of the world co-ordinates to device co-ordinates. For printing, the user specifies the map scale, but for the purpose of drawing on the screen, SurView needs to compute an equivalent 'map scale' that will result in the picture filling the entire window.  In order to do that, SurView needs to know the monitor size (mm) as well as the resolution of the graphics card.  Although Windows knows the exact resolution of the graphics card (i.e. 1024 X 768), it has no idea how big the monitor is, so when asked for the size, it makes a guess (for example, you probably wouldn't use 1280 X 1024 resolution with a 13" monitor nor would you use 640 X 480 with a 27" monitor).

Most of the time, this guess is correct, but sometimes it isn't.  If the dimensions are incorrect, then SurView's pictures do not exactly fill the screen window.

In order to adjust for the monitor dimensions, choose 'Calibration for Monitor Size' from the [--] system menu in the upper left corner of SurView (left of the window's caption area).  This dialog box shows the X & Y factors (by default, these are both 1) and allows them to be set to adjust for the monitor size.

If the RED crosshair cursor is in the centre of the yellow rectangle, aligned with the black crosshairs, the current calibration factors are correct.  If it is not centred, locate the RED cursor for SurView by clicking as accurately as possible in the centre of the RED cursor with the mouse cursor pointer. SurView will compute the required calibration factors in order to place the RED cursor at the centre.  Generally, these 2 factors will be the same.

The monitor dimensions (according to Windows) are multiplied by these factors, so the numbers will be > 1 if SurView's map picture does not entirely fill the screen window (leaving a margin at the top and/or right side).

Click the 'Reset' button to reset the factors to the default (1,1).


Types of Files
3. Types of Files

SurView draws the main map view by drawing each of the files from the File Display List in the order in which they appear.  The File Display List can be managed interactively using the File | File Display List menu item and/or by the use of an FDL file.

SurView uses several types of files:

Primary data files which can be displayed:

· Survey Line Data	(SLD)

· Grid Data	(GRX)

· Line Contour	(BLC)

· Object	(BOB)	(AOIzz.D.6)

· File Display List	(FDL)

· Arc/Info 7 'Shape'	(ASX)

Specification files for various operations:

· Stacked Profiles	(STP)

· Grid Data Levels	(LVL)

· Grid Palette	(RGB/CMY)

Configuration files (optional):

· SURVIEW.CFG

SurView can draw point data with user-defined external symbols, defined in BSY files.

SurView contains compiler tools to convert the following ASCII files to binary format:

· OBject	(AOB)	(to BOB)

· Line Contour	(ALC)	(to BLC)

· Symbol	(ASY)	(to BSY)

· Line eXchange Format	(LXF)	(to SLD)

SurView also creates 2 types of files:

· eXported Line Data	(XLD)

· configuration	(SURVIEW.CFG)

FDL files are usually created with an ASCII text editor.

Appendix D contains full descriptions of the files, including format and instructions for creating them.

Comment: Binary Files vs ASCII Files

SurView requires that SLD, BOB, BLC and grid data files be binary files, for the following reasons:

·	binary files are more compact than ASCII and can be read faster.  Their smaller size also makes them more suitable for distribution of large data sets.

·	binary files can be modified without re-writing the entire file.  SurView updates the display attributes (scale factors, line styles and colours) in the data files.

·	binary files are suitable for data distribution because of the wide availability of Intel PC systems

·	most of the binary files are created by SurView and can contain optimum indexed internal file structure, allowing them to be read very quickly

·	binary files can generally be relied on to be correct.  The code which reads ASCII files and verifies syntax & context and reports errors is only in the compile phases of SurView (which are only done once) and not in the reading/plotting routines.  As a result, the drawing routines in SurView are smaller, faster and more easily maintained.


Getting Started - Map View
4.  How to Use SurView

4.1 Getting Started - Map View

Choose File | File Display List | Add and select 1 or more files to be displayed.  Don't worry about the order - it can be changed after you select the files.  Most of the time, you will select at least an SLD file. This allows at least the flight lines to be shown.  With only an SLD file, you can select 1 or more lines from the map view and display stacked profile data.

You may wish to choose either a grid file instead of or in addition to the SLD file. Additional object files for geology, lakes and rivers may be selected if available.

When you have finished selecting files, SurView draws a background (easting,northing) grid (units depend on projection) and then plots the contents of the files in the order they appeared in the File Display List.  For each file, it only plots the variables which are enabled.  You can specify which items are to be plotted and their colours and line styles by choosing the Display menu item.

You may abort the plotting of any file at any time by pressing the ESC key.  The window title will momentarily change to <<<interrupted>>> to indicate that the remainder of the file will not be plotted.  You can force a redraw at any time by choosing View | Redraw from the main map menu.

The grid line spacing is determined automatically to show the most information without cluttering the screen.  The spacing will change automatically as the map is zoomed.

While viewing the map, you can do the following:

·	zoom/pan on the map

·	print the current map view

·	copy portions of the map to the Windows clipboard

·	change the display attributes of the grid

·	change the display attributes of the various files being displayed (colours, line styles, scale factors)

·	select a flight line (if an SLD file has been selected) for which to view the stacked profiles


Getting Started - Stacked Profile View
4.2 Getting Started - Stacked Profile View

When you select a flight line, a new window is created to display the stacked profile data for that line.  The variables are plotted from top to bottom in the same order they appear in the SLD file.

You may abort plotting the entire stacked profile section at any time by pressing the ESC key.  The window title momentarily changes to <<<interrupted>>> to indicate the drawing has been aborted.  You may force a re-draw of the display at any time by choosing View | Redraw from the stacked profile menu.

While viewing the stacked profile data, you can perform the following operations:

·	zoom/pan along the flight line (profile section)

·	print stacked profiles

·	export stacked profile data

·	change scales, plot types, line styles & colour

When you wish to return to the map, you can:

·	close the stacked profile window or

·	minimize the stacked profile window or

·	occlude the stacked profile window by clicking on the map window (assuming it is visible).

You can manage SurView's various map & stacked profile windows using the Program Manager's special alt-TAB or Ctrl-ESC keys.  Read your Windows manual for further information.


Drawing Colours & Attributes
5. Drawing Colours and Attributes

BOB/BLC & SLD Data Files

Each of the SLD, BOB and BLC files contains 3 separate tables of display attributes which are specific to the data contained in these files and which are selectable individually for each of these files.  These tables are defined when the files are compiled by SurView's compiler tool (see Section 8.7.1), however you can modify the attributes (colours, line styles) and scale factors:

·	SLD files (flight lines, profile maps, stacked profiles, enable/disable flags)

·	BLC files (contour line styles & colours, enable/disable flags)

·	BOB files (same as BLC files, plus polygon fill colours & text & point/symbol colours)

When SurView compiles an AOB or ALC file to create a BOB or BLC file, the colours read from the AOB/ALC file are placed in table A.  White on black is inserted into table B and black on white is inserted into table C. There are no colours in LXF files, so SurView puts default black lines in all 3 tables for SLD files.

You may attach any significance you wish to the 3 tables.  For example, you might have one set of colours for viewing the data on a colour video screen, another set (perhaps with patterns) for use on a monochrome LCD screen and a third for printing.  The purpose of the 3 separate tables of colours is to allow you to switch between them quickly without having to redefine whole tables of colours.

GRX & ASX Data Files

Note that GRX files do not contain 3 tables of display attributes, due to their nature.  There is only one palette filename and data level filename specified for each GRX file.  These files specify the colours of the gridded data elements.

Similarly, Arc/Info 'Shape' files are managed by ASX files which are similar to the GRX files, in that they encapsulate a data file and a set of display attributes (colours etc) into a single file which can be selected for viewing.

SURVIEW.CFG

The ...\windows\SURVIEW.CFG file also contains 3 tables of general purpose display attributes. The active table can be selected independently of the colour table used for BOB, BLC & SLD files.  These include background colours, cursor line styles & colours, reference grid line styles & colours etc, for both the map and stacked profile windows.  These colours are for items which are not related to the display attributes of the files in the File Display List.  If SURVIEW.CFG does not exist, SurView uses default values (set internally in SurView).  However, if these are modified, then they can be saved in the SURVIEW.CFG file when SurView terminates.

Active Table

The active table (A, B or C) for each BOB, BLC & SLD  file is changed in the dialog box which presents the display attributes for that file. These dialog boxes are all accessed from the Edit | Display Attributes menu item in the map and stacked profile windows (see Section 8.2 & Section 9.2).

Saving Display Attributes

The only time you get a chance to save the display attributes is when you remove a file from the File Display List or when you terminate SurView.  You might do this from the File | File Display List dialog box, but SurView also removes each file individually from the File Display List when it is terminated.  While running, SurView remembers what attributes have been changed and as each file is removed from the list, and if the attributes have been modified, it asks you if you want to save the changes.  If you respond with yes, then the values are written to the appropriate file.

If the general drawing attributes have changed, you are also prompted to save the changes in the SURVIEW.CFG file.  The SURVIEW.CFG file is created/modified in only one place... the ...\windows directory (rather than in SurView's home directory).  This guarantees that in a network environment, each person has their own copy of the file containing their personal preferences.

Note that the current colour table (A,B,C) is not saved anywhere - each time SurView is activated, it sets the default table for each BOB, BLC & SLD file and for SurView's general drawing attributes to A.  However, you can use the -ct=x option (see Section 2.3.3) in the command-line to specify which table of general drawing attributes to use on startup. This only affects the general drawing attribute table - not the table for individual BOB, BLC or SLD files.


Zoom/Pan
6.  Zoom/Pan Operation

The special zoom/pan cursor is used for 4 operations within SurView:

·	zooming/panning on the map view

·	zooming/panning on the stacked profile view

·	selecting & copying a portion of the map picture to the Windows clipboard

·	selecting & copying a portion of the stacked profile view to the Windows clipboard

6.1 Zoom/Pan

You may zoom or pan on either the main map display or any of the stacked profile display windows. by choosing the View | Zoom from the menu of the appropriate window.  The cursor disappears and is replaced by a rectangular zoom/pan cursor which is controlled by the mouse and/or the keyboard.  The appearance and behaviour of this cursor is patterned after the cursor found in Tektronix 41XX graphics terminals.

For the map view, the cursor is rectangular, with the same aspect ratio as the current window.   The cursor may be zoomed and moved in any direction, since the scale is isotropic.  For the stacked profile display, the cursor is a set of vertical lines (i.e. just the vertical line portions of the zoom rectangle) which may only be moved or zoomed in the X direction.  This minor restriction on zooming/panning on the stacked profile display eliminated the complexity of dealing with not only different scale factors in the X & Y directions, but also different Y axis scale factors for each variable.

The cursor appearance depends on whether or not it is in Zoom or Pan mode.  In Zoom mode, the outer rectangle contains a smaller partial rectangle (2 L-shaped corners for framing).  In Pan mode, the rectangle contains a '+'-shaped crosshair cursor.  In both cases, it is always the outer rectangle that outlines the selected area.

Help

If you press an unrecognized key during Zoom/Pan operations, a brief pop-up message box will remind you of the control functions.

Zoom & Pan Modes

Use the LEFT mouse button to toggle between Zoom and Pan modes.  You may also use the '5' key on the numeric keypad, whether NUMLOCK is on or off.

Reset

Use the BACKSPACE key to restore the cursor to Zoom mode (as it initially appeared).  Note that this governs the shape of the cursor only, not the areas of the display which have been zoomed or panned.

Pan Mode

The pan cursor may be moved in any direction intuitively using the mouse.  You may also use the 4 arrow keys.  The 8 keypad keys (whether NUMLOCK is on or off), also allow movement in the diagonal direction.  When using the numeric keypad keys, the centre '5' key is used to toggle Zoom/Pan mode.  Also remember that the stacked profile cursor can only be moved left or right in pan mode.

Zoom Mode

The zoom cursor can also be controlled by the mouse and/or the keyboard.  To zoom in (make the rectangle smaller), you may use:

· left and/or down mouse movement

· left and/or down arrow keys

· '4' and/or '2' numeric keypad keys

To zoom out (make the rectangle larger), use:

· right and/or up mouse movement

· right and/or up arrow keys

· '6' and/or '8' numeric keypad keys

Colour & Line Style

While the zoom/pan cursor is displayed, the 'C' (or 'c') key can be used to toggle through a list of 16 possible cursor colours and the 'L' (or 'l') key can be used to toggle through a list of 5 possible line styles.  The values that are changed by using the C & L keystrokes while using the zoom/pan cursor are not saved - they are merely a convenience for improving the visibility of the cursor as it is moved around in pictures which have complex combinations of colours.

Each of the zoom and pan modes has a separate pair of colour/style combinations for the map view and the stacked profile view.  These can be set by selecting Edit | Other from the map and stacked profile menus.  These values can be saved in the SURVIEW.CFG file when you terminate SurView.

Keyboard Speed Change

While using the keyboard to control the Zoom/Pan cursor, you may use the SPACEBAR to toggle between fast and slow cursor movement.  The slow speed allows a finer adjustment of the cursor to select the area.

Select Area or Quit

Whenever you wish to quit without selecting an area, press the ESC, Q, DELETE or DEL key (or the MIDDLE mouse button, if you have a 3-button mouse).

When you have selected the area you wish to view, press the RIGHT mouse button to select the view.  The Zoom/Pan cursor will disappear and the window will be redrawn.  If you have the 'Auto Re-Zoom' option enabled (below the View | Unzoom menu item), the Zoom/Pan cursor will then appear again to allow you to select another area, i.e. 're-zoom'.  Use ESC, Q, DELETE or DEL to quit if you wish.

Virtual Screen Feature

Whether or not the current window is maximized or not, you will notice that the Zoom/Pan cursor is not bound by either the current window limits or the physical screen display limits.  It operates in a virtual mode for both zooming and panning.  You are free to move the cursor anywhere you wish and also to zoom out as far as you want - just because you can no longer see the cursor, doesn't mean that you aren't still controlling it in both zoom and pan modes.

Most Windows programs which implement Zoom/Pan features only allow you to select what you see on the screen.  This means that if you are already zoomed in on an area and wish to view an adjacent panel, you must zoom out again before you can select the area.  This requires unnecessary screen redraws.  In addition, subsequent selections will probably not have the same scale as the first.  SurView's Zoom/Pan cursor allows you to retain the current scale and select an adjacent panel for viewing without redrawing the screen.  Maybe you can't see it, but you can sure select it.

Aspect Ratio:  Map View

For the map view, the Zoom/Pan cursor rectangle has the same aspect ratio as the current window.  This aspect ratio is fixed and can not be changed to avoid the complexity of dealing with the aspect ratio of the Zoom/Pan cursor rectangle and the aspect ratio of the window.  If the selected area had a different shape than the current window, then SurView would be required to change the aspect ratio of the window to match that of the selected area before displaying the new view.  It was thought that this would be annoying to most users.  On the other hand, if the aspect ratio of the window remained the same, then it would display the selected area plus areas outside the selection rectangle, so why not  just keep the aspect ratio of the selection rectangle the same as the window, so it shows ALL of what you are going to see, anyway?  It sounds confusing, but if you think about it for a minute, it does make sense.

This pops up a dialog box to allow you to choose attribute (colour) table A, B or C.  This is a global selection and affects both the map display as well as the stacked profile displays.

Aspect Ratio: Copying to Clipboard

The Zoom/Pan cursor is also used to select an area to be copied to the clipboard.  The operation of the cursor for selecting an area of both the main map window and the stacked profile window(s) is the same as for zooming/panning on the map, i.e. you can zoom and pan in any direction.  Furthermore, you can vary the aspect ratio of the cursor.  Press the TAB key to toggle a special mode which allows the aspect ratio to be adjusted.

The rectangle can be made narrower (or wider) by:

· moving the mouse LEFT (or RIGHT)

· pressing the LEFT (or RIGHT) arrow key

· pressing the '4' (or '6') keypad key

The rectangle can be made shorter (or taller) by:

· moving the mouse DOWN (or UP)

· pressing the DOWN (or UP) arrow key

· pressing the '2' (or '8') keypad key

Numeric Keypad & NUMLOCK

When NUMLOCK is ON, the keypad generates numeric 1-9 digits which can be used to control the zoom/pan cursor.  Since these are the same as the 1-9 keys across the top of the QWERTY part of the keyboard, it follows that these keys may be used also, however their arrangement is far less intuitive than that of the numeric keypad.

When NUMLOCK is OFF, the 1,3,7 & 9 keypad keys are equivalent to the End, PageDown, Home & PageUp keys.  You may also use these keys, although they are less intuitive.


Copy to Windows Clipboard
6.2 Copy to Windows Clipboard

The entire Windows screen can be copied to the clipboard with the PrintScreen key and the current (active) Window can be copied to the clipboard with the Alt-PrintScreen key.  These features are provided with Windows for your convenience.  You may then paste the contents of the clipboard into another application (Write, PaintBrush, etc).

These two standard clipboard features copy everything, including window frames, menus, sizing handles etc etc.  If you wish to copy only a portion of the display, you can use the Edit | Copy to Clipboard menu item in SurView.  This menu item is available from the main map menu or from the stacked profile menu, although it only gives you access to the window from whose menu it was selected.

When you choose this feature, you enter the normal Zoom/Pan mode, but with a small difference.  During 'clipboard' mode, you may use the TAB key to enter a Zoom/Pan cursor mode which allows you to adjust the aspect ratio of the Zoom/Pan rectangle.  Press the same key again to exit aspect ratio modification mode.  This allows you to control very precisely the amount of data you are copying to the clipboard.

For both the main map view and the stacked profile view, the Edit | Copy to Clipboard menu selection both bring up the Zoom/Pan cursor again.  The procedure is no different than selecting an area for viewing, except that the aspect ratio of the Zoom/Pan rectangle can be adjusted by pressing the TAB key as described above.

When the area is selected (as for zoom/pan, i.e. with the right button), it is copied to the Windows clipboard without changing the current view and without redrawing the screen.  Despite the fact that the cursor can be moved anywhere on the screen, the selected area is clipped to the boundaries of the current window (this allows you to manoeuvre close to the windows boundaries without inadvertently including non-picture fragments in the area).

Of course, you can always use PrintScreen or Alt-PrintScreen to copy the entire display or current window (including borders) to the clipboard.  This is a Windows feature and is unrelated to SurView.


Printing
7. Printing

There are 3 main printing operations in SurView.  You may print:

· the current map view

· the current stacked profile view

· a set of stacked profile views read from an external STP file

For these printing operations, a dialog box appears showing the view as it will appear on the piece(s) of paper for the current user-selected map scale and paper size.  For the map view, a scale may be selected which will require several pieces of paper: the stacked profile view is limited to a single piece of paper.

You may print to any printer that has been installed for Windows use.  The 'Setup Printer' button on SurView's 'print' dialog box, allows you to select:

· the printer (from a list of installed printers)

· the paper orientation (landscape or portrait)

· various sizes of paper

There are many other printer setup options as well, some of which are specific to the particular Windows printer driver being used: SurView has no direct knowledge of these options and they are largely transparent to the printing operations.  Nevertheless, you should get the desired results.

Special Considerations for Printing a Set of Stacked Profiles

The Profiles | Print Set of Stacked Profiles menu item for the map display is used to print (i.e. in 'batch' mode with no screen display) a set of stacked profile sections listed in an external STP file in batch mode.  The STP file is selected and verified (by reading it) and then you have the opportunity to proceed to the printer setup (scale factors, margins, printer, paper tray, landscape/portrait mode etc) for the longest stacked profile section.  Once printing starts, it prints all of the stacked profiles listed in the STP file.  This of course requires careful consideration of the amount of paper available in the paper tray (as well as the load on the printer if it is a network printer).

There are several differences between printing stacked profiles from this menu selection and selecting File | Print Stacked Profiles from the stacked profile main menu:

·	1 or more stacked profile sections can be printed in 'batch' mode

·	the printer setup is done once for the whole set of stacked profile sections (this is particularly useful for the scale)

·	the STP specification file contains information on cutting the flight lines at map sheet boundaries whereas viewing stacked profiles on the screen shows the entire flight line, regardless of map sheet boundaries (of course you can zoom and pan free-form as you wish)

Before printing a set of stacked profiles, you should check the following:

	Item	Section
?	have the individual variables to be plotted in the stacked profiles been enabled/disabled as required?	9.2.1.1
?	have the [min,max] values for the Y axes been set as required?	9.2.1.1
?	have the Presentation Filters been enabled as required?	9.2.1.2
?	have the Point/Step plot modes been set as required?	9.2.1.2
?	have the Clip/Wrap modes been set as required?	9.2.1.2
?	have the line colours and/or styles been set as required for the colour/attribute table (A,B,C) that you plan to use?	9.2.1.1
?	does the paper tray contain enough paper?

Verifying these points will usually involve selecting any flight line to show the stacked profile section and then using the Edit menu items to access these attributes.

Note that the [zoomed] view of the set of stacked profiles is defined by the contents of the STP file, but that the set of variables to be plotted is determined by the enable/disable flags in the stacked profile Display attributes dialog box.


SurView Operation: Map Menu
8. SurView Operation: Map Menu

The menu shown at the top of the map view window provides selections to allow you to manage not just the map view, but also to activate a display of stacked profiles and to terminate SurView itself.  Briefly, the menu choices are:

File

·	file display list

·	print map

·	launch another copy of SurView

·	start a DOS session

·	exit

Edit

·	colours and line styles of various types of files

·	colours and styles of background attributes

·	filtering of SLD profile map data

·	copy portions of the map to the Windows clipboard

View

·	zoom and pan on the map display (also unzoom)

·	redraw map

Pick

·	right mouse button mode

Options

·	flight line display options

·	smart (E,N) cursor

·	grid file legend (colour bar)

·	ASX (Shape) file legend

Profiles

·	select a flight line for which to display stacked profile data

·	print a set of stacked profiles

Tools

·	compile AOB/ALC/ASY to create a BOB/BLC/BSY file

·	compile LXF to create an SLD file

·	intersect SLD flight lines with BOB polygons

·	intersect SLD flight lines with map sheet boundaries

·	find grid values at point locations

·	import point data from .DBF files

·	enter point data in .DBF, .AOB or text files

·	view symbols in .BSY symbol or .BOB files

·	import DXF files (convert to AOB)

Help

·	access to this help

·	system information

·	about this program

In addition, the system menu contains some duplicate items from the Help menu (for use when the window is iconized) as well as a selection to allow the picture to be tuned to the monitor size (in case the picture doesn't quite fill the window). You can also launch a new copy of SurView from here (it does not affect the current copy of SurView or fhe current File Display List).


File | File Display List
8.1 File

8.1.1 File | File Display List

This dialog box shows the current filenames in the File Display List (if any) in the listbox.  It also contains several buttons which allow you to perform the following functions:

Add

This pops up a standard file selector dialog box allowing you to select a file to be added to the File Display List.  You will have the opportunity to select drives, directories and several file types (SLD, BLC, BOB, GRX).

You can select multiple files in the file selector dialog box using the standard Windows controls ('shift' & 'ctrl' + mouse buttons) for multiple selections in a listbox (refer to your Windows manual).

The order of the files in the File Display List can be changed by dragging and dropping the items within the listbox.

Remove

This allows you to remove the current selected file from the File Display List.  You will be asked to confirm removal of the file.

Show/Hide

Each entry in the dialog is displayed with a '<draw>' or '<hide>' status on the left. <draw> is the default and indicates that the file will be drawn.  If the status is <hide>, the file will not be drawn the next time the map is drawn. You can toggle the state of the currently selected file with the Show/Hide button.

File Info

This allows you to view various pieces of information regarding the currently selected file in the listbox.  Click the filename once to select it and then press File Info.

Clear List

Press this button to clear the File Display List.  It removes all files from the list and is functionally equivalent to pressing the 'Remove' button for each file.

Save List

This button allows you to save the current File Display List in a FDL file.  In addition to saving the current ordered list of files, the current 'view' of the map will also be saved in the .FDL file with the -view option (see Section 2.3.3 for syntax and usage).  Note that the view is not saved if the map has not been drawn yet.

Once a set of files has been selected for viewing, several FDL files can be created for different viewing areas of the map, by zooming and panning as desired and then returning to this dialog box to use the 'Save List' button.

Ok

Press this button when you have finished viewing or modifying the File Display List.

Adjust View on Return

By default, this option is checked: when Ok is clicked to return to the map display, SurView will ensure that all files in the File Display List are visible by computing an overall 'view' , based on the extent of each file.  If you wish to add or remove a file from the File Display List, without re-adjusting this view, clear the checkbox before clicking Ok to return.  The initial default value is 'checked': it persists throughout the SurView session or until it is changed.

Note that this flag is only used if SurView recognizes that the File Display List has actually changed (file removed, file added, or file order changed), and a redraw is required, otherwise it is ignored.


File Display List Dialog Box (Add)
File Display List (Add)

This is a standard Windows 3.1 file selector dialog box which is used to select new files to add to the File Display List.

You may select various disk drives and directories using the 2 listboxes on the right.  Simply double click on the required drive or directory to select it.

The current filename template is shown at the upper left.  You may choose a different template from the list box at the lower left.  This allows you to list SLD, GRX, BOB, BLC and FDL files.  Each time you change the template or choose a new drive or directory, the list box fills with the names of files which match the template.

To choose a file, either click it once and then press OK or just double click the filename.  You may select several files at once using the standard 'ctrl' & 'shift' keys with the mouse (see your Windows manual).

Although this general purpose file selector allows you to edit the filename template in the upper left, you may NOT do this.   I have found no way to disable it (yet).  If  you edit it and then select a file which is not recognized by SurView (by filename extension), your choice will be refused and you will be asked to re-select a file.

Verification of SLD/BOB Intersection Tables

When you select a BOB file, SurView checks the file for the presence of a table of intersections between the polygons and an SLD file (created with the Intersection Tool, Section 8.7.3).  These tables are used only in the presence of an SLD file in the File Display List and only when viewing stacked profiles.  They are used to draw background polygons in the stacked profile display.  If a BOB file contains an intersection table for a different SLD file than is selected in the File Display List, a warning message will be displayed and the table will be ignored, i.e. it won't be used to draw polygon backgrounds for the stacked profiles.  If an SLD file is in the File Display List, the list of filenames which appears in the dialog box will display one of the following comments beside BOB files:

·	"no SLD intersection"

The BOB file has never been intersected with an SLD file.

·	"intersects SLD"

The BOB file contains an intersection table which is valid for the current SLD, or no SLD file is selected.

·	"invalid SLD intersection"

The BOB file contains an intersection table which is not valid for the SLD file.


Changing Order of Files in the File Display List
File Display List (Order)

To change the order of the files in the File Display List, simply click a filename with the LEFT mouse button, drag it to the new location and release it.  The dropped file will be inserted above the file onto which it was dropped.

To move a file to the bottom of the list, drop it on the last file and then move the last file in front of it.

If the vertical scroll bar is present in the listbox, the listbox can be scrolled while dragging simply by moving the dragged item above or below the listbox (this is the usual Windows behaviour).


File | Print Map menu item
8.1.2 File | Print Map

This dialog box allows you to do a complete setup for printing the current map view: it provides no capabilities to select a portion of the map to print (that is provided by the zoom/pan features from the main map menu).

The cartoon on the left shows a compressed bitmap of the current map view (or a red rectangle if the bitmap is unavailable) and the outlines of the paper (pages) in yellow.  Each time one of the setup items (scale, margins, printer setup) is changed, the cartoon is redrawn showing the current relationship between the paper and the map view.

Multiple Pieces of Paper

The initial map scale is set so that the view exactly fits on a single piece of the default piece of paper.  Use this as a guide to setting a 'nice' map scale.

If the map scale is chosen so that more than one piece of paper is required to print the map, the cartoon will show the outlines of each piece of paper relative to the map.  You don't have to plot all of the pages: simply click on the page that you don't want and it will be marked with an 'X', indicating that it won't be plotted.  Another click on that page will toggle the setting to allow it to be plotted (the 'X' will disappear).

Plot Background Colour

For many colour plotters, printing a map with a non-white background will just soak the paper and blur the rest of the picture.  However, you may have a colour background selected for viewing on the screen.  So, rather than requiring you to select a white background just for printing, the "Plot background colour" option allows you to suppress the background entirely.  By default this option is not selected and the background is not plotted.

Map Labels

The 'Labels' button allows you to specify several titles and their locations on the paper (see Section 8.1.2.1 for details).

Printer Setup

From within SurView, you also have access to any of the printers that have been installed for Windows, including all of their options.  When you choose Printer Setup, you are invoking a standard Windows printer setup dialog box.  The initial box allows you to choose:

·	any of the installed printers

·	the paper tray

·	landscape/portrait mode

Additionally, you can choose Options to choose options which are specific to the selected printer.  I can't help you here, because I have no idea what they will be - you're on your own.  Perhaps your Windows manual will be of some help.

Start Printing

When you are ready to print, choose Print Now and printing will begin.  A dialog box will appear which allows you to monitor the progress of the printing, as well as providing you with a Cancel button if you choose to cancel printing the map.  Note that if the printer is connected to a network printer, pressing the Cancel button will stop printing, but a partial (corrupt) file will still be sent to the network printer, so you will still get some sort of 'output'.

If you choose not to print, simply select Cancel Print to return to the main map view.


Printer Setup

This is a standard Windows dialog box for setting up the printer.  I didn't design or write this stuff, so you're on your own - perhaps your Windows manual will be useful here.


Print Abort

While printing a map or stacked profile section, a dialog box appears showing the progress of printing various items.  There is a single 'Cancel' button.  If you press ENTER or click this button, the printing operation will abort.


Map Labels

This dialog box allows you to specify a few limited options for labelling the map.  It is a reasonable compromise between having nothing and a full-blown map composition application.

At the top are 2 drop-down combo-boxes, labelled as 'Map Title 1' and 'Map Title 2'.   They are functionally identical.  You may enter a title in the edit field yourself, or choose one of the available titles from the drop-down listbox.  If you select a title from the listbox, you can also edit it.  The titles in the listbox are obtained from the titles of every file in the current File Display List.  If the file has no title, "<untitled>" appears.  If a GRX file is in the File Display List, another title is created by concatenating the variable name and units (these are obtained from the Variable (Parameter) & Units keywords in the GRX file).

The other 2 titles are the map scale and the date, both of which are created automatically by SurView.

At the bottom are 2 groups of radio buttons.  The group on 4 radio buttons on the left allows you to choose one of the 4 possible titles, whose attributes then appear in the group on the right.  The group on the right allows you to specify the location of the selected title relative to the page as well as the height of the title.  The title can be suppressed by choosing a location of 'None'.

There is also an option to draw a simple frame around the extreme edge of the plotting area, i.e. outlining the paper margins imposed by the plotter hardware.


Access to DOS (map view)
8.1.3 File | DOS

Although Windows provides access to DOS via an 'MS-DOS' icon in other program groups,  SurView also provides the same 'jump to DOS' function directly by choosing the 'DOS' menu item.  Many users find this more convenient than going through Program Manager.   It has the added advantage that it will start up the DOS session in the SurView's current directory, so you don't have to navigate to return to the directory in which you are working.


Exit (Terminate SurView)
8.1.4 File | Exit

Choosing this menu item will terminate SurView.  The same operation can also be initiated with ALT-F4 or by double-clicking on the main map window's system menu.  You will have the opportunity to cancel as SurView inquires "Are you sure you want to terminate SurView?".

If you choose to terminate SurView, it removes each file from the display list.  As it does, it checks to see if the display attributes for the file have changed.  If they have, you are prompted with "Display attributes have changed.  Save changes?".  If you answer 'yes', the file is updated.

Finally, SurView checks to see if the general display attributes (background colours etc) have changed.  If they have, you are prompted with "General display attributes have changed?  Save changes (SURVIEW.CFG) ?".  If you answer 'yes', this file is updated or created if it does not yet exist.  There can be only one SURVIEW.CFG file: it is always created in the ...\windows directory.

Note that you may not terminate SurView from the stacked profile menu: double-clicking on the system menu or choosing File | Close for the stacked profile window only closes that stacked profile 'view'.  Correspondingly, when SurView terminates, it will close all stacked profile windows automatically for you.


Edit Display Attributes of Files
 8.2 Edit

Introduction

The Edit menu item (on the map menu) displays a hierarchical listbox containing all of the display attributes (colours, styles) for all of the files currently in the File Display List.  When an item is selected for editing or viewing, the appropriate dialog box appears.  When that dialog box is closed, another display attribute can be selected for editing from the hierarchical list.  A final 'Ok' from this dialog box will return to the map view, whereupon the map will be redrawn if any of the display attributes have been modified.

Operation of Hierarchical (Tree) Listbox

The hierarchical listbox uses 3 kinds of icons which are used to indicate open & closed branches on a tree and selectable items (similar to File Manager):

this is a tree branch which contains more items (double click to expand)

this is a tree branch which is fully open (double click to collapse)

this is a selectable item which will show a dialog box to edit the attributes (double click to select)

Colour is used for variety: yellow for file types, red for filenames and green for the display attribute group that can be edited.

The listbox may be navigated using either the mouse or the cursor keys.  Pressing the space bar toggles the open/closed state of a node or selects an item to be edited.

In addition, the entire hierarchical list of files and attributes can be fully expanded or collapsed using the 'Expand All' and 'Collapse All' buttons respectively.

Available Display Attributes for Editing

The display attributes which are available for editing depend on the type of file:

SLD files have 3 classes of display attributes (Section 8.2.1):

·	colours, lines and scale factors (for flight lines & profile maps)

·	filters, wrap and clip modes (for profile maps)

·	proportionally-scaled symbols:

·	symbol line colours

·	symbol fill colours

·	symbol scale factors & symbol type

GRX files only have 1 possible dialog box:

·	palette file & levels file (Section 8.2.2)

ASX files only have 1 possible dialog box:

·	the colour & style entries in the ASX file (Section 8.2.4)

BOB & BLC files can contain any combination of text, open and closed polygons and points.

Polygons (Section 8.2.3):

·	polygon line colours & styles

·	polygon fill colours & patterns (none, 6 predefined hatch styles & additional user-defined patterns)

·	enable/disable checkbox to control whether the items are plotted or not

·	enable/disable checkbox to control whether the polygons are filled or not

Text (Section 8.2.3):

·	text colours

Points (Section 8.2.3.1):

·	outline colours & styles

·	fill colours & patterns

·	scale factors & symbol type

Note that unlike the other file types which have a fixed no. of groups which can be edited, these files have a variable no. of groups, depending on the contents of the file.  BLC files usually only contain lines (no text, filled polygons or points).

Most of the dialog boxes which present the display attributes for editing share a common format.  These dialog boxes are described in detail in the following sections.


Survey Line Data Attributes (map)
8.2.1 Edit  (Survey Line Data)

There are three sets of display attributes for the SLD file:

Colours, Lines & Scale Factors (Section 8.2.1.1):

·	enable/disable plotting flight lines

·	enable/disable plotting profile maps of each variable

·	change scale factors for profile maps

·	change background colours for the map

·	change the line styles and colours for flight lines and profile maps

Filters,Wrap & Clip Modes (Section 8.2.1.2):

·	specify the type of filter to be applied to variables plotted as profile maps

·	specify the no. of times to apply the filter

Proportionally Scaled Symbols (Section 8.2.1.3)

·	change line colours for symbols

·	change fill colours for symbols

·	change scale factors for symbols & symbol types


Attributes: Colours, Line Styles, Scale Factors
8.2.1.1 Colours, Lines, Scales

This is one of SurView's most complex dialog boxes, but don't despair - it's really not as bad as it looks.  It is used for most display attributes and can appear in several different configurations.  Depending on the type of attributes and/or file, some of the buttons or display items may not be visible in the dialog box.  In addition, some of the buttons may be disabled or have different meanings (for example, the sample boxes may represent either a line on a background or a polygon fill colour or a text colour).

Some special cases:

1.	Scale Factors for Profile Maps (not visible for BOB files)

The first scale factor is the 'data value per flight line-spacing'.  By specifying the scale factor in terms of the line spacing, it remains independent of the scale factor and output device.

The initial scale is chosen so that the data does not overlap too much over the adjacent lines.

The offset is the value which is ADDED to the data before plotting it.  The default offsets are chosen so that the data is more or less centred or based on the flight line (depending on whether it oscillates about the 0 value).  A 'magic' value of -12345 for offset, will cause SurView to compute the average value of each flight line and subtract that from data before plotting it.

If you specify a value of 0 for BOTH scale factors, then the initial values (as read from the SLD file) are restored.

2.	Scale Factors for Stacked Profiles (not visible for BOB files)

The [min,max] values for the Y axis are shown for each variable.  Initially, these are set for each variable to the absolute [min,max] of the data for the entire survey (SLD file).  You will want to set these values to 'nice' whole numbers so that the Y axis labels for the stacked profile display will be 'cleaner'.

The absolute [min,max] values can be restored at any time by entering a value of 0 for BOTH scale factors.

In some cases (i.e. for magnetometer data), the data has a large extent, but a relatively small local range.  In other words the [min,max] range for the whole survey may be large, but the [min,max] range for one flight line may be much smaller.  In this case, set both [min,max] values to the SAME value - this will be considered as the range of the data on the Y axis for all stacked profile displays.  The minimum value is computed as the smallest value along each flight line.  The maximum value is then computed by adding the range.

Note that there may be several stacked profile display windows open, i.e. for different flight lines, however they all share the same display attributes (line colours & styles) and Y axis scale factors.  The X axis (distance along flight line), however is different for each window, to allow the data to be stretched to fit the width of the window.

3.	Cursor colours

The cursor colours (see Section 8.2.5 & Section 9.2.2) do not show the same colour in the sample box that you select from the colour palette - this is normal behaviour and is related to the manner in which cursors are drawn (XOR mode for you programmers). Just pick something that looks reasonable.

The Display Attribute Dialog Box (General Usage)

This dialog box has the following items in 7 columns from left to right.

Column	Description
1	Checkboxes to allow you to enable/disable plotting of the component whose name is listed in column 2. If these are line attributes, the checkbox enables plotting of the item; if these are fill attributes, the checkbox enables filling the item (polygons & point symbols).  For convenience, the 'Plot All (Set/Clear)' button below this column allows the entire table of checkboxes to be cleared or checked as required.  Click once to clear all checkboxes, click again to set them all.
2	Names/descriptions of the individual items in the file (read-only)
3 & 4	Scale factors which are appropriate to the display of the variable (in many cases, these columns will be invisible).
4, 5, 6	Samples of the line or text to be drawn.  You must first select one of these sample drawings before attempting to select a line style or colour.
7	If there are more than 10 items listed in the dialog box, then a scroll bar appears in column 7 at the right side of the dialog box, allowing you to scroll the list up or down to change the attributes of other variables.

At the bottom of the attribute dialog box are 1-3 button tables containing:

·	7 fill patterns (if the dialog box is for polygon fill colours)

·	5 line styles (if the dialog box is for lines or text)

·	16 colours (always)

You assign a colour or line style to a variable by selecting the sample box first and then clicking on one of these line style or colour buttons.  If you wish to use different colours, you may select 'More Colours' and the standard Windows colour selector dialog box appears (see Section 8.2.1.1.1).  You can then copy colours from the palette to the table of 16 colours.  When you exit with OK, you will see the new table of 16 colours.

If the sample box (column 4,5,6) contains the word 'Text', then the colour buttons specify the text colour and the line style & fill pattern buttons have no meaning.  If the sample box does not contain a line, then the colour buttons specify a 'fill' colour (i.e. for a polygon) and the line style buttons have no meaning.  If none of the items requires the line style table or the fill pattern table, they do not appear in the dialog box (invisible).

At the top of each column of line/text samples (columns 4,5,6) is a button labelled A, B or C.  Selecting this button allows you to choose a background colour for that table.  The letter A, B or C of the current attribute table is highlighted by enclosing it in triangular parentheses, i.e. <A>.  You may select A, B or C as the current display attribute table by clicking the Attribute Table button in the dialog box (see next Section 8.2.1.1.2).

See Section 8.2.3 for a discussion of polygon line & fill colours, fill colours and fill patterns as used by BOB and BLC files.


Editing Custom Colour Table
8.2.1.1.1 Choose Colour

This is a Windows 3.1 standard dialog box for selecting colours.  The table of 16 colours (which appeared in the Attribute dialog box at the lower right) is shown at the lower left.  The basic idea here is to select a colour from the palette and copy it to the table of 16 colours, thus over-writing one of the colours already there (you can have only 16).

Procedure (not obvious)

1.	click on one of the 16 colours to 'set' the destination

2.	click on one of the predefined colours to 'set' the source or click on the multicolour palette box (or type in HLS or RGB values) to set the colour in the large box

3.	click on 'Add to Custom Colours' to copy the colour to the 16-colour table

When you have finished, press Ok to return or Cancel to quit.  When you have returned to the Attribute dialog box, you will have a new set of colours from which to choose.

Note that defining a new colour in the 16 colour table does not affect the drawing of any attributes that used the old colour - SurView remembers only the (r,g,b) colour definition from the 16 colour palette (it copies it), not the colour number 1-16.


Selecting Attribute Table A,B,C
8.2.1.1.2 Drawing Attribute Table A,B,C

This dialog box allows you to select the current table (A, B or C) of drawing attributes for a specific BOB, BLC or SLD file.  It is also used to select one of 3 tables of general drawing attributes (background colours, cursor colours etc) for the map view and the stacked profile view.  See Section 5 for a general discussion of drawing attributes and the use of colour tables A, B & C.


Filters, Plot Modes, Wrapping & Clipping
8.2.1.2 Survey Line Data (Filters, Wrap, Clip)

This dialog box is an extension of the display attributes (colours) which appears elsewhere.  Although the colours & line styles are also 'presentation' attributes, these are more associated with the appearance of the data, rather than the appearance of the lines.

Here you can choose filters for each variable in a profile map or stacked profile display:

·	filter types (5, 7 and 9-point low-pass filters - see below)

·	no. of times to apply filter (0, to suppress filter)

Filters

The low-pass filters available are 5, 7 and 9-point least-squares polynomial smoothing filters (see "Smoothing and Differentiation of Data by Simplified Least Squares Procedures" by A. Savitzky and M.J.E. Golay, Analytical Chemistry, 1964, Vol. 36, No. 8, pp 1627-1638 and "Application Hints for Savitzky-Golay Digital Smoothing Filters" by M.U.A.Bromba & H. Ziegler, Analytical Chemistry, 1981, Vol. 53, pp 1583-1586).  The filter coefficients are:

5-point:	-3, 12, 17, 12, -3	(normalized by dividing by 35)

7-point: -2, 3, 6, 7, 6, 3, -2	(normalized by dividing by 21)

9-point: -21 14, 39, 54, 59, 54, 39, 14, -21	(normalized by dividing by 231)

Stacked Profile Items

If these attributes are for profile maps, then there is nothing more to see.  However, if you are viewing attributes for stacked profiles, then there is much more in this dialog box:

Type of Plot (Point, Step)

Normally radiometric data is drawn in 'step' mode, reflecting the nature of the statistical sampling process.  Variables like radar altimeter, magnetic and VLF are normally drawn in 'point' mode

Type of Clipping (Clip min, Clip max, Clip both, Wrap)

Depending on the scale factors used for the stacked profile display, the data may or may not extend past either end of the 'y' axes.  You may clip the data at the top or bottom (or both) ends of the 'y' axis.  Alternatively, you can choose to 'wrap' the data between the endpoints of the 'y' axis.  'Wrapping' is difficult to explain, but basically it involves resetting the data value to the other end of the 'y' axis each time it extends past one end of the 'y' axis.  This allows the full detail of the data to be displayed without using a lot of space.

Note that these clipping & wrapping options only affect the data if the scales are set in such a way as to cause the data to extend past the 'y' axis.


Proportionally Scaled Symbols for SLD Files
8.2.1.3 Survey Line Data (Proportionally Scaled Symbols)

These attributes control the appearance and size of symbols plotted along flight lines.  The symbols are proportional to the measured values of a selected SLD variable: any one or more of the SLD variables may be enabled for plotting symbols.

The following examples illustrate some of the possible uses of this feature:

"Plot an 8 mm fixed size red circle at all locations where the radar altimeter exceeds 400 m and also plot a green triangle at all locations where the Uranium value exceeds 30 ppm"

"Plot a blue square (outline only - no fill) for the magnetic total field, plotting every single point and scaling the size of the circle from 0 to 10 mm, for the data range 50,000 to 70000 nT"

The colour of the symbol outline and the fill colour are edited using the same dialog boxes used for polygons and point symbols in BOB files (see Section 8.2.3).  In addition to colour selection, these dialog boxes also provide a mechanism for suppressing the symbol outline and/or symbol fill.

The data range for drawing symbols can be entered as the actual data range or a specific range of values: if the data is outside the range, the symbol can be suppressed or 'clipped' (plotted at the minimum or maximum size).  The minimum and maximum size of the symbol can be specified: fixed-size symbols are drawn if these 2 values are equal.  The symbols are drawn using the same rules and scaling methods that are used for point data in BOB files (see Section 8.2.3.1).

Note:

The line & fill colours and scale factors for point data in BOB files can be saved in the BOB file when the file is removed from the File Display List.  However, these same attributes can not be saved for symbols drawn using SLD data (other SLD attributes such as line colours and profile map scale factors can be saved, but not the symbol attributes).


Display Attributes (grid files)
8.2.2 Edit (Grid Files)

This dialog box allows you to do the following:

·	choose a new palette file

·	choose a new data levels file

·	build a histogram of the grid file to show the relative amount of each colour used

·	edit current data levels:

· individually

· in groups by interval

· in groups by range

· equal-area for each colour (requires histogram)

·	create a new levels file (save levels)

The palette & data level information shown in this dialog box is initially read from the GRX file.  If you make any changes (different palette and/or data levels file), then SurView will ask you if you wish to update the GRX file when you remove the file from the File Display List or terminate SurView.

The dialog box has 5 display areas or groups of controls:

Colour Palette Display

The large rectangular display area at the top of the dialog box shows all of the colours in the current palette.  Each colour is plotted as a vertical bar, parallel to the Y axis.

The width of each colour bar depends on the data level values which bound the colour.  A tick mark is drawn along the X axis at the location of each data level boundary value (long tick marks every 10 colours).

If no histogram exists, the height of each colour bar is equal to the height of the Y axis, otherwise, the height is proportional to the amount of each colour in the grid picture.  It is important to realize that the proportion of each colour is represented by the height of the colour bar and not by the area of the colour bar, particularly if the widths of the bars as defined by the data levels are visibly different.

If the mouse cursor is moved inside the histogram display, it changes from an arrow to a cross-hair cursor.  As it is moved around, the colour number [1,n] and data levels [min,max] for the colour beneath the cursor is displayed below the histogram.

Palette File

This group shows the current palette filename and the no. of colours.  You may select a new palette file by clicking 'New'.  Note that if the new palette file contains a different no. of colours than the current file, SurView will warn you that it will discard the current data levels and generate a linearly spaced set of data levels based on the [min,max] range of the data and the no. of colours in the new palette.  You may cancel selection of the new palette file at this point if you wish.

Levels File

This group shows the current data levels filename.  If the GRX file did not contain the name of a data levels file, this field will be blank.  You may select a new data levels file by clicking 'New'.  The new data levels file must contain NCOLOUR-1 values if the no. of colours in the current palette is NCOLOUR.  SurView will verify the file is correct before using it.

The 'Save' button is disabled if the data levels have not been modified during the time the dialog box has been displayed.  If you edit the levels, the current data levels filename appears 'grayed' and the Save button is enabled, allowing you to save the levels to a new file.  After you save the levels to a new file, that data level filename appears in the group and the Save button is disabled.  If you modify the data levels, but do not save them to a new file, you will have an opportunity to do so when the GRX file is removed from the File Display List (or when SurView terminates).

Histogram

This group is used to create a histogram of the grid file to allow you to see the distribution of colours used to draw the picture.  The two edit controls to allow you to specify the [min,max] range before clicking 'New' to create a new histogram.   The default values represent the actual range of data in the file: you may wish to adjust these values to exclude spurious values from the histogram.

The 'Set Levels for Equal Area' button is disabled if the histogram does not yet exist.  Once the histogram exists, you may click this button to compute data levels which result in an equal no. of grid data cells being painted with each colour in the palette.

Edit as Text

This last group of controls is somewhat more complex than the other groups.  It allows you to edit the data levels as numeric values using an editor.  When you click any of the three buttons: Individual, Interval or Range, the data levels are copied to the mini-editor control to the right of the buttons.  All of the other buttons in the dialog box become disabled, leaving only the mini-editor and Ok, Cancel and Help.  When you have finished editing the values, press Ok, to accept them and redraw the histogram or press Cancel to quit, leaving the data levels unmodified.  After pressing Ok or Cancel, the mini-editor is disabled and all of the other controls are enabled once again.

1. Individual

In this mode, all of the NCOLOUR-1 data levels appear in the mini-editor for editing.

2. Interval

In this mode, you may define several groups of colours, each with a different data interval.  At the top of the editor display, you must specify the minimum value, i.e. the data level at the boundary between colours 1 and 2.  Following that are as many groups of colours as you wish, each defined by the no. of colours in the group and the interval or increment between the colours.  The sum of the no. of colours in all of the groups must be NCOLOUR-2.  For example, if the no. of colours in the current palette is 9:

0	!minimum or starting value (boundary between colour 1 & 2)

2	0.3	!2 colours, each separated by 0.3

4	0.1	!4 colours, each separated by 0.1

1	0.2	!1 colours, each separated by 0.2

The 8 computed data levels are:

____________________________________________

|   1   |   2   |   3   |   4   |   5   |   6   |   7   |   8   |   9   |	colour number

        0      0.3    0.6     0.7    0.8    0.9    1     1.2	data level

3. Range

This mode is similar to the Interval mode above, but instead of specifying the interval between each colour in the group, you specify the data level at the top of the group.  The bottom level of each group is the top level of the previous group.  Using the same example as above, the same 8 levels can be generated by the following:

0	!minimum or starting value (boundary between colour 1 & 2)

2	0.6	!2 colours for the [0    , 0.6] range

4	1.0	!4 colours for the [0.6 , 1.0] range

1	1.2	!1 colour   for the [1.0 , 1.2] range


Choosing a Palette for a Grid File
Grid File Attributes (Choose Palette File)

You are using a standard Windows 3.1 file selector dialog box to select a new ASCII palette file containing colour definitions for displaying the current grid file.

The file selector starts up in SurView's home directory (since that is usually where the *.RGB/CMY palette files will be kept), however you may choose a palette file from any drive and/or directory.

You may select various disk drives and directories using the 2 listboxes on the right.  Simply double click on the required drive or directory to select it.

The current filename template is shown at the upper left: you may choose a different template from the list box at the lower left.  Each time you change the template or choose a new drive or directory, the list box fills with the names of files which match the template.  A filename extension of RGB is used for (r,g,b) palettes and CMY for (c,m,y) palettes.  You may also use any other filename extension you wish, however if it is not CMY, it is assume to contain an (r,g,b) palette.

To choose a file, either click it once and then press OK or just double click the filename.

If you choose Ok, the dialog box closes, the file is read and if there are no errors, the new palette is defined.  The name of the palette file to be used when displaying the grid is stored in the GRX specification file. If you change the palette here, when SurView terminates, you will be asked if you want to update the GRX file with the new palette filename.


Choosing Data Levels for a Grid File
Grid File Attributes (Choose Level File)

You are using a standard Windows 3.1 file selector dialog box to select a new ASCII file containing data levels to be used when converting grid data values to colours in the current palette.

The file selector starts up in the directory in which the grid file resides, since that is where the data levels files will usually be kept.  However, you may choose a level file from any drive and/or directory.  You may select various disk drives and directories using the 2 listboxes on the right.  Simply double click on the required drive or directory to select it.

The current filename template is shown at the upper left: you may choose a different template from the list box at the lower left.  Each time you change the template or choose a new drive or directory, the list box fills with the names of files which match the template.  The suggested data levels filename extension is LVL, however you may use any filename extension you wish.

To choose a file, either click it once and then press OK or just double click the filename.

If you choose Ok, the dialog box closes, the file is read and if there are no errors, the new data levels are defined.  The name of the levels file to be used when displaying the grid is stored in the GRX specification file. If you change the file here, when SurView terminates, you will be asked if you want to update the GRX file with the new levels filename.


Object File Attributes (Polygons & Text)
8.2.3 Object & Contour File Attributes

BOB & BLC files have exactly the same format and both types of files can contain open and closed polygons, text and points.  However, BLC files usually only contain open polygons (lines).

Overview of Polygon Styles

The 'Plot?' checkbox in the dialog box for line & fill colours represents two entirely different options:

1.	Disable/enable plotting of the polygon or point symbol entirely

If you select 'Line Styles & Colours', then the checkbox is used to enable/disable plotting of the entire polygon: the samples show the current line colour and style. For convenience the same checkbox also appears in the 'Scale Factors,Symbol Type' dialog box for points.  You may enable/disable drawing the symbol by using either checkbox: they are identical.

If the dialog box is displaying line styles for polygon outlines, there is a third possibility for this checkbox (in addition to the checked/not checked options described above).  This third option is 'greyed', i.e. neither checked or unchecked.  In this state, the polygon is enabled for plotting (as if it was checked), but the line itself will not be plotted.  For simple polylines (unfilled polygons), this is the same as unchecked, but for filled polygons it means the polygon outline will not be plotted (the effect is almost the same as the line colour being equal to the fill colour).

2.	Disable/enable filling the interior of the polygon or symbol (just draw outline)

If you select 'Fill Styles & Colours', then the checkbox is simply used to enable/disable filling of the interior of the polygon in the indicated colour.

If the Plot? flag is not selected in the Line attribute dialog box, the equivalent checkbox in the Fill attribute dialog box is disabled, indicating that it has no effect since the polygon or symbol is not being plotted.  However, the fill colours can still be modified for that item: they will not be seen until the item is re-enabled for plotting.

These options can be combined in several different ways to provide several methods of displaying each group of polygons or point symbols (most symbols are just polygons):

Polygon/Point Plot Type	Line Attribute Dialog Box	Fill Attribute Dialog Box
Don't plot the polygon at all	Clear the 'Plot?' checkbox.
Plot polygon outline only	Check the 'Plot?' checkbox. Select a line colour for the polygon outline.	Clear the 'Plot?' checkbox.
Plot polygon with a solid fill colour	Check the 'Plot?' checkbox. Select a line colour for the polygon outline.	Check the 'Plot?' checkbox. Select the 'blank' fill pattern. Select a solid colour.
Plot polygon with a solid fill colour and a fill pattern on top	Check the 'Plot?' checkbox. Select a line colour (used for both the polygon outline & fill pattern).	Check the 'Plot?' checkbox. Select a solid colour. Select a fill pattern. Clear the 'Transparent' checkbox.
Plot polygon with only a fill pattern, allowing the background to show through	Check the 'Plot?' checkbox. Select a line colour (used for both the polygon outline & fill pattern).	Check the 'Plot?' checkbox. Select a fill pattern (‡). Check the 'Transparent' checkbox (‡).
Any of the above 3 fill types, but without plotting the polygon outline.	Set the 'Plot?' checkbox to the third state, i.e. 'greyed'.	Same as above: depends on what fill type is required.

‡Note:	'Transparent' mode only works with the 6 pre-defined hatch styles and not with user-defined patterns.  It seems to be an unadvertised 'feature' of Windows.


Point Attributes
8.2.3.1 Point (Symbol) Attributes

This dialog box contains a complex set of controls which can be ignored for simple points (towns, cities etc.), but which are useful for aiding in the selection of appropriate scaling factors for point symbols used to plot Geochemical data.  Since the 'point' entity is a general purpose feature of SurView for drawing any kind of symbols, it is up to the user to know if the statistics have any meaning for the points:  SurView can not tell the difference between point symbols for towns and cities and those which represent Geochemical data.

Briefly, the point symbol size is scaled according to the 'value' of the sample.  For Geochemical data, the 'value' is the measured concentration of the element that is represented by the point.  Typical units are ppm, ppb and %.   The initial values of the scale factors were specified in the AOB file which was then compiled to create the BOB file.  See Appendix D.4 for a description of the input AOB file format and more information on the meaning, derivation and interpretation of the values you see in this dialog box, including the scaling equation.

This dialog box has several distinct areas:

1. Plot? Checkboxes (upper left)

These checkboxes are used to enable/disable plotting of the set of symbols associated with each point style.  These flags are identical to those which are found in the 'Line Attributes' dialog box.  You may use either: they are duplicated here for convenience, since selecting symbols to plot from this dialog box is more intuitive than using the other dialog box (which is more meaningful for other polygons).  If you wish to modify the line or fill colours, use the Line Attribute & Fill Attribute dialog boxes.  The latter also allows you to enable/disable the interior fill of the symbol.

2. Point Style Names (upper left)

This is the name of the point style as supplied by the #PointStyle declaration in the AOB file.  For simple points it may be just 'city', but for Geochemical data it will probably be the name of the element and the units (i.e. "Gold (ppm)").  You may click the name in the dialog box (or the symbol itself  - see next section) to 'select' it for displaying statistical data, viewing a graph of the data distribution or simply changing the symbol type.  You must 'select' a point style/symbol before you can see the statistics or the data distribution.

3. Symbol Types & Angle of Rotation (upper left)

This is a drawing of the symbol type currently being used to draw the point.  It is drawn using the current line & fill colours & pattern.  Use the dialog boxes for those attributes to change the colours (see Section 8.2.1.1).  You may click the symbol to 'select' it (or click the 'name' - see previous section).  The angle of rotation can be varied to create different symbols.  For example, a 'square' rotated 45 degrees becomes a 'diamond'.

4. Scale Factors (upper centre) & Scaling Equation (centre right)

These 5 values are used to compute the size of the symbol to be drawn for each point value. The equation below shows how the scale factors are used.  The value of 'z' is read from the BOB file for each symbol (units for z, Zmin & Zmax are usually indicated in the point style name shown).  Positive values of Smin & Smax are interpreted as mm; negative values are assumed to be in map projection metres which means that the symbol size is tied to the map scale, just like any other polygonal feature.  Zooming in will make the symbol larger.  Regardless of which system is used, both Smin & Smax must have the same positive or negative sign.

If Zmin & Zmax were both 0 in the original AOB file, SurView replaced them with the actual [min,max] range of the data for that point type when the AOB file was compiled to produce the BOB file.

By default, all points are plotted, even if the value lies outside the [Zmin,Zmax] range, in which case the size is set to Smin or Smax.  If the option:

"Plot if outside [Zmin,Zmax]"

is left unchecked, then points whose value lies outside the [Zmin,Zmax] range are not plotted at all.  The scaling equation and scale factors are also discussed in the description of the AOB file format in Appendix D.4).

To disable all scaling, simply use E=0 and the equation simplifies to r = Smax.  You may then set an appropriate value of Smax for the fixed symbol size.

5. Drawing Area for Data Distribution (lower left)

When you select a point style by clicking either the style name or the symbol itself, SurView will draw a graph in this area which depicts the distribution of the data.  Each sample is drawn as a small 'dot' or 'cross'.

The X axis is the actual value 'z' of the sample (or the log10 of the value if the "Log(z)" checkbox to the right is checked).

The Y axis is the 'Normal Quantile' (nq) and is generally in the range [-3,+3].   It is a normal representation of the cumulative probability of each value.  SurView expects the data to be in descending order (i.e. from largest to smallest), so the cumulative probability is:

p = (N - i + 0.5)/N	N is the number of samples in the data set

i is the inverse rank of the sample

For i=1 (the largest value):

p = (N-0.5)/N = ~1	(for large N)

and for i=N (the smallest value):

p = 0.5/N = ~0	(for large N)

The normal quantile is estimated from the cumulative probability using the following:

 2

t =-ln(p*p)	if p <= 0.5

 2

t =-ln(q*q)	if p > 0.5	(q=1-p)

     2.30753 + 0.27061*t

nq=-t + ---------------------------

  1 + 0.99229*t + 0.04481*t*t

nq=-nq	if p> 0.5

For example, if N=100:

value	inverse rank i	p	nq
largest	1	0.995	+2.02
median	~50	0.500	0
smallest	100	0.005	-2.02

6. Smart Cursor Display Area (centre)

The space limitations in the drawing area and in the dialog box prevent SurView from showing a 'proper' labelled X & Y axis for the data distribution graph.  As an alternative, an interactive smart cursor was implemented instead.  When the usual arrow cursor is inside the graph boundaries, the display area shows 3 values which correspond to the current cursor location:

z:	'X axis value', z or log10(z)

nq:	'Y axis value', normal quantile

cp:	'Y axis value': cumulative probability

Two additional points of reference are provided by vertical lines at z=Zmin and z=Zmax.

7. Statistics Display Area (centre right)

This area shows the no. of points in the currently selected data set (N), the mean value, the standard deviation and the [min,max] range of the data set.

8. Table of Standard Percentiles (centre right)

To the right of the statistics area is a drop-down list of 20 standard percentiles.  Selecting a value from this list does nothing - it is for information purpose only.

9. Symbol Type Buttons (bottom centre)

This set of buttons allows you to change the style of the symbol for the currently selected point style (select by clicking the style name or symbol at the upper left of the dialog box).  If you wish to change the colours used to draw the symbol, use the dialog boxes for the line and fill colour attributes.

Selecting Point Styles to Plot

This dialog box is only used to work with items which are specific to sets of points in the BOB file.  You may use the 'line attribute' dialog box to enable/disable plotting of selected point styles as well as change the line colour used to draw the symbol.  You may also use the fill attribute' dialog box to enable/disable filling the symbol (i.e. if you want just the outline) and to change the fill colour and style for the symbol.  These two dialog boxes are used in the same manner as you would edit the attributes for any other polygon or text item in a BOB file.  For further information, see Section 8.2.1.1 and Section 8.2.3)


Shape File Attributes
8.2.4 Edit (ASX Shape Files)

This menu item is used to display a dialog box to edit the entries in the ASX file.  See Appendix D.11.2 for a complete description of the individual items.

There are 3 items, each corresponding to an entry in the ASX file. Each item is associated with a fixed value (same for all lines or polygons) or a lookup or 'theme' table. Some items may be disabled, depending on the content of the SHP or SHS file:

Line	- for polylines (arcs), polygons

Fill	- for polygons only

Pattern	- for polygons only

The items are:

1.	The Line attribute can consist of fixed values:

- line colour

- line style

for all lines in the .SHP/SHS file, or it can be a theme (only LINE themes are listed).

2.	The Fill attribute can be a fixed value:

- fill colour

for all polygons in the .SHP/.SHS file, or it can be a theme (FILL & PATTERN themes are listed).

3.	The Pattern attribute can consist of fixed values:

- pattern colour

- hatch style

for all polygons in the .SHP/.SHS file, or it can be a theme (only PATTERN themes are listed).

Normally, for each LINE, FILL or PATTERN attribute, you can only select a theme of the same type. However, a PATTERN theme is also allowed for the FILL attribute: the pattern is ignored and the pattern colour is used for the fill colour.

For fixed colours, you may enter NONE (to suppress plotting the entity), or any of the reserved colour names (RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, BLACK, WHITE, etc) or you may enter an RGB(r,g,b) or CMY(c,m,y) or RGB%rgb or CMY%rgb triplet such as RGB(100,200,50) or CMY%234.  See Appendix F for a complete description of the colour names.

For the line style in a LINE theme, choose from one of the reserved names in the drop-down list. For the hatch style in a PATTERN theme, choose from one of the reserved names in the drop-down list. These style selections are ignored if the colour is 'NONE'.

ASX entries which used the '@field' syntax, will show a list of themes that are available in the 'theme' file, with the current theme selected at the top.

Temporarily Disabling Line/Fill/Pattern

If you are currently viewing a SHP file with a specific line colour and/or fill colour and/or pattern, you can temporarily disable any of these features with the Enable checkboxes. For example, if you are viewing a polygon file with black outlines and a table of fill colours, you may want to temporarily disable the fill so you can see just the outlines of the polygons. Or you may wish to disable the polygon outlines if the polygons are very dense and the lines obliterate the fill colours.

Polygon Requirements

At the bottom of the dialog box, there are 2 checkboxes which are enabled only if the .SHP/.SHS file contains polygons. SurView looks up a fill colour and a pattern colour/style for each polygon from the .DBF file.  This lookup may or may not be successful (obviously the 'lookup' will always 'succeed' if the colour is fixed, i.e. 'NONE' or 'RED').  For example, if the fill colour is based on the geological formation name, the lookup may fail because the polygon has no formation name (it is blank).  If both colour lookups fail, then the polygon is not drawn. But SurView needs to know how to draw the polygon if one lookup succeeds (i.e. the fill colour), but the other lookup fails (i.e. the pattern colour).  The checkboxes allow you to specify whether the fill and/or pattern colour is required in order to draw the polygon. You can check none, either or both.


Display Attributes (other)
8.2.5 Edit (Other)

This menu item allows you to view and modify the display attributes of some drawing features which are separate from the variables of each file:

·	reference grid lines (line styles & colour as well as enable/disable plotting of grid)

·	reference grid line spacing

·	zoom cursor line style & colour

·	pan cursor line style & colour

Zoom/Pan Cursors

Note that the cursor styles here are used only for zooming/panning on the map view.  The equivalent cursors for the stacked profile have their own attributes.

The cursor lines are always visible, because they are drawn in a special XOR mode to provide a colour which always contrasts with the underlying map colours, but with varying success, hence the ability to change the cursor colour.  For this reason, the selection of the cursor colours is somewhat of a trial and error operation.

In addition to these 'base' values of colour & line style for the zoom/pan cursor, the values can be changed temporarily 'on the fly' while using the zoom/pan cursor (see Section 6.1)

Map Reference Grid Spacing

For the initial map display, suitable values are chosen for the X & Y spacing (metres) of the reference grid lines to ensure that there is sufficient detail, but not enough to clutter the picture.  If  the window is resized (forcing a re-draw of the picture), these values are re-computed.  At any time, you may enter other values for the X & Y grid line spacing in this dialog box.  Subsequent re-drawing of the picture will then use those values for drawing the grid lines.  As always for this dialog box, entering both values as 0 will restore the original values which were present when the dialog box was entered.  Use -1 for both values to re-enable automatic (dynamic) computation of the X & Y grid line spacing.


Copy to Clipboard (map)
8.2.6 File | Copy to Clipboard

When this option is selected, SurView displays the Zoom/Pan cursor and allows you to select a portion of the current picture for copying to the clipboard.  In addition to the standard zoom/pan operations, you may also press the TAB key to allow you to change the aspect ratio of the zoom/pan rectangle.

Once you have outlined the area to be copied, press ENTER to copy the region to the clipboard.  At any time, you may press ESC, Q, DELETE or DEL to exit zoom/pan mode without copying anything to the Windows clipboard.

For further information, see Section 6.2.


Zooming/Panning on Map
8.3 View

8.3.1 View | Zoom

See Section 6 for full information on the operation of the zoom/pan cursor.


Unzooming Map View
8.3.2 View | Unzoom

If you have zoomed or panned only once on the map, then choosing View | UnZoom will automatically restore the previous view.  However, since there is more than 1 previous view, this dialog box has appeared to ask you to choose which view you wish to restore.  SurView only remembers the last 5 views.

If you press the Ok button, the new view will be the view which is drawn with cross-hatched red lines.  Use the Cycle button to cycle through the list of views (the other views are drawn in yellow).   The easting and northing limits shown at the bottom of the dialog box are for the current selected view drawn in red.


Map Redraw
8.3.3 View | Redraw

SurView draws the map view by plotting the data from each of the files in the File Display List (in the order they appear).  While it is plotting, you may cancel plotting the current file with the ESC (escape) key.  The window caption will show <<<interrupted>>> momentarily to inform you that the rest of the file will not be plotted.  If you wish to redraw the map, you can select the 'Redraw' menu selection.


Tile Map Windows
8.3.4 Tile Map Windows

These two menu selections (Wide & Narrow) are only valid if more than 1 copy of SurView is running.  Minimized copies of SurView are not included in the tiling procedure.

Multiple copies of SurView are useful when you wish to view more than one GRX grid file or SLD line data file at a time: simply start up another copy of SurView, whether the files belong to the same survey or not.  Tiling allows you to quickly re-size all of the map windows to facilitate comparison of the data views.

There are two methods of tiling N map windows:

Wide	All of the maps are redrawn with full screen width.  The height of each window is equal to 1/N of the screen height.

Narrow	All of the maps are redrawn with full screen height.  The width of each window is equal to 1/N of the screen width.


Tile Stacked Profiles
8.3.5 Tile Stacked Profiles

These two menu selections (Wide & Narrow) are only valid if at least two windows have been created to view stacked profile data (see Section 8.6.1).  SurView finds all of the stacked profile windows that are not minimized and re-draws them with equal sizes and no overlap on top of the map view window.

Tiling allows you to quickly re-size and re-draw all of the stacked profile windows for easier comparison.  Since SurView will not tile stacked profile windows that are minimized, you can minimize those windows you do not wish to view before selecting the Tile menu item.

There are two methods of tiling N stacked profile windows:

Wide	All of the stacked profiles are redrawn with full screen width.  The height of each window is equal to 1/N of the screen height.

Narrow	All of the stacked profiles are redrawn with full screen height.  The width of each window is equal to 1/N of the screen width.

These Tile menu items are available on the View menu of the map view and on all of the stacked profile windows.


Smart (E,N) Cursor for Map View
8.3.6 View | Smart (E,N) Cursor

This menu selection toggles the appearance and disappearance of a small moveable window that continually displays the current (easting,northing) co-ordinates of the mouse cursor as it is moved around the map view.  The window can also be closed using the 'Close' option on the system menu of this window (extreme upper left).

The system menu of the smart cursor window also contains 6 additional menu selections which allow the display to show one of:

·	projected (easting,northing) co-ordinates

·	geographic (longitude,latitude) co-ordinates (NEWS d,m,s)

·	geographic (longitude,latitude) co-ordinates (NEWS degrees)

·	geographic (longitude,latitude) co-ordinates (signed degrees)

·	NTS map sheet number

·	UTM Zone number (this is based on the longitude and is independent of the current projection)

·	grid (column,row) and data value (only if the File Display List contains a GRX file)


Grid Legend
8.3.7 View | Grid Legend

This menu selection is only valid if the File Display List contains a GRX file.  It toggles the appearance and disappearance of a window showing the grid legend for the current grid data file referenced by the GRX file.

Types of Grid Legends

There are 3 types of legend displays, depending on the no. of grid files being displayed, as specified in the GRX file:

1 File (Filename= in the GRX file)

The legend is a vertical or horizontal colour bar, divided into cells, one for each colour contained in the 'palette' file (as indicated by the Palette= entry in the GRX file).

2 Files (Composite=CMY/RGB in the GRX file)

The legend is a vertical 'bar', showing a blend of the two colours used to display each of the files.  For further information, refer to the Composite= description for the GRX file).

3 Files (Composite=CMY/RGB in the GRX file)

The legend is a triangle, showing a blend of the three colours used to display each of the 3 files.  For further information, refer to the Composite= description for the GRX file).

The legend is displayed in a window which appears over the main map window.  This window is drawn differently than most other window - the background is transparent so that you always see the map.  This allows you to place the grid legend more accurately on the map than if the background of the legend window was opaque.  However, there is also an option (in the Configuration dialog box - see below) to draw a white background for the window, erasing that portion of the map which lies beneath it.

The legend window can also be moved differently than most other windows.  As for all other windows, you may move it by clicking and dragging the window 'title' or 'caption', but you can also click and drag anywhere in the window.  This allows the legend to be placed anywhere on the map, even if the window 'frame' or 'title' is outside the display area.

Resizing the Legend

The legend window can be resized to make the legend any size you wish.  It can be made larger for viewing on the screen or smaller for printing.  As it is resized, all of the individual items that make up the legend are re-scaled.  Generally speaking, they are proportional to the height of the window.  If the legend is a horizontal colour bar (for a single grid file), the items are proportional to the width of the window.

For the single grid file colour bar, the aspect ratio of the window governs the shape of the colour bar.  If the window is wider than it is high, the colour bar is drawn horizontally, otherwise it is vertical.  The length of the window edge parallel to the colour bar governs the length of the colour bar.  That length is divided into N cells (where N is the no. of colours in the current palette).  All other dimensions are proportional to the cell 'height' (whether vertical or horizontal, the 'height' of the cell is defined as the dimension parallel to the colour bar).

For the composite image of 2 grid files, the legend is similar to the colour bar, except that it is always vertical and the width is always 0.2 X the height of the bar (I was lazy).  All other dimensions are expressed in terms of the height of the bar.

The height of the equilateral triangle which is drawn for a 3-file composite image is governed by the height of the window.  All other dimensions are expressed in terms of the height of the triangle.

Configuring the Legend

The 'system' menu of the legend window (the small button in the upper left corner of the legend window) has 2 special items:

1. Configure Grid Legend

2. Quick Draw

The Quick Draw option is only enabled for a ternary (triangle) legend. It toggles the speed of the window by changing between 10 and 50 subdivisions of the triangle base (this setting is ignored when printing the triangle - it always uses 50 subdivisions).  While SurView is drawing the triangle, you may also cancel the drawing operation with the usual 'ESC' key.

The 'Configure Grid Legend' menu item brings up 1 of 3 different dialog boxes, containing options which are specific to each of the 3 types of grid legends.  You may also right-click on the grid legend window to bring up the dialog box.  Many of the items are common to all 3 dialog boxes:

- margins on all 4 sides

- one title at the top of the legend and another for the bottom

- title sizes as well as the spacing below and above the titles

In addition, there are different items which are specific to each type of legend:

Single File Colour Bar

There are fields for the no. of decimal places in the tick labels, the label interval (1=label every tick, 2=label every second tick, ...), the tick mark length and the gap between the end of the tick mark and the tick mark label.  All dimensions are expressed in terms of the height of a single cell in the colour bar.

Triangle (Composite, 3 files)

For the triangle legend, there are an additional 3 titles (one for each vertex) and a field for the height of these titles.  All dimensions are expressed in terms of the height of the triangle.

Composite (2 files)

The vertical bar has 2 titles, one for each end of the 'bar'.  All dimensions are expressed in terms of the height of the bar.

Labelling the Triangle Vertices or Bar Endpoints for Composite Images

The grid legend for a composite image (COMPOSITE keyword used in the GRX file) is either a triangle (3 images) or a bar graph.  The labels for these vertices/endpoints are supplied by the COMPOSITELABELS keyword in the [DESCRIPTION] section of the GRX file.  If it is missing, the filenames specified in the COMPOSITE directive are used for the labels.

Warning

The dialog box allows you to change the vertex labels, but it is important to note that you can NOT change the assignment of a variable (parameter) to a colour or a vertex simply by changing the label. That can only be done by changing the filenames in the COMPOSITE directive in the GRX file.

If the top vertex is labelled "U" then you can change the name to "eU" or "Uranium" or any other Uranium-related label.  Changing the name to "Thorium" will not associate the Thorium image with the colour of that vertex!!!

Printing the Legend

When the map is printed, the legend will be printed at the same location and size as the current legend window.  Note that the legend will only be printed if it is currently being displayed in the legend window.  If you use the 'white background' option, don't forget to shrink the legend window to minimize the size of the white rectangle that will be drawn behind the legend.


ASX Shape File Legends
8.3.8 View | Legends

The View | Legends menu selection is only enabled if the File Display List contains 1 or more ASX files which reference a theme (see Appendix D.11.2 for the ASX file syntax and Appendix D.11.3 for the format of the 'theme' file).  When the 'Legends' menu item is selected, it displays a sub-menu list of the current themes being displayed for all ASX files and their status (checked or unchecked).  Selecting a menu item toggles the appearance and disappearance of the window in which the ASX legend appears. You can also hide ('Hide All') or show ('Show All') all of the legends with a single menu selection.

If an ASX file is using a predefined 'theme', it is quite possible that there are other themes which can be selected.  Use the Edit | Display Attributes menu item to bring up a dialog box which allows the attributes of the ASX file to be viewed and/or modified.  The list of available themes will be displayed for either the 'Line Colour' or 'Fill Colour' attribute.

No. of Colour Cells

The no. of colour cells depends on the no. of colours in the theme file, but the legend might show a fewer no. of colours because it only makes a legend of the colours actually used to draw the .SHP or .SHS file. This allows a common theme to be used for several .SHP/.SHS files - the legend will be tailored to each individual .SHP/.SHS file.  For example, there may be 200 colours in a particular theme file, but perhaps the .SHP file only contains features that correspond to 50 of those colours. In that case, the legend will show only the 50 colours that are used.

Type of Colour Cell

If the ASX file refers to a .SHP/.SHS file containing lines (rivers, faults etc), then each item of the legend will display an empty cell with a coloured line inside.  If the .SHP/.SHS file contains polygons, the legend cells will be filled with the colour.  If the .SHP/.SHS file contains symbols, the legend cells will be ellipses, which can be made into circles by setting the cell width to 1 (X the cell height).

Automatic Sizing

You may resize the window containing the legend.  All of the dimensions are expressed in terms of the height of a single cell: the height of a cell depends on the height of the legend window and the no. of cells in each column. Changing the horizontal size of the legend window, just allows you to see more or less of the legend, but it does not change the size of the contents.  To change the size of the contents, change the vertical size of the legend window. Note that this behaviour is not the same as the grid legend (see Section 8.3.7), which adjusts the layout according to the aspect ratio of the grid legend window.

The legend window can also be moved differently than most other windows.  As for all other windows, you may move it by clicking and dragging the window 'title' or 'caption', but you can also click and drag anywhere in the window.  This allows the legend to be placed anywhere on the map, even if the window 'frame' or 'title' is outside the display area.

Configuring the Legend

When the legend appears, you can use the [--] system menu to select 'Configure Legend' or simply right click on the legend window to bring up the configuration dialog box.

All of the dimensions are expressed in terms of the cell height, so the general shape of the legend should remain constant as the legend window is resized in the vertical direction.  The cell may contain a line, ellipse (circle) or filled rectangle, depending on whether the colour theme is used for lines, polygons or symbols.

The 'Top' & 'Bottom'  titles are copied from the 'TITLE' & 'BTITLE' entries of the 'theme' file (see Appendix D.11.3zz.d.11.3). There will always be a 'Top' title, but the 'Bottom' title is optional.  You can suppress these titles by setting the title height to 0 or by deleting the title string.

The 'Cell Width' is nominally 3X the cell height: set it to 1 to make it square.  The 'Cell Gap' refers to the vertical space between the cells and the 'Label Gap' refers to the gap between the right edge of the cell and the label.  If you select 'Labels inside', you will probably need to increase the 'Cell Width' to make the cells big enough for the text.

If there are many colours, it is usually necessary to draw several columns of colour cells. For example, if you have 62 colours, you can enable the multicolumn option and specify 16 cells/column (14 in the last column). The cells are drawn from top to bottom, before starting a new column to the right.

There are 2 sets of labels, corresponding to the 'ITEM' (short labels) and 'DESC' (long labels) entries in the 'theme' file. The 'ITEM' values are usually the short codes or keys in the database and the 'DESC' entries are usually a longer description of the code. An alternate language description may also be available (if the optional DESC2 appears in the theme file and if the description is non-blank).

Subset Selection

You can select  a subset of the theme by clicking on the 'Select Subset' button. This brings up a dialog box containing all of the features that are used to draw the current .SHP/.SHS file. Initially, all values will be in a 'pre-selected' state. You can select 1 or more features by clicking, using shift-click and ctrl-click (see your Windows manual for details).  When you close this dialog box and close the configuration dialog box, the legend and the map will be re-drawn, showing only those features which have been selected.

Edit Colours

You can edit the colours for the current legend items (which might be a subset - see previous section) by clicking on the 'Edit Colours' button.  This brings up a dialog box containing the current list of features (possibly a subset) used to draw the current .SHP/.SHS file. A secondary window is also created to display 1 of several palettes.  Select 1 or more features from the listbox (as above) and then click a colour from the palette window to set the colour.  You can resize the secondary window containing the palette if you wish. Click on that window's [-] system menu to show a list of available colour tables. You may also load a colour table from an external RGB/CMY file.

Save Theme

This allows all of the colours for the current theme (FILL theme only) to be saved in a new .DBF file. This file may be referenced by an ASX file.  Note the following:

(a)	all of the colours in the lookup table are saved, whether or not they are currently being used for the current map (view) and whether or not they are part of the current subset (if any)

(b)	only the current 'active' theme is written out. Do NOT over-write the original .DBF file from which the colour table was read, because the original DBF file may contain several themes, of which the current theme is the 'active' theme.

Printing the Legend

When the map is printed, the legend will be printed at the same location and size as the current legend window.  Note that the legend will only be printed if it is currently being displayed in the legend window.  If you use the 'white background' option, don't forget to shrink the legend window to minimize the size of the white rectangle that will be drawn behind the legend.


Flight Line Options
8.4 Options

8.4.1 Options | Flight Line Options

This dialog box allows you to select various options for plotting flight lines from the SLD file.  Normally, flight lines are drawn as vectors of several hundred points without tick marks.  This menu selection allows you to select classes of flight lines to plot, enable and specify tick marks, and select a fast flight line mode.

Flight Line Selection

The SLD file contains information about the direction in which each flight line was flown.  If the flight line azimuth is 0 degrees (i.e. north-south lines), then the 'forward' direction is from south to north.  For any other flight line azimuth, the direction is determined by the X (easting) co-ordinate: a line flown from west to east (regardless of north-south trend) is considered to be flown in a 'forward' direction.

By default, all flight lines are plotted.  You may request plotting of various combinations of forward/reverse lines and odd/even numbered lines and traverse/tie lines.  Don't forget that you can also enable/disable plotting of flight lines entirely with the 'Plot' checkbox in the Attribute dialog box for the SLD file.

There are many combinations of flight line direction, line number sequence and line type.  Note that the dialog box shows the word 'AND' between the radio buttons for the forward/reverse selection and the radio buttons for the odd/even selection and the radio buttons for the line type.  For example, SurView can plot lines which are "forward AND odd", but it can not plot lines which are "forward OR odd".

Fast Flight Lines/Flight Line Tick Marks

By default, the flight lines are drawn as a series of (x,y) points exactly as flown and without tick marks.  Most flight lines are almost straight lines, so you can select 'Fast Flight Lines' if you wish to speed up the drawing of the flight lines.  If this mode is enabled, the lines are drawn as a straight line between the two endpoints.  Note that this mode is ignored when printing the flight lines on paper: they are always plotted with their actual co-ordinates.

You may also enable plotting of flight line tick marks, with or without labels.  When this is enabled, you can specify two record intervals:

·	the tick mark spacing

·	the tick mark label spacing (0 to disable)

The tick mark label spacing must be a multiple of the tick mark spacing.  The record numbers which are used to label the tick marks are always relative to each flight line as it was flown.  Normally, record 1 is the first record of each flight line, but this may not be true if the SLD file contains just a segment of the flight line.  See keyword #line_StartRecord in the description of the LXF file in Appendix D.2.2 for more information.

Note that the 'Fast Flight Lines' mode is disabled if you request tick marks on the flight line (it would be misleading to allow tick marks with unrealistic straight flight lines).

Flight Line Labels

By default, the flight line name/number appears at the start of the flight line.  This option allows you to disable plotting of these labels.  This is useful if there is too much 'clutter' in the picture.


Options | Use Alternate Language Where Available
8.4.2 Options | Use Alternate Language Where Available

This option enables the display of some text (where available) in an alternate language. It was added to allow the display of either english or french titles (BOB/BLC, GRX, ASX & FDL files), captions and ASX legend text.

Optional language items are specified with:

-title2	FDL file and/or SurView command-line

Title2=	GRX or ASX entry

DESC2	column of legend descriptions in ASX theme file

All of the above keywords are optional.  The phrase "where available" is important. Not all files will have been prepared with alternate titles.  This option is not a 'universal translator' of all existing text. If the alternate language title or description has not been supplied or if it is blank, the best that SurView can do is display the primary string, some of which may be blank, because they are also optional.

This option is a global setting. When it is toggled, all ASX legends are redrawn with the primary or alternate language labels. In addition, the SurView window caption may change to another language (if available).  Clicking the Info button in the File Display List dialog box will display the title of the file in the current language setting.

Limitations

The 2 titles are only available for GRX, ASX & FDL files.  The internal structures of AOB/ALC/LXF files has not been modified in any way to support 2 titles or any other dual language features, therefore all BOB/BLC/SLD labels, stylenames, variable names will be displayed only in a single language.


Use Alternate ASX Colour Table
8.4.3 Options | Use Alternate ASX Colour Table Where Available

If any ASX files reference a lookup table (theme), which contains an alternate colour table (COLOUR2 column in the DBF theme file, this option can be used to select that colour table. This is primarily intended to provide a mechanism to switch to a second table of colours which might be more suitable for printing.


Use Palette for Non-Grid Items
8.4.4 Options | Use Palette for Non-Grid Items

A palette (table of colours) is always created for grid colours for GRX files (see Section 8.2.2 & Appendix D.9).  This allows the colours to be shown as 'pure' colours (i.e. without using dithering patterns).

By default, if there is room in the palette table, colours from polygons (in BOB files) will also be added to the palette (as many as possible), allowing the polygons to be shown as 'pure' colours.  However, this may cause problems if SurView's picture is copied to the clipboard and then pasted into another application which does not support palettes (the colours will be wrong).  In these cases, it is better to disable the use of the palette for polygons (using this menu item) so that the polygons are rendered with dithered colours.  Such a picture can be copied to the clipboard and pasted into another application with a better chance of success.

There is currently no option to disable the use of the palette for grid files.


Right Mouse Button Pick
8.5 Pick

8.5.1 Pick | Right Mouse Button Mode

The RIGHT mouse button can be used to select:

·	an SLD flight line (for displaying stacked profiles)

·	a point from a BOB file (for displaying the sample identifier, i.e. for Geochemistry data)

·	a filled polygon from a BOB file (if the polygons have optional identifiers).

·	an open polygon (polyline) from a BOB file (if the lines have optional identifiers)

The availability and state of this menu item to configure the mouse button depends on the contents of the File Display List and is modified as files are removed from and added to the File Display List.  The text of the menu item changes and indicates the current state of the pick mode.  If it is disabled, there is only one (or none, if  the File Display List is empty) possible pick mode.  If the menu item is enabled for selection, then there is more than 1 assignment that can be made for the right mouse button,   Selecting the menu item will display a dialog box with 4 radio buttons: flight lines, points, polygons and polylines.  Each radio button is only enabled if the File Display List contains the appropriate file: an SLD file, a BOB file containing points or a BOB file containing polygons or lines with identifiers.

Picking Closed Polygons

When picking closed polygons, SurView uses a 'point lies within polygon' algorithm to find all polygons which contain the mouse pick point.  If there is more than one such polygon, the choices are listed in a menu for selection.

Tolerance (Threshold) Values for Picking Polylines & Points

For picking polylines (open polygons) or points, SurView uses a 'tolerance' distance to limit the search algorithm, with separate threshold distances for each type of features.  This allows these features to be picked simply by being 'close' to them.  Any line which has at least one point within the tolerance distance (radius) is 'picked'.

The tolerance value is recomputed each time the view changes (i.e. when the File Display List changes or when the picture is zoomed or unzoomed).  The value is computed as 1% of the smaller of the picture width and height.  For example, if the picture is 100,000 m wide and 75,000 m high, the tolerance is set to 750 m.  If you are having difficulty picking a line or point, increase the tolerance value so you don't have to pick as accurately.  If too many lines or points are 'picked',  decrease the value.

If more than one point is 'picked', an ellipse is drawn around the set of points (it may not be visible, depending on the size of the area) and the points are presented in a menu (maximum of 20 points), sorted by increasing distance away from the pick point.

Polygon Search

If the right button is enabled for picking polygons, a pair of radio buttons allows the mode to be selected.  SurView can stop on the first polygon it finds which 'contains' the pick point or it can search the entire file or set of files for all polygons which contain the pick point. If you know the polygons are mutually exclusive, the 'stop on first polygon found' option is a reasonable choice and is the default setting.

Miscellaneous

If you have a 3-button mouse, the MIDDLE mouse button is always reserved for picking points, so the RIGHT mouse button can be used for either SLD flight lines or BOB polygons or lines.  You can then pick both points and SLD flight lines without reconfiguring the right mouse button.

Note that the LEFT mouse button is always reserved for measuring distances on the map (see Section 8.5.2) and on the stacked profiles (see Section 9.4.2).

For further information on points, see Section 8.2.3.1 and Appendix D.4.2 for the AOB (BOB) file format.  Also refer to Section 8.5.1.3 and Appendix D.4.3 for information on picking points, lines and polygons.


Description/Action for Picked Polygon, Polyline or Point
8.5.1.1 AOI Text Description for Picked Polygon, Polyline or Point

If a BOB file has been created from an AOB file containing polygons, polylines and/or points which have individual (but optional) identifiers (supplied as the second parameter to #BeginPolygon), ...

For closed polygons, it is sufficient to click anywhere inside the polygon. For lines, it is necessary to be within the 'picking distance' which is set in the dialog box for right mouse button configuration (Section 8.5.1).   For points, SurView simply finds the closest point to the pick point.  See Appendix D.4 for the AOB file format and Appendix D.6 for the AOI file format.

If there is more than one polygon or line (i.e. superimposed), a short menu appears allowing you to select the polygon or line of interest.  You may cancel by clicking anywhere outside the menu or by pressing the ESC key.

SurView will read and display the information/description read from the corresponding AOI text file when the polygon, line or point is picked with the RIGHT mouse button.

The AOI text file containing the polygon, line or point descriptions must have the same name as the BOB file, (but with an AOI filename extension) and it must reside in the same location as the BOB file.  If the text file can not be found ( or if the polygon or line identifier can not be found in the text file, an "Information Not Available" message will appear.  Otherwise, the information will be displayed in a read-only display in a dialog box.

You may select all (default) or parts of the text and either COPY or APPEND the block to the Windows clipboard, for subsequent pasting into a text editor or word processor.  You may also use the Windows 'Clipboard View' application (in the Main group) to view the clipboard contents and save the contents to a disk file.  If the clipboard is empty or if it does not contain text (it might contain a bitmap), then the APPEND button is disabled.

The APPEND feature allows you to accumulate information for several picked polygons before pasting it into another application.  You may also use it to copy several parts of a single polygon description to the clipboard.


Displaying/Editing DBF Records for Picked Features
8.5.1.2 Displaying/Editing DBF Records for Picked Features

The pick id for point, polyline or polygon features may be created with a key to one or more records in a DBF file.  When the feature is picked and the DBF 'action' is selected (or if it is the default action), this dialog box appears to display the individual fields for the record(s) from the DBF file.  There are several references to ZFILES.DBF & ZLINKS.DBF in the following discussion - these files are optiona and allow SurView to show more complete information about the data in the records.  See Section D.7 for a complete description of these files.

The areas of interest in the dialog box are:

0.	Browse Links (menu)

The menu item 'Browse Links' is not a normal menu item: it does NOT allow you to select anything, i.e. all of the item selections are ignored.  It is only used to show the hierarchy of the database by listing the fields in each table and the connections (links) between the tables as described in the ZLINKS.DBF file (if present).

The menu drops down to show a list of the fields in the current DBF table.  If there are links to other tables, they appear as branching menu items from the first menu list (see also description below for #8: 'Additional Information').  If a field has links to several tables, it is repeated once for each of the other tables, with a branch off of each one, showing the fields in the other table.

If you follow a link to another table, by clicking the 'Display' button at the bottom to display a second dialog box, you will not see the 'Browse Links' menu item - it only appears on the dialog box for the initial table (to conserve resources).

1.	The File Description (top)

This appears directly below the dialog box caption and above the listbox.  It is obtained from the DESCRIPT field of the ZFILES.DBF file if it exists, otherwise it is blank.

2.	The Contents of the Record (centre)

For each field in the record, the field name and the value are displayed in a single row of the listbox, which may be scrolled vertically.  If any of the entries is wider than the listbox, a horizontal scrollbar appears to allow you to scroll the listbox to thr right.

If you select an entry from the list, it is copied to a much larger field display area below the listbox (capable of displaying the longest possible field value, i.e. 256 characters).  You may then use the up/down cursor keys to move vertically through the list, viewing each entry.

3.	Field Description (centre)

Directly below the listbox is an area to display a brief description of the field which is selected (highlighted) in the listbox.  It appears at the same time as the selected field is copied to the expanded display area.  SurView uses the ZFILES.DBF file to discover the name of the DBF file which contains the descriptions of the fields of the DBF file from which the records being displayed have been read.  If ZFILES.DBF does not exist or if there is no DBF file of field descriptions or if the description is blank, then the displayed field description is also blank.

If field descriptions are available, the 'Describe' button is enabled.  Clicking this button displays all of the field descriptions for the file in a single list in a popup dialog box.  These may be copied or appended to the Windows clipboard using the Copy or Append buttons in that dialog box.

4.	Copy/Append (right side)

You may copy or append the entire contents of the listbox (field names and values) to the clipboard as text if you wish (perhaps for subsequent printing).

5.	Edit (right side button & below centre)

If the DBF file from which the records were read has a read-only attribute, then none of the data fields can be edited and the 'Edit' button is disabled.  If you have write access to the DBF file, then you may edit any printable field value of any of the records selected.  Some entries may contain binary data and will be listed as <unprintable> and may not be edited.  Otherwise, simply double-click an entry or select it and click the 'Edit' button to enter edit mode.  You may also use the 'Edit all' button and SurView will cycle through all of the fields, effectively selecting each field in turn and clicking the 'Edit' button for you.  When you enter edit mode most of the controls are disabled and the area which normally displays the expanded field contents becomes an edit area and several new controls appear.  The field value is copied to the 'edit' control where it may be edited .  SurView also displays the field's maximum length [1,255] and the field's data type:

Type	Description	Type	Description
C	character	G	general
N	numeric	D	date
L	logical	F	float
M	memo	P	picture

You may then edit the value displayed and press 'Ok' or 'Cancel' to exit editing mode, whereupon the edit controls disappear.  Note that although SurView ensures that the field length is not exceeded, it does not do any validation of the content of the field according to the data type.  If 1 or more fields of the current record have been modified, the word 'modified' appears at the top of the dialog box, just to the left of the 'Next' button.  The record is not updated until you close the dialog box or move to the next record (if more than one record is available).  At that time, you will have an opportunity to cancel the record update.

6.	Memo Fields (centre & below centre)

If a field contains a 'Memo' reference (DBF field type 'M'), SurView will attempt to locate the entry in a .DBT file which has the same root name and location as the .DBF file from which the data is being displayed (Memo fields and DBT files are described in any xBase reference manual).  If the DBT file and the memo record is successfully located, the listbox shows the record number from the DBF file along with a 'Memo field' tag and the length of the memo field.  When the item is selected (highlighted by clicking it or by moving the cursor onto it), the actual memo text (rather than the memo reference number) is copied to the larger display area below the listbox for viewing.  At the same time, a 'Show Memo' button appears.  Clicking this button brings up another dialog box showing the complete text of the memo, whereupon you may copy all or part of it to the Windows clipboard if you wish.

7.	Browsing Selected Records (top)

If there is more than one record (i.e. of the 'key' in the pick id is such that more than one record matches), the 'Previous' and 'Next' buttons at the top left & right may be used to browse forward and backward through the list of records.

8.	Additional Information (bottom)

At the bottom of the dialog box is a listbox which contains links to other files.  These are read from the ZLINKS.DBF file.  If the file does not exist or if there are no links from the current DBF file to any other DBF file, then the listbox and the 'Display' button are disabled. Otherwise, each link to another file appears as a separate entry in the listbox, using the following syntax:

FROMFIELD -> TOFIELD in TOFILE (DESCRIPT)

These fields correspond to the fields in the ZLINKS.DBF file.  It means, "additional information can be displayed from file TOFILE: the contents of the FROMFIELD field in the current file will be used to search the TOFIELD field of the TOFILE file".  DESCRIPT is the description of file TOFILE which was obtained from ZFILES.DBF.  In other words, SurView tries to match the contents of the FROMFIELD field in the current file with the TOFIELD field of file TOFILE, displaying all records which match.

You may select a link to follow by double-clicking the entry in the listbox or by selecting it with a single click or the keyboard and then clicking the 'Display' button.  If any records are found, SurView pops up another dialog box, which is exactly the same as the current dialog box.  Closing that dialog box, returns control to the original dialog box.


Other Action for Picked Features
8.5.1.3 Other Action for Picked Features

There are several types of information or actions which can be performed when a point, polyline or polygon (from a .BOB file) is picked with the right mouse button.  These 'actions' are pre-assigned and are embedded in the 'pick id' of the points, polylines and polygons in the BOB file: the filenames, keys and available actions are all hardcoded in the AOB file from which the .BOB file was created (see Section 8.7.1).  There is no way to change the behaviour of SurView when such a feature is picked, other than modifying the AOB file and re-creating the .BOB file.

Refer to Appendix D.4.3 for a complete description of the syntax of the 'pick id', which serves as a list of instructions for SurView.  Briefly, the pick id may contain one or more of the following actions:

·	display only a simple id

SurView displays the id in a simple message box

·	display a block of ASCII text from a .AOI text file

SurView presents the text in a dialog box, as described in Section 8.5.1.1

·	display a topic in a Windows .HLP file

SurView launches the Windows 'WinHelp' application to view the topic in the .HLP file without blocking itself from continuing to run.

·	display a record from a .DBF file

SurView presents the contents of the DBF record in a dialog box, as described in Section 8.5.1.2

·	display a picture (i.e. a .BMP or .DIB file)

SurView launches Windows 'PaintBrush' application to view the bitmap file, without blocking itself from continuing to run.

·	run an application (with or without command-line parameters)

SurView launches the application (including command-line parameters if supplied in the pick id), without blocking itself from continuing to run.

Note that the pick id may also contain several items of one type (i.e. there may be 3 pictures that can be displayed).

If there is only one action contained within the pick id, then SurView performs the action without interaction.  Otherwise, a menu appears, allowing the 'action' to be selected.  When that action has been completed, the menu re-appears.


Measuring Distances on the Map
8.5.2 Pick | Measure Distance

While viewing the map, you can measure the distance between any two points by moving the cursor to the starting point and depressing and holding the LEFT mouse button.  As the mouse is moved with the left button down, the window caption displays the actual distance between the two points in metres.  Note that since the map scale is isotropic, distances can be measured in any direction.


Choosing Flight Line by Name
8.6 Profiles

The Profiles menu item on the map view menu contains several sub-menu items which allow you to manage the viewing and printing of 1 or more stacked profile sections.  These menu items are only valid if there is a SLD file in the File Display List.

8.6.1 Profiles | Choose Flight Line by Name

This dialog box shows the complete list of SLD flight line names, their lengths (no. of data points) and the dates on which they were flown.  When you select a flight line from this list, a new window is created to display the stacked profile data for the selected flight line (and all of the other flight lines flown as part of the same line, if any).

Choose a flight line by double-clicking on it or by clicking on it once and pressing Ok.  Clicking on the list box will drop it 'down', showing more names.  You can also scroll the list up and down.

You may also select a flight line anytime using the mouse: locate the line with the cursor and press the RIGHT mouse button.

Note that a flight line may have been flown in several pieces.  When you select a flight line, SurView automatically selects all of the flight line pieces which belong together.  You will see all of these pieces (if any) in the stacked profile display.  You can then zoom/pan to exclude any portion of the assembled flight line.

Generally speaking, Geological Survey of Canada flight line names follow the format:

PNNN

where 'P' is 0-9, indicating a 'piece' of the flight line and 'NNN' is the flight line number.  So a flight line (12) which has been flown in 3 pieces might be composed of lines 0012, 1012, 2012.  Data from other sources may use other naming schemes and if so, the SLD file contains the (hidden) relationships between the flight lines which are flown in pieces.  SurView will automatically select the required lines.


Choosing Flight Line with the Mouse Cursor
8.6.2 Profiles | Choose Line with Mouse <<<anytime>>>

This menu item does nothing but display a message box advising you that no special menu choices are required to activate this feature - it is always available.  The menu selection appears only as a visual reminder of this feature (rather than burying it in the help text somewhere).

Simply locate the flight line with the mouse and press the RIGHT mouse button.  A dialog box will appear, displaying various pieces of information on the selected line.  You then have a choice YES/NO to display stacked profiles for that line.  This menu item appears only to provide a 'point of visibility' of this feature.

You may also select a flight line from a list of names by selecting the Profiles | Choose Flight Line by Name selection from the map menu.


Printing a Set of Stacked Profiles
8.6.3 Profiles | Print a Set of Stacked Profiles

This menu item allows you to print a set of stacked profiles in 'batch' or 'unattended' mode from a table of specifications read from an external ASCII STP file.  The standard Windows 3.1 file selector dialog box appears, allowing you to select the appropriate STP file.  The STP files must have been created previously with SurView's SLD/map sheet intersection tool (see Section 8.7.4).

You may select various disk drives and directories using the 2 listboxes on the right.  Simply double click on the required drive or directory to select it.

The current filename template is shown at the upper left: you may choose a different template from the list box at the lower left.  Each time you change the template or choose a new drive or directory, the list box fills with the names of files which match the template.  The suggested filename extension is STP, however you may use any filename extension you wish.

To choose a file, either click it once and then press OK or just double click the filename.

If you choose Ok, the dialog box closes, the file is read and if there are no errors, a summary box appears, asking you if you want to "Proceed to the print setup stage?"   If the response is 'no', there is no further action; a 'yes' response will display the print setup dialog box described below.

If the input STP file contains errors, you will have the opportunity to edit the file using the Notepad editor supplied with Windows 3.1.


Printer Setup for Longest Stacked Profile Section

This dialog box allows you to do a complete setup for printing the longest stacked profile found in the STP file: it provides no capabilities to select a portion of the stacked profile data to print.  That information is contained in the STP file which is created by intersecting flight lines with map sheet boundaries (see Section 8.7.4).

For details on how to use this dialog box, see Section 9.1.1

When you are ready to print, choose Print Now and printing will begin.  Normally this dialog box would be used only to print the stacked profile section currently being viewed.  However, in this case, SurView will print the entire set of stacked profiles as read from the STP file.  If you cancel one of them, you will cancel all of the rest as well.

If you choose not to print, simply select Cancel Print to return to the main map view.


Creating BOB/BLC Files
8.7 Tools

8.7.1  Tool: Compile AOB/ALC/ASY Files to Create BOB/BLC/BSY Files

SurView only displays binary object (BOB) and contour (BLC) files and draws external symbols from symbol (BSY) files.  These files are created by compiling ASCII files which have been created by an application or manually with an editor.  The ASCII files contain information describing open polygons, closed polygons, text labels and points (see Appendix D.4 (and Appendix D.5 for symbols) for more information, including syntax).

This tool (selectable from the main map menu Tools | Compile AOB/ALC/ASY to Create BOB/BLC/BSY File) allows you to 'compile' ASCII files to create BOB and/or BLC files.  Remember that the BOB & BLC files are identical in internal structure - the names only provide a method of distinguishing one type of file from another.  BSY files are similar to .BOB files, but can only be used by referencing them from .BOB files.

You will be asked to select a text file which is to be compiled to create a BOB file.  The suggested filename extensions are:

AOB (ASCII Object file)	(creates a BOB file)

ALC  (ASCII Line Contour file)	(creates a BLC file)

ASY (ASCII Symbol file)	(creates a BSY file)

however, you can use any name you wish for AOB files: files which do not have .ALC or .ASY extensions are assume to be AOB files.

You may select several files if you wish (using the 'ctrl' & 'shift' keys with the mouse, as described in your Windows manual). Normally, SurView displays a summary of the contents of the file, at the end of a successful compilation.  However, this summary and other messages are suppressed if more than 1 file is selected.  This allows the compilation of a set of files to proceed without user intervention.  Note however, that the warning messages related to 'unused styles' & 'empty file' are also suppressed if compiling a set of files.  Fatal error messages are NEVER suppressed, and if an error occurs, SurView will display the message and wait for user input before terminating.

The output binary file has the same name as the selected input ASCII file to be compiled and is created in the same directory and drive as the input ASCII file.  If the extension of the selected filename is AOB, ALC or ASY, then the output file has the same name, but with the corresponding BOB, BLC or BSY filename extension.  Files which do not have the AOB, ALC or ASY filename extension are assumed to be AOB files and are compiled to create BOB files: if the file is in fact a contour file, it should be renamed with a BLC extension.

If an error is encountered during compilation, you will have the opportunity to edit the file using the Notepad editor supplied with Windows 3.1.  This editor can only edit files which are less than 64kb.  If the ALC, AOB or ASY file is larger than this, you will have to use another editor.


Creating SLD Files
8.7.2 Tool: Compile LXF files to Create SLD Files

SurView only displays binary survey line data from binary SLD files.  These files are created by compiling ASCII LXF files which have been created by an application (see Appendix D.2 for more information, including syntax).

This tool (selectable from the main map menu Tools | Compile LXF to Create SLD File) allows you to 'compile' ASCII LXF files to create SLD files.

You will be asked to select an LXF file which is to be compiled to create an SLD file.  The suggested filename extension is LXF, however you can use any name you wish.

The output SLD file has the same name as the selected input LXF file to be compiled and is created in the same directory and drive as the input LXF file.

If an error is encountered during compilation, you will not have the opportunity to edit the file using the Notepad editor supplied with Windows 3.1 because this editor can only edit files which are less than 64kb: most LXF files are at least that size.  You will have to edit the file with a more capable editor or re-create the LXF file.


Intersect SLD Flight Lines with BOB Polygons
8.7.3 Tool: Intersect SLD Flight Lines with BOB Polygons

SurView can display polygon backgrounds (from BOB files) in the stacked profile display only if the SLD flight lines have been intersected with the polygons contained in the BOB files.  This must be done before the file is selected.  It is not necessary to do this intersection unless you wish to see the polygon displayed as cross-section backgrounds in the stacked profiles.  BOB files which contain geology, lakes and rivers are the most likely files to be intersected with flight lines.

When a flight line is selected for viewing stacked profiles, SurView displays the polygons as lines (open polygons) and rectangles (closed polygons) behind the stacked profile data.  The attributes that are used to draw the background are the same as those which are used to draw the polygons on the map.  Note that the polygons are displayed in the same order that they appear in the BOB file and are drawn in the same layering order as on the map.  This preserves any 'masking' that was simulated by overlapping polygons in the map view.  However, it should be noted that not all Windows printer drivers can reproduce this masking effect that is seen on the screen, particularly for dithered colours.

This tool (selectable from the main map menu Tools | Intersect SLD Flight Lines and BOB Polygons allows you to calculate the intersection points between all flight lines in the SLD file and all polygons in the BOB file.  The intersection table is appended to the BOB file.

Overview

SurView will not let you select this tool if there are any files in the File Display List.  This restriction is necessary because of difficulties in managing the cartographic projections.

First you will be asked to select an SLD file.  After that you are required to select a BOB file with which to intersect the flight lines.  After intersecting each BOB file, you have the opportunity to choose another BOB file.  Select Cancel to exit or Ok to start intersecting.

Be Prepared to Wait

The intersection process is extremely CPU-intensive and the no. of calculations can be large, so this tool is not recommended for use when time and Windows performance is at a premium.  If there are NF total no. of points in the SLD file and NP total no. of points in all polygons in the BOB file, a worst case estimate of the no. of individual intersection calculations is NF X NP!

Cross-Referencing the BOB & SLD Files

When SurView appends the intersection table to the BOB file it also appends the following information from the SLD file with which it was intersected:

·	the SLD filename

·	the SLD file size

·	the SLD file creation date & time

This ensures that the BOB table is 'tied' to the SLD file as much as possible.  The BOB intersection table is ignored in the presence of any other SLD file, i.e. one which has a different name, size, date or time.  Even renaming the SLD file will render the BOB intersection table invalid.  You can move the file, however, because only the filename is checked (not the pathname).  This restriction is not a serious issue, because the intersection table can always be deleted and re-created with the SLD file again (see next section).

Verification of Intersection Table

When you choose a BOB file, SurView checks for the presence of an intersection table appended to the BOB file.  If it doesn't exist, the intersection proceeds normally.  If a table exists, SurView checks the validity of the intersection table with respect to the currently-selected SLD File.  There are 2 possibilities:

·	the table is valid for the selected SLD file (i.e. the SLD filename, size, date & time stored in the BOB file match that of the selected SLD file)

·	the table is for another SLD file (different SLD filename or size or date or time stored in the BOB file)

In both cases, you have the opportunity to cancel the intersection operation for the BOB file or delete the existing table from the BOB file and proceed with the intersection and append a new table.


Intersect SLD Flight Lines with Map Sheet Boundaries for Stacked Profiles
8.7.4 Tool: Intersect SLD Flight Lines with Map Sheet Boundaries

This tool intersects the flight lines contained in an SLD file with a set of map sheet boundaries to produce an ASCII STP file.  SurView then uses the STP file to print a set of stacked profiles for the map sheet.  This tool is not selectable unless the File Display List contains an SLD file (see Section 8.1.1).

The dialog contains 3 sections that must be filled in before the OK button is enabled, allowing the intersection process to begin:

Output Filename

Initially this field is blank and is a read-only field (i.e. you don't enter the name from the keyboard).  Use the 'Output Filename' button to start up a standard dialog box to select the name of the output STP file.  This dialog box allows you to see the names of existing files to aid you in your decision.  It is recommended that the output filename contain the NTS map sheet number.  You are not restricted to using the STP filename extension, i.e. it is not added automatically for you: if you wish the name to have the .STP extension, enter it along with the rest of the filename.

Map Sheet Title

This field is also initially blank.  It is important that you enter this title in the exact form that you wish it to appear on the stacked profiles. The SLD file title is printed at the top of the stacked profile.  The map title you supply here is inserted underneath the SLD title.  You should check the SLD file title (shown) to ensure that you do not duplicate or omit any important information which describes the stacked profile section.  Typically the SLD file title describes the survey, year flown, region, flight line spacing, flight line azimuth.  The map title usually only contains the map sheet name which is the same as that which appears on the printed NTS topographic map.

If the NTS Map Number is defined (see below), SurView will insert the NTS map sheet number in front of the title you supply.

Map Sheet Boundaries

You are required to fill in the longitude and latitude of the 4 sides of the map sheet.  You are not restricted to a formal map sheet boundary - it can be any rectangular area you wish to define as a 'map sheet'.

In addition to the above fields, there are 2 other read-only sets of information:

SLD File Title

This is provided as a guide to assist you in creating an appropriate map sheet title (as described above).

SLD Survey Limits

These are the longitude and latitude limits of the bounding box which completely encloses the flight lines contained in the SLD file.  It is provided as a guide for entering the map sheet limits.

The last dialog box item is the NTS Map Number group which consists of 3 values:

· the NTS 1: 1 000 000 number (...61,62,63,71,72,73 etc and 120,340,560,780 & 1000)

· the NTS 1: 250 000 letter [A,P] or [A,H]

· the NTS 1: 50 000 number [1,16]

These 3 numbers describe the map sheet using the Canadian National Topographic System (as implemented by the Surveys. Mapping and Remote Sensing Sector of Natural Resources Canada).  A detailed discussion of the NTS numbering system is outside the scope of this document but will be familiar to most users of SurView.

The NTS Map Number group is provided to assist you in defining map sheet boundaries of standard NTS maps: you are not required to use it.  However, if you manually enter the map sheet boundaries, and then use the NTS Map Number group, it will replace the values you have entered with new values computed from the NTS values.  As you move out of each of the 3 fields, the entire set of 3 numbers is validated.  SurView will only compute & fill in the map sheet boundaries if the following combinations of map sheet numbers is supplied:

1: 1 000 000 number	1: 250 000 letter	1: 50 000 number
supplied	blank	blank
supplied	supplied	blank
supplied	supplied	supplied

For any other combination of values, the NTS designation is ignored.  If you use this NTS tool, SurView will insert the NTS map sheet number in front of the map sheet title which is entered (see above).

Intersecting the Map Sheet with the SLD Flight Lines

When the complete set of required specifications has been entered, the OK button will begin the intersection process.  This takes relatively little time and the output file contains only a few numbers (see Appendix D.13) for a complete description of the STP file which is created.  If no intersections are found, the output STP file is not created.

Method of Intersection

In order to avoid 'noise' in the intersection table (caused by flight lines criss-crossing the map sheet boundaries), SurView does not actually intersect the flight line with the map sheet rectangle.  Instead it first eliminates all flight lines which do not have at least one point within the map sheet.  Then it intersects the flight line with only 2 'parallel' sides of the map sheet rectangle, depending on the individual azimuth of the each flight line:

·	if the azimuth is 0 (north-south lines), the flight lines are intersected with the south & north latitudes of the map sheet

·	if the azimuth is 90 (east-west lines), the flight lines are intersected with the west & east longitudes of the map sheet

The special case of flight lines which are not north-south or east-west is a more complex intersection problem and is ignored by SurView.  In such cases, the STP file contains every single flight line in the SLD file with the intersection record numbers set to [1,M] where M is the number of records in the flight line.  The record numbers in the STP file can then be edited to create a custom intersection table.

Using the STP Intersection Files

The STP file is an ASCII text file, so you may edit it if you wish, before plotting the stacked profile sections.  However, you should restrict your editing to the map sheet name and possibly the record numbers (if you are careful).  SurView writes out the actual line name and no. of records on the right side of each intersection line for your information and to assist you in editing the record numbers.

You may also wish to concatenate several STP files to create a larger set of stacked profile sections.  This is not recommended unless the files are small.  You are limited in the number of stacked profile sections you can plot in a single set by the no. of pieces of paper that the paper tray in your printer can hold.  If you concatenate several files, remember that each set begins with a map sheet name and ends with a set of 4 -1 values.

See Section 8.6.3 for details on how to print the set of stacked profiles using the STP files.


Find Grid Values at Point Locations
8.7.5 Tool: Find Grid Values at Point Locations

This tool is only enabled if the File Display List contains a GRX file containing a single grid/image file and if the File Display List contains at least one BOB file containing points that are currently enabled for plotting.  It looks up values from the grid/image file at the (x,y) locations of all of the points which are enabled for plotting.

When this tool is selected, the name of the ASCII output file to be created is entered (any name) and then the grid lookup operation proceeds.  For each point, the (x,y) in projection units (i.e. UTM) and (longitude,latitude), point value and point id string (if present) is listed in the output file.  The grid value at that location is also listed.  If a point is located outside the grid range, the grid value at that point is listed as '<no data>'.  If the point is located over an area of the grid file which contains 'undefined', the value is listed as '<undefined>'.  The ASCII file is in "comma and quote-delimited" format, suitable for import into any spreadsheet.

This tool is useful for comparing point geochemistry measurements or ground radiometric measurements with airborne radiometric gridded data (aka 'airborne geochemistry').


[Re-]Register Grid/Image
8.7.6 Tool: [Re-] Register Grid/Image

This tool provides a mechanism to register a grid image geographically.  It can be used to georeference a grid file for which the origin or cell size information has been lost, but it's primary use is for georeferencing Windows .BMP files (created by scanning topographic maps or aerial photographs) for which no registration information is available.  Use the HDR2GRX.BAS utility provided with SurView (run it using QBASIC from a DOS prompt) to create a dummy GRX file for a Windows .BMP file.  Then, display the .BMP picture in SurView by selecting the GRX file for viewing.  Use this registration tool and identify known points to properly georeference the .BMP picture.  Note that the columns & rows of the scanned image file must be exactly parallel and perpendicular to the easting & northing of the projection system - SurView can not apply a rotation or correct for an inadvertent rotation of the image.  Accordingly, care must be taken when scanning the map or photograph.

When you select this tool, you are reminded that you must select a minimum of 4 (and a maximum of 20) points and then the cursor changes to a '+' cursor. Click each known point with the right mouse button.  If you are outside the image, SurView will just beep and reject the point, otherwise it will display a dialog box with the (easting,northing) or (longitude,latitude) according to the current registering information read from the GRX file.  Enter the new information (either the geographic co-ordinates or the projected co-ordinates and click the Ok button.  Do this for a minimum of 4 points.  Even though you are in 'registration mode', as indicated by the '+', cursor, you may still zoom and pan (see Section 6.1) on the image as usual, to allow more accurate selection of points.

You must know the exact co-ordinates of the selected points: the most likely points on scanned topographic maps are those located at the intersection of (longitude,latitude) lines or (easting,northing) lines.

When you have finished, press the ESC key or re-select the tool from the menu.  A final dialog box will appear, showing you the original origin and grid cell sizes and the computed origin and cell sizes.  Note that the origin depends on the file format: the origin of a Windows .BMP file is at the lower left of the picture.  You may edit the computed values if you wish, but it is generally not recommended unless you have a specific reason, i.e. perhaps you know that the cell sizes are 100 m, not 99.987564 m.  If you press Ok, the GRX file is updated with the new information and the picture is redrawn with the new registration.


Import Point Data from .DBF File
8.7.7 Tool: Import Point Data from .DBF File

You may use this tool to import point data from a dBase III/IV .DBF file.  First you will be asked to select a .DBF file, after which a dialog box of import options appears.  When the options have been selected, close the dialog box and you will be asked to select the name of the output AOB file.  SurView then reads the .DBF file and creates the .AOB file.  The AOB file can be compiled immediately and the .AOB file optionally deleted, or SurView can simply create the .AOB file for subsequent customizing with an ASCII text editor.

SurView provides limited options to import data from DBF files.  If the file has not been created exactly as required to match the two data models supported by SurView, it is a relatively simple matter to read the DBF into almost any spreadsheet, rearrange and/or transform the data as required and save it again as a .DBF file.

There are several references to special keywords (marked with a '#' prefix, i.e. #RotPoint) which are used in AOB files.  The complete syntax of AOB files is described in Appendix D.4.2

Dialog Box Overview

After the .DBF file has been selected, SurView then reads the field definitions from the file and tries to identify certain key field names:

Item	Key Words for Identification
Station or sample number/id	station, sample, id
UTM Zone	zone
X co-ordinate	longitude, long, easting, east, x
Y co-ordinate	latitude, lat, northing, north, y
Symbol rotation angle	strike, dip, plunge, orientation
Symbol scale factor	style, type

Then SurView presents a large and complex dialog box containing options which control both the interpretation of the items in the .DBF file and the format of the AOB file to be created.  There are 4 distinct regions in the dialog box, which should be addressed in the following order:

1. upper left:	(X,Y) co-ordinates & projection

2. upper right:	data model selection and related options

3. lower left:	selection of desired 'pick action' when the point is 'picked'

4. lower right:	file creation options

Each of these areas is described below.

1.	Upper Left: (X,Y) Co-ordinates & Projection

This is the easy part.  From the two drop-down lists, select the fields containing the (X,Y) co-ordinates.  If these fields contain (longitude,latitude) then select 'Geographic' in the checkbox (which enables the 'Format' button beside it).  Otherwise, leave the checkbox unchecked and fill in the projection description below it in the space provided.  The syntax of the projection statement is described in Appendix E.  If the DBF file contained a field identified as 'Zone', then SurView sets the initial value of the projection as UTM, with the zone number obtained from that field of the first DBF record.

(Longitude,Latitude) Options

If the projection is 'Geographic' (longitude & latitude), the 'Format' button will be enabled: clicking it will display a second popup dialog box containing options specific to geographic co-ordinates.  SurView supports 3 formats:

(a)	Each of the X & Y fields contains a floating-point value which is the longitude or latitude in degrees.  This is the default.

(b)	Each X  & Y is split into 3 values: degrees, minutes and seconds in 3 consecutive fields of the DBF file.  SurView extracts the 3 values and converts them to a single floating-point value in degrees:

degrees = sign * |degrees| + |minutes|/60 + |seconds|/3600

The 3 values must be consecutive and in degree, minute, second order.  The absolute values are combined in the above equation and multiplied by 'sign' which is +1 if all 3 values are positive and -1 otherwise.

(c)	Each X & Y is in a single field, but rather than being a floating-point value, the field contains a 6-character packed DDMMSS string.  SurView extracts the 3 values from the 6-character string and converts to floating-point degrees:

degrees=(DD) + (MM)/60 + (SS)/3600

The last option is used to ensure the longitude values have the correct sign.  SurView assumes that the 'longitude' or 'X' field contains positive values for the western hemisphere, and negative values for the eastern hemisphere, as SurView expects to find in the .AOB file.  If the DBF file contains negative values for the western hemisphere, check the option:

"multiply longitude by -1 to make West positive"

and SurView will extract the value (possibly assembling it from a group of 3 values, as above) and multiply the longitude by -1 to change the sign.

Symbol Rotation

By default, none of the symbols will be rotated.  If you want to rotate each individual symbol according to the value in a particular field (i.e. 'strike') enable the checkbox and select the field containing the angle of rotation to be applied to the symbol and the transform to be applied to the field value.  If this option is selected, all point data will be written out using #RotPoint and #BeginRotPoint, otherwise #Point and #BeginPoint will be used.

Note:	The syntax of #PointStyle & #RotPoint in the AOB file requires the angle of rotation to be a normal 'CAST' angle, i.e. measured counterclockwise from east (East=0, North=90, West=180 & South=-90).  If the selected DBF field contains an azimuth, the transform fields should appear as:

[90]  +  [-1]  X  [field value]

Multiple Projections

All (X,Y) values in the DBF file must have the same projection, since AOB files do not support more than one projection. If the file contains (X,Y) values in two different UTM zones, you may be tempted to split it into two files so you can create a separate .AOB file for each UTM zone.  This can be done, however, you will not be able to display the two files at the same time (SurView insists that all non-geographic files in the File Display List have the same projection).

Multiple Files

It is also important to remember that if a set of geochemistry data is split into two files and both files are displayed at the same time (of course they must have the same projection), the data in each file is scaled proportionally according to the scale factors for that file only.  To ensure that the values are scaled the same, you must go into each .BOB file and ensure that the 5 scale factors, i.e. [Smin,Smax,Zmin,Zmax,E] are the same in each file.  The easiest way to do this is to edit the AOB files before they are compiled to create the .BOB files (you must also remember to change the values in both .BOB files, if you change them later in one .BOB file).  If the [Zmin,Zmax] values are initially set at [0,0] in the #PointStyle, they are replaced with the actual [Zmin,Zmax] for that file.  Setting these parameters to non-zero values in the AOB files will leave them intact.  Finally, it should be noted that the table of 20 fractile values for each file is only applicable to the data in that file and can not be changed.

2.	Upper Right: Data Model Selection and Related Options

Introduction: Types of Point Data Stored in .DBF Files

SurView does not have any capabilities for handling a proper database model spread over several .DBF files (tables).  It treats each .DBF file just like a 'spreadsheet', where each row is a record in the .DBF file corresponding to a station or sample number.  Each column is a field in the .DBF record and contains a measured value or feature of that station/sample.  SurView requires that each DBF file to be processed contain at least:

·	1 column containing the station id or sample number

·	2 columns for (x,y) co-ordinates, either (easting,northing) or (longitude,latitude)

SurView can interpret the contents of the .DBF file according one of two models or views.  In both cases, the rows and columns are interpreted in a similar manner.

(a) Data Model 1 (multi-valued, geochemistry,symbol type is assumed)

Example:

Station	Easting	Northing	Ag	As	Au	...	Zn
94-1	530429	7165234	1.9	4.5	4.3	...	3.2
94-2	534123	7163865	0.8	1.2	1.3	...	1.6
94-3	532348	7166294	3.3	4.1	0.4	...	2.8
...	...	...	...	...	...	..	...
This is a common format for geochemistry data.  SurView requires that you select 1 or more columns from the listbox containing the field names.  These names usually correspond to the measured variables or elements, i.e. Ag, As, Au,...Zn.  Then, for each variable, SurView reads all records in the file, extracts the column of values and sorts it from largest to smallest and writes it out to the AOB file.  The size of each symbol is proportional to the data value: the data is sorted so that larger symbols do not occlude the smaller symbols.  The result is a complete set of proportionally scaled symbols for each measured variable.

If there are M measurements (columns) for each of N records, the AOB file contains M X N individual point symbols in M groups.  The style name for each of the M groups is the field name, which is usually the element name, i.e. Au,...Zn.  The AOB file is created such that each group is plotted with a filled black circle with a white outline.  For example, using the above data set:

#BeginStyleTable

  #PointStyle  Ag circle 0 white black  1   10   0 0   1

  #PointStyle  As circle 0 white black  1   10   0 0   1

  ...

  #PointStyle  Zn circle 0 white black  1   10   0 0   1

#EndStyleTable

#Projection ...

#BeginPoint Ag

530429 7165234 1.9  "94-1"

534123 7163865 0.8  "94-2"

532348 7166294 3.3  "94-3"

...

#EndPoint

#BeginPoint As

530429 7165234 4.5  "94-1"

534123 7163865 1.2  "94-2"

532348 7166294 4.1  "94-3"

...

#EndPoint

...

#BeginPoint Zn

530429 7165234 3.2  "94-1"

534123 7163865 1.6  "94-2"

532348 7166294 2.8  "94-3"

#EndPoint

The symbol type for any group may be changed easily by editing the AOB file (as above) before compiling to create the BOB file or by displaying the BOB file in SurView and editing and saving the symbol attributes using the Edit menu selection (see Section 8.2.3.1).

(b) Data Model 2 (single valued, geological observations, symbol name)

Example:

Station	Easting	Northing	Feature	Strike	Dip
XYZ-1	512874	7123103	flt-dex	120	30
XYZ-1	512874	7123103	fold	130	10
ABC-1	512982	7126212	joint	45	10
ABC-2	513012	7125632	flt-dex	70	5
...	...	...	...	...	...
This model is similar to the previous model, in that it has 3 columns for station number and X & Y co-ordinates: it differs primarily in the no. of groups or sets of data that are imported and in the manner in which the style names are assigned to each group.

In this case, the style name for each group of symbols is stored in one of the fields (columns) of the database (i.e. 'Feature' in this example).  When the data is imported from the DBF file, SurView scans the selected 'style' field and produces a unique list of M style names (in the previous model, the no. of style names was the no. of columns selected to import).  Then it will generate M sets of points, as before, but with the following differences:

·	the no. of groups (M) is variable and depends on the no. of unique names in the selected field.  You can determine the no. of unique styles (M) in the selected style field by clicking the 'Count' button.  The information is cleared each time a new style field is selected.

·	the no. of points in each group is variable and depends on the no. of points with that 'feature' name.  It could be 1 or it could be N (the no. of records in the DBF file), if all points have the same style.

·	points for each group are not clustered together, and they are not sorted.  The order of the points in the AOB file corresponds exactly to the order of the stations/samples (records) in the DBF file.

·	instead of M X N points, the AOB file contains only N points, even though there are still M groups.  The no. of symbols plotted is equal to the no. of records in the DBF file.

Symbol Type

In addition to requiring that the field containing the style name be identified, SurView requires that the symbol be identified (in the previous model a 'circle' was used as the default symbol type, because that is common for geochemistry data).  The symbol can be one of SurView's internal symbols  (circle, square, triangle, plus, 5-star, arrow-tip, arrow-tail, circle-plus or circle-dot), or a field can be selected which contains the name of an external symbol (as found in BSY files).  In most situations, it is probable that the same field will be used to identify the style name and the name of the external symbol.  If the field containing the symbol name does not contain the name of the BSY file also (i.e. of the form filename:symbolname), the name of the external symbol filel must be specified in the space provided and the complete name will be formed by appending the symbol name to the filename, separated by ':'.

The following AOB file was created from the above example data set.  All symbols have a fized size of 10 mm.  The style names and external symbol names were obtained from the same field ('Feature').  All of the external symbols used for #PointStyle are declared to reside in file GEO.BSY.  For the purpose of illustration, the 'Strike' field was selected for the angle of rotation for the symbol (hence the use of #RotPoint instead of #Point).  The 'Strike' field was converted to the 'CAST' angle required by #RotPoint using the transform: angle=90-strike.

#BeginStyleTable

  #PointStyle flt-dex geo:flt-dex 0 white black 0 10 0 0 0

  #PointStyle fold    geo:fold    0 white black 0 10 0 0 0

  #PointStyle joint   geo:joint   0 black white 0 10 0 0 0

  ...

#EndStyleTable

#Projection ...

#RotPoint flt-dex 512874  7123103  1  -30  "XYZ-1"

#RotPoint fold    512874  7123103  1  -40  "XYZ-1"

#RotPoint joint   512874  7123103  1   45  "ABC-1"

#RotPoint flt-dex 513012  7125632  1   20  "ABC-2"

Labelled Symbols and Symbol 'Value' (Size)

In the above example, the 'value' in the #RotPoint statements (1) is ignored and the symbols are all plotted at a fixed size (Smax=10 mm), because the exponent E (5th scale factor in the #PointStyle statement) is 0 (refer to the point scaling algorithm in Appendix D.4.2 for details).  However, some symbols could be coded to label the point with the symbol 'value' (and/or angle or azimuth of rotation) as described in Appendix D.5.2).  So if these symbols have that characteristic, rather than label them all with the 'dummy' size of 1, they could be labelled with any other value from the DBF record, simply by specifying that the size be extracted from a specific field in the DBF record.  For example, using the same points as above, the size is extracted from the 'Dip' field:

#RotPoint flt-dex 512874  7123103  30  -30  "XYZ-1"

#RotPoint fold    512874  7123103  10  -40  "XYZ-1"

#RotPoint joint   512874  7123103  10   45  "ABC-1"

#RotPoint flt-dex 513012  7125632   5   20  "ABC-2"

All of the symbols will still be plotted at the same size (i.e. 10 mm), but the symbols will be labelled with the 'value', i.e. 'dip' (if so coded).

Summary for Data Model 2

1.	Choose the field which contains the stylename.

2.	Choose one of SurView's internal symbols (circle, square etc) for plotting all of the symbols or choose a field which contains the symbol name (this will often be the same as the field which contains the stylename).   The selected field may contain one of SurView's internal symbol names (i.e. circle, square etc), in which case, the symbol filename should be blank.  Otherwise, enter the name of the .BSY symbol file.

3.	Choose the field which contains the value to use for scaling the symbol or enter a fixed size.

3.	Lower Left: Selection of Desired 'Pick Action' when the Point is 'Picked'

Each point, polyline or polygon in a .AOB file can have an optional 'pick id', which contains information on action to be performed or data to be displayed when that feature is 'picked' with the mouse.  A complete description of the point/polyline/polygon pick id and how it is used can be found in Appendix D.4.3.  For this dialog box, you can select a few options to create a custom pick id.

In both of the examples above, the 'pick id' for each point is just the simple station number.  When any of the points is 'picked', SurView will display the location, value and the simple id.  However, SurView also allows other actions to be associated with a picked feature, by describing the action in the pick id (see Section 8.5.1.2,  Section 8.5.1.3 & Appendix D.4.3 for a more thorough discussion).  In the lower left of this dialog box, you may choose any combination (1, several, all or none) of the 5 possible pick actions.  The aggregate pick id appears on the right of each #Point, #RotPoint (or entries enclosed in #BeginPoint or #BeginRotPoint) in the AOB file.  When the point is picked, if there is more than one type of action (item to be displayed) a menu of the available items will be displayed.

Each of the 5 types of pick id has several attributes which may be edited by clicking the 'Edit' button, which pops up a dialog box containing these options.

Formatting the Pick Id

All of the pick types allow you to customize the pick 'id'.  There are two basic formats:

·	identify the point by the absolute record number in the DBF file [1,2,3...]

·	identify the point by the contents of a specified field in the DBF record

The 'record number' method is probably not as useful as the second method, which allows a DBF record field (usually the 'station number' or 'sample id' field) to be selected as the pick id.

SurView uses the special character '%' to mark the insertion point in the 'Format' of the pick id.  Depending on which basic type you have selected, either the 'record number' or the contents of a specified field will be substituted for the '%' symbol.  Except for the two special cases described below, you can add any special characters you wish to format the id.  For example, if you have already prepared a .AOI text file with keys which appear as:

#sample XYZ-1

...text...

#sample XYZ-2

...text...

then you should use the following pick id format:

"sample= %"	(note the space after the '=')

and select 'Station' as the field value to be substituted for "%".

SurView also adds a special prefix to the id string to indicate the action to be performed:

--	(no prefix for a simple id)

[I]	display a block of text from a .AOI file

[H]	display a topic in a .HLP file

[D]	display a DBF record

[P]	display a picture file (.BMP or .DIB)

(a)	Pick Id Special Case 1: Displaying a DBF Record

The format of the pick id for displaying a DBF record is fixed.  Simply select the field which contains the 'key' and the pick id will be formatted as:

fieldname=value	(find all records which match)

      or	fieldname==value	(find only the first record which matches)

where 'value' is the contents of the selected field for each record.

If the 'Show All Records' box is checked (format uses '='), when the point is picked, SurView searches the .DBF file for 1 or more records which satisfy the selection criterion and displays all of the records it finds.  If you are sure that the field contains a unique id for each record so that there will only be a single record for each point, you can leave the box unchecked (format uses '=='), so that SurView will not waste time searching the entire DBF file when the point is picked: it will search for and display only the first record which matches and assumes there are no more to be found.

Example 1:

If you choose the 'Station' field in the example shown for Data Model 1, the pick id in the .AOB file will appear as:

   #BeginPoint Au

530429 7165234 1.9  [d]station=94-1

534123 7163865 0.8  [d]station=94-2

532348 7166294 3.3  [d]station=94-3

...

   #EndPoint

and selecting any point will display the single corresponding record from the DBF file.

Example 2:

If you choose the 'Station' field in the example shown for Data Model 2, the pick id in the .AOB file will appear as:

   #RotPoint flt-dex 512874 7123103 1 -30 [d]station=XYZ-1

   #RotPoint fold    512874 7123103 1 -40 [d]station=XYZ-1

   #RotPoint joint   512874 7123103 1  45 [d]station=ABC-1

   #RotPoint flt-dex 513012 7125632 1  20 [d]station=ABC-2

Selecting either the first or second point will result in a list of two DBF records which can be viewed.  Selecting the third or fourth point will result in only a single record being displayed.

(b)	Pick Id Special Case 2: Displaying a Picture

The format of the pick id for displaying a picture is fixed and is simply "%", i.e. the contents of the selected field.  You must have a field in the DBF file which contains the filename of the picture to be displayed. See Appendix D.4.3 for further details.

Filenames in the Pick Id

By default, when SurView processes the pick id and looks for .AOI, .HLP or .DBF files, it assumes that the filename is the same as the .BOB file, but with a different extension.  If the filename is different than the .BOB file, the pick id allows it to be supplied (see Appendix D.4.3 for a complete description).  When this 'import' dialog box is closed, SurView then prompts for the name of the output .AOB file to be created.  Subsequently, when creating the .AOB file, SurView compares the output .AOB filename with the DBF filename from which the point data is being imported.  If it is different, SurView appends a '@' code with the AOB filename to each individual pick string.

Creating .HLP or .AOI Outline Files

If the pick id contains a reference to either a .AOI text file or a Windows .HLP file, SurView can also create a rough outline of either of these files for you as the data is imported.  This can save a significant amount of time later and will provide a template which can then be edited.

The .AOI text file is just a simple text file.  However, .HLP files are a bit more complex.  The only method of creating a .HLP file is to first create a .RTF (Rich Text Format) with specific formatting and then compile it with the Microsoft Help Compiler which creates the .HLP file.  SurView creates the outline .RTF file for you (similar to the .AOI text outline).  This .RTF file can then be read by a word processor such as Microsoft Word for Windows, edited, and saved again 'as RTF' and finally compiled by the Microsoft Help Compiler.

By default, the name of the output .AOI or .RTF file will be the same as the as-yet-unspecified name of the output .AOB file (selected when the dialog box is closed).  However, you can over-ride this filename and choose another name if you wish.

4.	Lower Right: File Creation Options

This is the easiest part.  There are 3 options which can be selected.  By default, SurView will create the AOB file, start up the compiler (see Section 8.7.1) to compile the AOB file to create a .BOB file and then delete the AOB file.  You can disable the deletion of the AOB file and you can also suppress the compiler stage (for example, to allow you to edit the AOB file first).


Enter Point/Vector Data
8.7.8 Tool: Enter Point/Vector Data

This is a primitive tool for entering point or vector (polygon, polyline) data.  It can be used to create DBF records or to digitize point locations (or vectors) on the map surface for inclusion in an AOB file.  The following discussion assumes complete familiarity with the AOB file format and the manner in which SurView displays records read from DBF files (see Section 8.5.1.2), as well as the tool used to import point data from DBF files (see Section 8.7.7).

When this input tool is selected, the cursor changes to a '+' crosshair, indicating that it is in point input mode.  To exit the input mode, re-select the Tool from the menu (the menu item will have changed from 'Enter point data' to 'Stop entering point data'.  You may also use the 'ESC' ('escape') key to exit input mode.

Destination

Before entering point input mode, a dialog box appears to select the destination of the data.  There are 5 possible destinations for the digitized points:

·	each digitized point is appended as a record to an existing DBF file

·	each digitized point is a #Point entry in an AOB file

·	each digitized point is a point in a #BeginPolygon/#EndPolygon polyline in an AOB file

·	each digitized point is a point in a #BeginPolygon/#EndPolygon closed polygon in an AOB file

·	each digitized point is logged to a simple text file

DBF File Output

Point data for a DBF file can only be written to an existing DBF file: this allows SurView to present a list of the available data entry fields in the file so that they can be filled in before writing the completed record to the DBF file.  Therefore, before input can begin, an existing DBF file must be selected.  The DBF file may be an 'empty' file, consisting only of a header (containing field definitions) or it may contain other DBF records.  DBF files can be created very easily using the 'Save As' feature of almost any spreadsheet.

When the new 'empty' record is displayed in a dialog box (see Section 8.5.1.2), the 'Edit All' button can be used to cycle through all of the fields in the record.  In addition, there are 4 buttons which can be used to automatically insert the longitude, latitude, northing or easting into the field being edited.  The dialog box will display descriptions of the input fields, provided they have been defined in the ZFILES.DBF file (see Appendix D.7).

AOB File Output

If the output is directed to a new or existing AOB file, the output file selection process is deferred until all of the data has been input and input mode has been terminated.  This is in anticipation of several 'false starts' with subsequent cancel/restart sequences.

After digitizing several points and exiting data input mode, a dialog box appears to select the output co-ordinate mode: the co-ordinates can be written out as (longitude,latitude) or as (easting,northing) in the current projection.

The point or polygon 'stylename' is required for the #PolyStyle or #PointStyle header item (which SurView creates for you).  If the AOB file is new, you can immediately compile it with the compiler tool (see Section 8.7.1) and add it to the File Display List (see Section 8.1.1) for subsequent viewing.  If output is appended to an existing AOB file, prior to compilation, you will first have to edit the file and move the #PolyStyle and/or #PointStyle entries to the #BeginStyleTable section at the top of the file.

After selecting these options, the output file is selected and the points are written out to the file.  Finally the list of points is destroyed and the input mode is terminated.

Text File Output

Output can also be directed to a new or existing text file.  The operation is the same as for an AOB file, with two minor differences.  Output co-ordinates can be both geographic (longitude,laltitude) and projected (easting,northing) if you wish.  In addition, you may enter a comment which is written out as a header to the text file, perhaps to remind you later of the object that you digitized.

Entering Point Data

As each point is entered, SurView draws a circle (square if closed polygon) with a crosshair to mark the point.  During digitizing, you may zoom and pan (see Section 6.1) on the map.  If a polygon or polyline is being digitized for an AOB file, the points are joined by a line.  When input is terminated for a closed polygon, SurView automatically joins the first and last points.

The 'DEL' ('delete') key may be used to delete the last point entered, unless the output is being directed to a DBF file, in which case the output is irreversible.

Note that the 'DEL' key will delete the point from the internal list, but it will not erase it from the screen - that would require that the screen be redrawn.  Rather than have SurView do this and possibly be annoying, this is left up to the user: if you delete a point, you can force the picture to be redrawn as usual with the View | Redraw menu selection (or ^R accelerator key).


View Symbol Names in .BSY Symbol or .BOB File
8.7.9 Tool: View Symbol Names in .BSY Symbol or .BOB File

With this tool, you can:

·	obtain a list of external symbols referenced by a .BOB file

·	obtain a list of symbols defined inside a .BSY file

·	create (and compile) a sample .AOB file to plot a table of all symbols defined inside a .BSY file

First you must select either a .BOB file or a .BSY file.

If you select a .BOB file, SurView reads the header and looks for #PointStyles which reference external symbols (see Appendix D.4.2 for syntax).  If there are none, you will be told that the .BOB file does not reference any external symbols, otherwise you will be presented with a list of the symbol names and the .BSY files in which they are presumed to reside.  You may then copy the list to the clipboard if you wish (perhaps for subsequent printing).

If you select a .BSY file, SurView reads the table of symbol names defined within the .BSY file (with #BeginSymbol in the original .ASY file) and presents the list of symbol names.  As above, you may then copy the list to the clipboard.  You may also generate a .AOB file which will plot a sample table of all of the symbols in the BSY file.  If you select this option, you will then be asked for the name of the output .AOB file.  After SurView has created the file, it uses the compiler tool to compile it and create a .BOB file (but it does not delete the .AOB file after compiling it).  You may then select the .BOB file for viewing and subsequent printing using SurView's normal display and print functions.

The sample AOB file generated by this tool invokes each of the symbols in the .BSY file with a line colour of 'red' and a fill colour of 'green'.  The colours are arbitrary and are only defined in this manner to assist you in identifying any of the symbol colours which are coded as 'deferred' (see Appendix D.5.2 for further explanation).

Each of the symbols in the sample .AOB file is invoked with #RotPoint, but with a rotation angle of 0, so that you may view any individual symbol rotated (simply by editing the rotation angle in the .AOB file).


Tool: Import DXF Files
8.7.10 Tool: Import DXF Files

This tool is used to read a DXF file and import it by converting it to a reasonably equivalent AOB file, which is then compiled to create a BOB file for display.

1. Introduction: Don't Expect Too Much!

The DXF format is very ugly and it is a poor format for storing spatial data (i.e. geology) , but because it is common to use AutoCAD to digitize maps, DXF files are a common and popular method of storing representations of spatial data as lines, polygons, points and text.  However, it is important to remember that AutoCAD is a technical drafting package and was not designed for use with spatial geological data.

'Art' is not 'data'!

It is difficult to write a DXF interpreter program to read DXF files into a GIS (Geographic Information System).  In most cases, this is because the file has been created with a drawing application such as AutoCAD, without proper consideration for it's eventual use as digital data in a GIS system.

For example, suppose AutoCAD has been used to mark an 'X' at an outcrop location.  If that 'X' appears in the DXF file as two LINE or POLYLINE entries with no other information to tie them together, then it is impossible for a DXF interpreter to recognize those polylines as a point observation with attribute 'outcrop'.  Each LINE consists of the co-ordinates of the endpoints, i.e. (x1,y1) and (x2,y2), but what is really important is the (x,y) of the location of the outcrop at the centre of the 'X' and this does not appear in the DXF file.  The lines look exactly the same as any two lines in the DXF file which might represent a fault or a river.  Perhaps the only clue is that the 'X' might appear in an OUTCROP layer and the rivers might appear in a HYDRO layer, but there is no standard for this and each 'artist' will have a different idea of how the 'map' (picture) should be drawn.

On the other hand, it is much more useful if each 'X' is entered as a POINT entity with a single (x,y) on a layer called OUTCROP.  SurView and other GIS can then choose to display any symbol at that POINT location.

'Polylines' are not 'Polygons'!

If a geology map is drawn or digitized with AutoCAD, only the contacts should be digitized and each contact should appear only once in the file.  There is no point in attempting to outline each geological unit by digitizing the complete polygon which encloses it.  Only 'line' attributes (contact type, fault type) should be attached to these lines: this is usually done by putting each line type in a separate layer.  No attempt should be made to associate any of the lines with a geological unit: the identification of geological units as closed polygons should be done with POINT entities, in appropriate layers.

For example, for unit Gb, there might be a DXF layer called GB, which contains only points and each point lies somewhere within a polygon bounded by the digitized contact lines.  Most GIS import tools can read these simple DXF files, build the topology from the digitized contact lines and assign attributes to the polygons which enclose the geological units from the point entities.

SurView is not (yet) a GIS

Having said all of the above, and indicating that a properly digitized geology map can be imported into most GIS successfully, it should be pointed out that SurView is not a full GIS.  It can not 'build' whole polygon topology from digitized lines and it can not be used to edit such data.  However, SurView can read DXF files and make a reasonable attempt to translate the contents into an AOB file that SurView can then display (as a compiled BOB file).  The success and degree of frustration of this import process depends largely on the content of the DXF file and how it was created.

2. DXF Colours

DXF colours are represented internally in DXF files by an integer in the range [1,255], which represents colour numbers in a device-dependent manner.  Windows uses a complete device-independent colour model, representing any colour by an RGB triplet.

According to the documentation, colours [1,8] are simple primary colours, but the remainder of the colours depends on the device that was used when the DXF file was created.  If there are only 16 colours, then [9,15] will represent brighter versions of colours [1,7].  In 256-colour mode, colours [10,249] represent colours defined in terms of a (Hue,Lightness,Saturation) (HLS) colour model and [250,255] represent 6 shade of grey.  The only colour values which are ambiguous (because of the overlap) are [10,15].  In 16 colour mode, they represent brighter versions of colours [2,7], otherwise they are HLS values (various shades of 'red').

3. DXF Entities

SurView attempts to read a DXF file and create an equivalent AOB file. In order to do this, the DXF entities must be interpreted and subsequently represented by the entities present in an AOB file.  Compounding the translation problem is the large number of DXF primitives, many of which in turn can be used in several different ways to represent the artwork in the file.  A brief discussion of some of the DXF entities and the manner in which they are treated by SurView follows (a reasonable familiarity with the internal structure of DXF files and AOB files is assumed, but is not required):

POLYLINE/VERTEX/SEQEND

A polyline begins with the POLYLINE entity type, is followed by a sequence of VERTEX entities, and is terminated with SEQEND.  SurView collects the VERTEX points and creates a polyline which can be output to the AOB file as an open polygon or a closed polygon (polygon fill colour="none").  This decision can be made automatically or interactively, as described in Section 8.7.10.3.   Polylines which have less than 2 points and filled polygon which have less than 3 points are discarded.  Polylines are written to the AOB file as #BeginPolygon/#EndPolygon entities.  The colour which accompanies the POLYLINE entity is used for the line colour(polyline) or fill colour (polygon).  Filled polygons are outlined in black.

LINE

Unfortunately, polylines can also be digitized using a mode which stores the co-ordinates as a series of LINE entries in the DXF file.  Each LINE entity consists of 2 endpoints, i.e. (x1,y1) and (x2,y2).  In most cases, where LINE entities represent a continuous polyline, the (x1,y1) of a LINE entity is exactly the same as the (x2,y2) of the preceding LINE entity.  Instead of generating an individual polyline for each LINE entity, SurView attempts to eliminate as many of the LINE entities as possible by combining them into a single polyline.  The first LINE entity is stored as a polyline containing 2 points.  When a LINE entity is encountered, SurView checks the previous entity.  If it also was a LINE entity in the same layer, SurView compares (x2,y2) of the previous LINE with (x1,y1) of the current line.  If they match, the (x1,y1) of the current LINE is discarded and (x2,y2) is added to the polyline.  This continues until a non-LINE entity is encountered or when a line break is detected.  The synthesized POLYLINE is written out to the AOB file in the same manner as a 'real' POLYLINE.  The line colour is the colour which accompanies the first LINE entity of the group.

TEXT

Each TEXT entity is written out to the AOB file as a #Text2 entity, using the indicated colour.

ARC/CIRCLE

Both ARC & CIRCLE entities are written out to the AOB file as #Ellipse entities.  ARC is assumed to be a polyline and CIRCLE is assumed to be a filled polygon.  The entity colour is used as a line colour for ARC and as a fill colour for CIRCLE.

TRACE/SOLID

Both TRACE & SOLID entities are written out to the AOB file as 3 or 4 point polylines.  TRACE is assumed to be a polyline and SOLID is assumed to be a filled polygon.  The entity colour is used as a line colour for TRACE and as a fill colour for SOLID.

POINT

Each POINT entity is written out to the AOB file as a #Point entity using the default symbol type 'circle' and a size (diameter) of 3 mm.  The outline colour is black and the fill colour is the colour indicated by the POINT entity.

INSERT/BLOCK

At the top of a DXF file, there may be a BLOCKS table, consisting of several BLOCK entities.  Each BLOCK can contain any combination of DXF entities, including lines, points and text.  Subsequently, at various locations in the remainder of the DXF file, the INSERT entity indicates the point at which the named BLOCK is to be inserted.  This allows DXF files to store only a single copy of a sub-picture which may appear many times in the overall picture.  Unfortunately, in many cases, it is used to draw a symbol and therefore SurView only treats INSERT/BLOCK items as symbols.  The contents of each BLOCK are ignored and an INSERT reference to one of the BLOCKs is written out to the AOB file as a #RotPoint entity (this is a general case of #Point, but it also allows for individual angles of rotation, if present).  The symbol outline colour is black and the fill colour is as indicated by the INSERT entity.  The symbol size is 3 mm.  SurView's DXF import options (Section 8.7.10.1) allow INSERT items to be ignored, written out as an internal symbol or an external symbol: these are selectable by the BLOCK names.

The following DXF entities are ignored:

all HEADER entries

all TABLES, except for the LAYER TABLE

the contents of all BLOCKs

all SHAPE, ATTDEF, ATTRIB, 3DFACE, VIEWPORT, DIMENSION

4. AOB Style Table

Each polyline/polygon, point or text item in an AOB file requires a stylename defined at the top of the file.  SurView creates the style names using the name of the layer in which the entity resides with a suffix to indicate the type of entity.  For example, if layer HYDRO contains polylines (rivers), polygons (lakes), text (lake names), points and points & inserted points, the following styles will appear:

#BeginStyleTable

...

#PolyStyle 	HYDRO-poly	...

#PolyStyle 	HYDRO-line	...

#TextStyle 	HYDRO-text	...

#PointStyle 	HYDRO-point	...

#PointStyle 	HYDRO-insert	...

...

#EndStyleTable

5. Order of DXF Entities

SurView writes out all entities to the AOB file in the order that they are encountered in the DXF file.  The only way to change this order is to make several passes though the DXF file, each time importing only selected layers and writing them to separate AOB files.

There are 3 dialog boxes used during the DXF import process:

·	general options

·	snap threshold settings

·	polygon open/close/discard decision

When the DXF file has been successfully converted to an equivalent AOB file, it must be compiled using SurView's built-in compiler tool to create a BOB file suitable for viewing with SurView.


DXF Import Tool: General Options
8.7.10.1 DXF Import Tool: General Options

After a DXF file is selected for importing, SurView reads the DXF header, consisting of the HEADER, TABLES & BLOCKS sections, up to the ENTITIES section.  Most of the information in these sections is ignored, however SurView does build a list of the layer names from the TABLES section and a list of the BLOCK names from the BLOCKS section.  SurView then displays these tables and other options in a dialog box.

Title

The title is written out to the AOB file as #Title and is subsequently used by SurView to display the contents of the file.  Any title is suitable.

Projection

The initial projection is just a place holder, i.e. UTM zone 1.  The projection must be entered with the correct syntax: it is written out to the AOB file as #Projection.  If the syntax is incorrect when you leave the Projection field, SurView issues a beep.  You will not encounter any further notification of error until you attempt to compile the AOB file.  See Appendix E for a complete description of the projection syntax.

Selected Layers

SurView will only import layers which are 'selected' in the listbox on the left.  Initially, all entries in the listbox are marked as 'selected' (highlighted).  You may select any combination of these layers for importing.  All entities in the DXF file are written out to the AOB file in the order that they are encountered.  If that order is not acceptable, you will have to run the import utility on the DXF file several times, each time writing only selected layers to each of several AOB files.

INSERT/BLOCK Symbols

The INSERT/BLOCK tables dictate the manner in which SurView interprets the INSERT entities.  A different symbol or action can be selected for each BLOCK name in the table on the left.  Select the BLOCK name and then select a symbol type from the table on the right.  For each BLOCK name which is referred to by an INSERT entity, SurView generates a #PointStyle entry at the top of the AOB file: the style name is the BLOCK name (with a '-insert' suffix) and the symbol name is the symbol which is selected from the list.   In addition to the regular symbols (circle, square, etc) , there are 2 special 'symbols':

<discard>

This tells SurView to ignore and discard all INSERT entities which refer to the selected BLOCK name.

<file:symbol>

This tells SurView to create a #PointStyle entry in the AOB file using the BLOCK name as the style name and also as the symbol name (coupled with the name of the external symbol file which appears in the field below the symbol table).  For example, if the BLOCK name is 'DDH' (diamond drill hole), and the filename is 'MYSYMBOL', then the AOB style will be:

#PointStyle DDH-insert  MYSYMBOL-DDH ...

This assumes that there is a BSY symbol file called MYSYMBOL.BSY which contains the definition of the symbol DDH.  SurView does not check the validity of  the filename or the symbol name when the AOB is created, nor when the AOB file is compiled.  When SurView then displays the BOB file, it tries to find MYSYMBOL.BSY and if it can't find it or the symbol within, it just draws a default symbol (labeling it with the actual user-defined symbol name).

DXF Colour Model

The DXF colour models are explained in Section 8.7.10.  Choose one or the other colour models.  This is largely trial and error - it depends on what model was used to define the colours in the DXF file.

Polygon Closure

This brings up the dialog box which is used to specify the 'snap' thresholds which are used to attempt to close polygons.  During the import process, if SurView asks for a decision on whether or not a polygon should be closed (see Section 8.7.10.3), this button appears again, allowing the snap thresholds to be modified.


DXF Import Tool: Snap Thresholds
8.7.10.2 DXF Import Tool: Snap Thresholds

The snap or closure of polygons read from the DXF file can be controlled separately for each layer.  For each layer(s) selected, there are 4 modes which can be selected:

O: leave all polygons 'open'

SurView will write all polylines in the selected layer(s) to the AOB file as open polylines.  It will not attempt to close any polylines.

C: close all polygons (ignore snap, no interaction)

SurView will write ALL polygons in the selected layer(s) to the AOB file as closed polygons.  It will not check any polygon for closure and it will not provide any means of interactively deciding the fate of any particular polyline.

I: interactive (use snap threshold to close)

SurView will use the indicate snap threshold to decide whether polylines in the selected layer(s) should be closed or not.  If the endpoints of the polyline are within the 'snap threshold', SurView displays the polygon (see Section 8.7.10.3z8.7.10.3), and asks if it should be left 'open', closed or discarded.

A: automatic (use snap threshold to close, no interaction)

This is exactly the same as 'I' (interactive), but SurView closes the polygon automatically if the endpoints fall within the 'snap threshold' and writes it out to the AOB file as a 'closed' polygon without any interaction.

The snap threshold value (only valid for modes 'I' & 'A') can be interpreted  two ways:

· % X polygon diagonal (relative)

SurView computes the length of the diagonal of the bounding box of the polyline.  The 'snap threshold' is then computed as a percentage of the length of the diagonal (metres).  For example, if the value is 1% and the diagonal is 1000 metres, the 'snap threshold' is 10 metres.

· metres (absolute)

The value is interpreted as an absolute 'snap threshold' in metres.

In both cases, the polygon will be closed if the distance between the first and last point is less than or equal to the absolute or computed 'snap threshold' distance in metres.


DXF Import Tool: Polygon Close Interaction
8.7.10.3 DXF Import Tool: Polygon Close Interaction

When a DXF polyline has been assembled for writing to the AOB file, SurView checks the closure mode for polylines in the layer on which the polyline resides.  If the mode is other than 'leave all open' or 'close all', SurView computes the 'snap threshold' and distance between the polyline endpoints.  If the distance is less than the 'snap threshold', SurView either closes it automatically without further interaction or it pops up this dialog box to obtain instructions on how to dispose of the polygon.

The picture in the upper left represents the viewport of the entire DXF 'picture'.  The current polyline is drawn to scale in that picture, so it's relative size (and importance) can be visualized.  At the same time, the polyline is drawn to the right, but it is zoomed to maximize it's size.  The scale of each picture is indicated by the width (in metres) which is displayed underneath each picture.  The layer name, no. of points and the actual distance between the endpoints is displayed below the left picture.

The polygon is initially drawn as a 'closed' polygon, but it can be re-drawn and toggled between 'open' & 'closed' with the 'Redraw as Open/Closed' button.  The line and/or fill colours are those that will be written out to the AOB file.  The endpoints of the polyline are joined with a red line and a rectangle is drawn between the 2 endpoints.  If the distance is too small for these marks to be visible, a set of red crosshairs is drawn through each of the polyline endpoints (from top to bottom & left to right).

At this point, there are only 3 possible choices for the current polygon:

· close the polygon

· leave the polygon open

· discard the polygon

There is also an opportunity to revisit the 'snap threshold' settings for the layers for the remaining polygons.  This displays the dialog box described in Section 8.7.10.2.

If the whole DXF import process is becoming far too tedious, you can also terminate the whole process by clicking the 'Quit DXF Import' button (you can also click 'cancel' in the "% done" progress display during the DXF import process).


Help for Map View
8.8 Help for Map View

8.8.1 Help | Getting Started

On-line selection of this menu item will take you to Section 4.1.

8.8.2 Help | Index (Table of Contents)

On-line selection of this menu item will take you to the top of the help file.

8.8.3 Help | Search for Help on...

On-line selection of this menu item will pop up a dialog box which allows you to search for help by keywords.  This is identical to the 'Search' button which is available when viewing the help file.

8.8.4 Help | System Information

On-line selection of this menu item will pop-up a table of system information.  It is also accessible from the system menu of the map or stacked profile window.

8.8.5 Help | About this Program

On-line selection of this menu item will pop-up a display of the name of  SurView, author, version number etc.  It is also accessible from the system menu of the map or stacked profile window.


Overview of Stacked Profile Menu
9. SurView Operation: Stacked Profile Menu

The menu for the stacked profile display provides selections to allow you to manage the display of stacked profiles.  Most of the characteristics are shared by all open stacked profile display windows, while some are unique (view) to the current window.  The same menu appears at the top of all stacked profile windows.  Briefly, the menu choices are:

File

·	print stacked profiles

·	export stacked profile data

·	launch another copy of SurView

·	start a DOS session

Edit

·	line styles & colours of data

·	filters, data plot modes

·	line styles & colours of axes & labels

·	copy picture to clipboard

View

·	zoom & pan on the stacked profile window

·	redraw current stacked profile window

·	return to map view

Options

·	polygon background display

Help

·	access to this help

·	system information

·	about this program


Print Stacked Profiles
9.1 File

9.1.1 File | Print Stacked Profiles

This dialog box allows you to do a complete setup for printing the current stacked profile display.  It is also used to setup the longest stacked profile section when printing a set of stacked profiles (see Section 8.6.3).  There is no provision in this dialog box for selecting a portion of the stacked profile data to print (that is provided by the zoom/pan features available from the main stacked profile menu).

The cartoon on the left shows the outline of a single piece of paper in yellow.  A compressed bitmap of the current stacked profile view is shown inside the paper boundaries.  Each time one of the setup items (scale, margins, printer setup) is changed, the cartoon is redrawn showing the current relationship between the paper and the stacked profile view.  Note that the stacked profiles can only be plotted on a single sheet of paper, unlike the map view which can be plotted on several pieces of paper.  There is no need to do a multi-page plot of stacked profile data

Scale

The initial scale is set so that the view exactly fits on the default piece of paper.  Use this as a guide to setting a 'nice' scale.  Note that the scale refers only to the X axis scale, i.e. along the profile length.  If you change the left or right margin so that the stacked profiles no longer 'fit' inside the plotting area, you can use the 'FIT' button to compute a new scale which will allow the stacked profiles to be plotted inside the current margins.  The top & bottom margins have no relationship to the scale.

Printer Setup

When you choose Printer Setup, you are invoking a standard Windows printer setup dialog box.  The initial box allows you to choose:

·	the paper tray

·	landscape/portrait mode

·	one of the installed Windows printers

Additionally, you can choose Options to choose options which are specific to the selected printer.  I can't help you here, because I have no idea what they will be - you're on your own.  Perhaps your Windows manual will be of some help.

Plot Background Colour

For many colour plotters, printing a picture with a non-white background will just soak the paper and blur the rest of the picture.  However, you may have a colour background selected for viewing on the screen.  So, rather than requiring you to select a white background just for printing, the "Plot background colour" option allows you to suppress the background entirely.  By default this option is not selected and the background is not plotted.

Printing

When you are ready to print, choose Print Now and printing will begin.  A dialog box will appear which allows you to monitor the progress of the printing, as well as providing you with a Cancel button if you choose to cancel printing the stacked profiles.  Note that if the printer is connected to a network printer, pressing the Cancel button will stop printing, but a partial (corrupt) file will still be sent to the network printer, so you will still get some sort of 'output'.

If you choose not to print, simply select Cancel Print to return to the stacked profile display.


Export Stacked Profile Data
9.1.2 File | Export Stacked Profile Data

This selection allows you to specify the name of an output ASCII file to which the stacked profile data will be exported.

You have chosen to export stacked profile data.  This standard Windows dialog box allows you to not only choose the name of the output file, but also its location (drive and/or directory).  The default name is comprised of the flight line name with the extension .XLD.  You may type in another name if you wish.  Use the drive and directory list boxes to choose a different destination.

If the file already exists, you will be prompted with confirmation of over-writing the file (yes/no).

The exported ASCII file is in a simple column format suitable for importing into most spreadsheet applications, i.e. comma and "" delimited values.  Only records for the current [zoomed] stacked profile view are exported, and only data values for currently-enabled variables are exported.

If you choose Ok, the dialog box closes and the export process begins.


Access to DOS (stacked profile view)
9.1.3 File | DOS

Although Windows provides access to DOS via an 'MS-DOS' icon in other program groups,  SurView also provides the same 'jump to DOS' function directly by choosing the 'DOS' menu item.  Many users find this more convenient than going through Program Manager. It has the added advantage that it will start up the DOS session in the SurView's current directory, so you don't have to navigate to return to the directory in which you are working.


Closing Stacked Profile Window
9.1.4 File | Close Window

This closes the current stacked profile window.  It does not affect the main map window and therefore does not cause SurView to terminate.  Note that you do not have to close the stacked profile view if you wish to view the stacked profiles for another line.  You may have several windows open at the same time, each one for a different flight line.  You can simply minimize the current stacked profile window and select another flight line.  You can further manage these windows with Program Manager's ALT-TAB and/or CTRL-ESC keys (see your Windows manual).


Display Attributes (stacked profile view)
9.2 Edit

9.2.1 Edit | Stacked Profile Data

There are two menu items in the Edit menu which allow you to change the display attributes of the stacked profile data from the SLD file.

Colours, Lines, Scales presents a dialog box (Section 9.2.1.1) which allows you to:

·	enable/disable plotting of each variable

·	change Y axis scale factors for each variable

·	change background colours for the stacked profile display

·	change the line styles and colours for each variable

This dialog box may be activated either by the Edit menu or by a right click anywhere in the picture area.

Filters, Wrap, Clip presents a dialog box (Section 9.2.1.2) which allows you to:

·	specify the type of filter to be applied to each variable

·	specify the no. of times to apply the filter

·	specify the data plotting mode (point/step) for each variable

·	specify the data clip/wrap mode for each variable


Display Attributes (colours, line styles, scale factors) for Stacked Profiles
9.2.1.1 Colours,Lines,Scales

This dialog box allows you to enable/disable plotting of various SLD variables as stacked profile data.  You can also change the Y axis scale factors, line styles and/or colours.  See Section 8.2.1.1 for further details.


Display Attributes (filters, wrap, clip) for Stacked Profiles
9.2.1.2 Filters,Wrap,Clip

This dialog box allows you to apply filters to the stacked profile data as well as change the appearance of the data by selecting Point/Step mode and various clipping and wrap modes. See Section 8.2.1.2 for further details.


Display Attributes (other) for Stacked Profiles
9.2.2 Edit | Other

This dialog box allows you to specify colours and line styles of all of the background elements of the stacked profile view.  See Section 8.2.5.

This menu item allows you to view and modify the display attributes of some drawing features which are separate from the data values:

·	axis line styles & colours

·	label colours

·	zoom cursor line style & colour

·	pan cursor line style & colour

Note that the cursor styles here are used only for zooming/panning on the stacked profile view.  The equivalent cursors for the map view have their own attributes.

The cursor lines are always visible, because they are drawn in a special XOR mode to provide a colour which always contrasts with the underlying colours, but with varying success, hence the ability to change the cursor colour.  For this reason, the selection of the cursor colours is somewhat of a trial and error operation.

In addition to these 'base' values of colour & line style for the zoom/pan cursor, the values can be changed temporarily 'on the fly' while using the zoom/pan cursor (see Section 6.1)


Copying Stacked Profile Display to Windows Clipboard
9.2.3 File | Copy to Clipboard

When this option is selected, SurView displays the Zoom/Pan cursor and allows you to select a portion of the current picture for copying to the clipboard.  In addition to the standard zoom/pan operations, you may also press the TAB key to allow you to change the aspect ratio of the zoom/pan rectangle.  Once you have outlined the area to be copied, press ENTER to copy the region to the clipboard.  At any time, any unrecognized key (i.e. ESC) will exit zoom/pan mode without copying anything to the Windows clipboard.

For further information, see Section 6.2.


Zooming/Panning on Stacked Profile View
9.3 View

9.3.1 View | Zoom

This menu selection allows you to zoom and pan along the direction of the flight line for viewing the stacked profile data.  Other than the restriction to the 'X' direction, this operation is the same as for the map view.   See Section 6 for further information.


Unzooming Stacked Profile View
9.3.2 View | Unzoom

This menu selection immediately restores the stacked profile view to the original overall view (i.e. all of the data points on all of the flight lines along the section).  Since the stacked profile display redraws relatively quickly (unlike the map view), and because it can only be zoomed along the 'X' axis, the selected unzoom feature of the map display was not implemented here.


Redraw Stacked Profile View
9.3.3 View | Redraw

While SurView is plotting the data for the stacked profile view, you may cancel plotting with the ESC (escape) key.  The window caption will show <<<interrupted>>> momentarily to inform you that the rest of the data will not be plotted.  If you wish to redraw the stacked profile view, you can select the 'Redraw' menu selection.


Return to Map View
9.3.4 Return to Map View

You may manage the display of the map window and the stacked profile windows (of which you may have several) using the ALT-TAB and CTRL-ESC commands provided by Windows.  This menu item is provided as a more convenient alternative to these commands.  It allows you to bring the map view to the foreground while viewing a stacked profile section.  No such feature is provided with the map view since there may be several stacked profile windows - use ALT-TAB or CTRL-ESC instead.


Polygon Backgrounds for Stacked Profile View
9.4 Options

9.4.1 Options | Polygon Background

This menu selection is only available if there are valid intersections between the SLD file and the BOB files (if any) as displayed in the File Display List.  It allows the style of the polygon background for stacked profiles to be changed.

Intersections between SLD flight lines and BOB polygon files are created using the Intersection tool (Section 8.7.3) which appends the intersection table to the BOB file.

By default, the polygon backgrounds are shown behind the stacked profile data, but with several modes of vertical extent.  You may choose one of 4 different display options:

·	none

·	along the Y axes (i.e. only between [ymin,ymax])

·	between the Y axes (i.e. in the gap between the axes)

·	all (i.e. from the bottom of the bottom Y axis to the top of the top Y axis)

The polygons are drawn in the same order as they are drawn on the map, i.e. in the File Display List order and from first polygon to last polygon within each .BOB file.

Remember that the display attributes of these polygons are the same as for the polygons in the map view.  For example, if a lake is drawn on the map as a filled polygon, it will appear as a filled rectangle behind the stacked profile data.  If the fill colour is currently disabled, so it appears on the map only as an outline, then it will also appear as an outline (i.e. two vertical lines, just like any other open polygon) behind the stacked profile data.  See Section 8.2.3 for further information about polygon styles.


Measuring Distances along Stacked Profiles
9.4.2  Options | Measure Distance

While viewing the stacked profile view, you can measure the distance between any two points along the profile (i.e. parallel to the X axis) by moving the cursor to the starting point and depressing and holding the LEFT mouse button.  As the mouse is moved with the left button down, the window caption displays the actual distance between the two points in metres.  Note  that motion in the 'Y' direction is ignored since it is meaningless, i.e. the scale is not isotropic.


Use Point-to-Point Distance for X Axis
9.4.3 Options | Use Point-to-Point Distance for X Axis

The X axis co-ordinates for the stacked profile display are obtained from the (x,y) values of the flight line.  By default, SurView projects these (x,y) co-ordinates along a straight line, the direction of which is specified by the azimuth of the flight line (in most cases, flight lines are nominally north-south, east-west or oblique).  The component of the projected (x,y) co-ordinates which is parallel to the flight line is used for the X axis co-ordinate of the stacked profile display.  This allows the stacked profile display to be plotted with a meaningful scale which matches the map.

However, if the flight lines are not straight lines, as is the case if the SLD file contains data measured along a road instead of a flight line, then the projected (x,y) co-ordinates are relatively meaningless for drawing the stacked profile display.  If the 'Use Point-to-Point Distance for X Axis' option is enabled, the line-of-sight 'true' distance between the points on the 'flight line' is used for the X axis co-ordinate of the instead profile display.  For a road survey, this should correspond to the relative odometer reading of the vehicle.


Stacked Profile Order
9.4.4 Options | Stacked Profile Order

By default, SurView draws the variables in the stacked profile view from top to bottom in the same order that they appear in the LXF file (which is then compiled to create the SLD file).

The vertical order of the variables can be changed with this dialog box.  Simply drag & drop to rearrange the order.  The drag & drop procedure is the same as for the File Display List dialog box.

You can also superimpose data for any variable on another variable.  This is particularly useful for VLF total field & VLF quadrature variables.  The 2 variables must be adjacent in the plotting order (i.e. one must be above or below the other).  If they are not, you must first re-arrange the plotting order as described above.  Select a variable you wish to superimpose on another variable: click the name in the listbox once and then click the 'Superimpose on variable above' button.  You may also double click the variable name in the listbox.  The entry in the listbox will change, with the phrase 'superimpose on above' beside it.  You can remove this attribute by repeating the procedure.

You may repeat the selection procedure for several variables in a block, superimposing all of them.  However, if more than 2 are superimposed, the Y axis labels on the right will also be superimposed, making them generally unreadable.

The variable which is superimposed on another variable is actually plotted first, because SurView actually draws from the bottom to the top.  For this variable, the Y axis, titles & number labels are drawn on the right side of the plot.  This decreases the amount of space available for plotting the data, since there will be Y axes & labels on both sides of the plot.

There is no indication of which data trace belongs with each of the 2 Y axes.  You will probably find it useful to use the Edit | Colours, Lines, Scales menu item to use different colours for each data trace.  You can also use the Options | Use Trace Colour for Y Axis Colour menu item to draw the Y axis titles & numbers using the trace colour.

The changed order information is saved in the SLD file when the file is removed from the File Display List or when SurView terminates.  As usual, you will be asked if you want to save the changes.


Use Trace Colour for Y Axis Colour
9.4.5 Options | Use Trace Colour for Y Axis Colour

If this menu item is selected, the 'trace' colour (the wiggly line of data) is used to draw the Y axis titles and numbers, instead of the overall colours set in Edit | Other.  This is most useful when superimposing traces using the Options | Stacked Profile Order menu option.


Help for Stacked Profile View
9.5 Help for Stacked Profile View

9.5.1 Help | Getting Started

On-line selection of this menu item will take you to Section 4.2.

9.5.2 Help | Index (Table of Contents)

On-line selection of this menu item will take you to the top of the help file.

9.5.3 Help | How to Use Help

On-line selection of this menu item will pop up a dialog box which allows you to search for help by keywords.  This is identical to the 'Search' button which is available when viewing the help file.

9.5.4 Help | System Information

On-line selection of this menu item will pop-up a table of system information.  It is also accessible from the system menu of the map or stacked profile window.

9.5.5 Help | About this Program

On-line selection of this menu item will pop-up a display of the name of  SurView, author, version number etc.  It is also accessible from the system menu of the map or stacked profile window.


Appendix: Glossary
Appendices

Appendix A: Glossary

File Types:

  ALC

  AOB

  AOI

  ASX

  ASY

  BLC

  BOB

  BSY

  DBF

  DXF

  FDL

  GRX

  LVL

  LXF

  RGB/CMY

  SHP

  SHS

  SLD

  STP

  XLD

  ZFILES.DBF

  ZLINKS.DBF

Terms:

  Aspect Ratio

  File Display List

  Palette

  Profile Map

  Stacked Profiles

  SurView

  UTM


ALC definition
ALC

ASCII Line Contour file.  This is the suggested filename extension of an ASCII file containing polygons of line contours.  The file format is identical to AOB files.  It is compiled by SurView's compiler tool to create a BLC file.

The ALC file format is described in Appendix D.4.


ALC definition
AOB

ASCII OBject file.  This is the suggested filename extension of an ASCII file containing polygons, text labels and points.  The file format is identical to ALC files.  It is compiled by SurView's compiler tool to create a BOB file.

The AOB file format is described in Appendix D.4


AOI definition
AOI

ASCII Object Information file.  These files contain text information which is keyed to polygons and/or lines in the corresponding BOB file (same name & location).  SurView displays this information when the polygon or line is 'picked' with the right mouse button.

The AOI file format is described in Appendix D.6


Aspect Ratio definition
Aspect Ratio

A general purpose term to describe the shape of a rectangle.  The aspect ratio is the ratio of the Y dimension to the X dimension.  It is in effect, the slope of the diagonal line from the lower left to the upper right of the rectangle.


ASX Definition
ASX

Arc/Info Version 7+ 'Shape' specification file.  This is an ASCII specification file which contains the name of the Arc/Info 'shape' file, the projection of the data and the display attributes, consisting of the name of the colour palette file to use and instructions on how to derive the colours & styles for drawing.  The ASX file is similar in use and syntax to the GRX file.

ASX is not my first choice for a filename extension.  I would have preferred to use SHX for these 'SHape specification' files, but SHX is already used by Arc/Info for the binary index file which accompanies the Arc/Info SHP or SHS file.

The ASX file format is described in Appendix D.11.


ASY definition
ASY

ASCII Symbol file.  This file has almost exactly the same syntax as AOB files, but are used to contain external symbol definitions which are referenced by #PointStyle statements in AOB files.  The file is compiled by SurView's compiler tool to create a BSY file.

The ASY file format is described in Appendix D.5


BLC definition
BLC

Binary Line Contour file.  This file contains the polygonal data required to draw line contours.  The file format is exactly the same as BOB, except that it does not contain any text or point entries.  The BLC/BOB name difference is only used to allow the files to be better managed (i.e. with DOS DIR command).

The BLC file format is described in Appendix D.3


BOB definition
BOB

Binary OBject file.  This is a general-purpose file of text and/or polygons and/or points to be drawn on the map display.  See also BLC file.

The BOB file format is described in Appendix D.3


BSY definition
BSY

Binary Symbol file.  BSY files are similar to BOB files, but are not displayable as a separate entity.  They contain external symbol definitions which are then referenced by #PointStyle statements in AOB files.

The BSY file format is described in Appendix D.3


DBF definition
DBF

dBase III/IV database file (also known as a 'table').  SurView only supports versions III/IV.  Point data can be imported from DBF files using SurView's importing tool

The DBF file format is described in the Appendix of the reference manual which accompanies many commercial database applications.


DXF definition
DXF

Drawing Exchange File format, used by AutoDesk's AutoCAD drawing system.  This is a common and (unjustifiably) popular format used to exchange vector data between GIS and digitizing systems.  DXF files can be imported (convert to AOB files) by SurView's DXF importing tool.


FDL definition
FDL

File Display List file.  This is an ASCII file of filenames and/or pathnames (one per line) to be displayed in the SurView map display.  Specify this file in the command line.

The FDL file format is described in Appendix D.12.


File Display List definition
File Display List

This is an ordered list of files.  Each time SurView is required to redraw the map view, it draws it by plotting the required items from each file in this list from first to last.  The list of files can be built up manually by using the File | File Display List menu item to display a dialog box which allows files to be re-ordered, added and removed from the list.

The File Display List can also be read from an ASCII FDL file supplied as a command-line argument to SurView (use Program Manager's File | Properties selection after selecting SurView's icon).


GRX definition
GRX

GRid indeX file.  This is an ASCII specification file which contains the name of the grid data file, the name of the colour palette file and the name of the data levels file.  It also describes the format of the grid data file.

The GRX file format is described in Appendix D.8.


LVL definition
LVL

Suggested filename extension for Data Levels file used for grid files.  The values are usually specific to each grid file and represent the data levels (i.e. units of %, ppm, etc) at the colour boundaries.  This file is used in conjunction with an RGB/CMY palette file to convert grid data values to display colours.  If the RGB/CMY palette file contains N colours, then the LVL levels file will contain N-1 data level values.

The LVL file format is described in Appendix D.10


LXF Definition
LXF

Line eXchange Format.  This is an ASCII file of multi-variable survey line data.  LXF files are compiled by SurView's compiler tool to create SLD files.

The LXF file format is described in Appendix D.2


Palette

There are 3 broad categories of video drivers/devices: 24-bit drivers that can display any colour at any time (256 X 256 X 256 = 16.7 million colours), those that can only display 16 colours at a time (i.e. standard VGA) and those that lie between these extremes (i.e. SVGA can display 256 colours).  Non-24-bit devices use a palette of colours (i.e. 16 or more commonly 256) to define which colours are to be displayed as 'pure' (non-dithered) colours.  All other colour requests are rendered using a dithered pattern.


Profile Map definition
Profile Map

A profile map is a map of 1 or more variables.  The data axis is perpendicular to the map plane, but is then flopped over on its side, perpendicular to the flight path.  For some variables where the data crossover point (from negative to positive or vice versa) is of interest (i.e. VLF quadrature), the effect is useful to allow conductors to be traced.


RGB/CMY definition
RGB/CMY

Suggested filename extension for (r,g,b) palette files used for grid files.  Each line contains 3 numbers, each of which is in the [0,255] range, representing the red, green and blue components of the required colour.  If the filename extension is CMY, the file is assumed to contain cyan, magenta and yellow values.

The RGB/CMY file format is described in Appendix D.9


SLD definition
SLD

Survey Line Data file.  This is a file of recorded measurements along flight lines.  It is the original raw/corrected data, but it is not derived or interpolated data, unlike gridded data.

The SLD file format is described in Appendix D.1


Stacked Profiles definition
Stacked Profiles

This is a technique for plotting several variables measured along a flight line.  Each variable has its own Y axis and Y scale, but all variables share a common X axis, i.e. the distance along the flight path.


SHP Definition
SHP

Arc/Info Shape file containing polylines (arcs), polygons or points.  Created with the Arc/Info ARCSHAPE command.  These files are encapsulated by the SurView ASX file type.


SHS Definition
SHS

SIngle-precision proprietary version of the (double-precision) Arc/Info .SHP 'hape file'.  These files are created only for internal use and can NOT be created or viewed by Arc/Info or ArcView.  These files are encapsulated by the SurView ASX file type.


STP definition
STP

STacked Profile file.  This is an ASCII file of specifications required to print a set of stacked profiles for various combinations of flight lines and map sheet outlines.  They are created by SurView's intersection tool (see Section 8.7.4).

The STP file format is described in Appendix D.13.


SurView definition
SurView

This program is called SurView, i.e. Survey View.


UTM definition
UTM

Universal Transverse Mercator projection.  The world is divided into 60 zones, each 6 degrees wide and numbered in a west-to-east direction.  Zone 1 has 180 West Longitude as its western border.  0 degrees Longitude lies between Zone 30 on the west and Zone 31 on the east.

In the UTM projection system, the northing is the no. of metres from the equator.  The centre of the zone is the Central Meridian and is assigned a UTM easting of 500,000 metres.  The easting decreases to the west and increases to the east of this Central Meridian.


XLD definition
XLD

eXported Line Data file.  This is an ASCII file of exported stacked profile data from the SLD file.  It is in a columnar format which is suitable for Importing into most spreadsheets.

The XLD file format is described in Appendix D.14.


ZFILES.DBF Definition
ZFILES.DBF

This is a DBF file containing a description of a set of DBF database files.  SurView uses ZFILES.DBF in conjunction with ZLINKS.DBF to display information from several tables when a line, point or polygon feature is clicked.

The ZFILES.DBF file is described in Appendix D.7


ZLINKS.DBF Definition
ZLINKS.DBF

This is a DBF file containing a description of a the links (relationships) between several DBF database files.  SurView uses ZLINKS.DBF in conjunction with ZFILES.DBF to display information from several tables when a line, point or polygon feature is clicked.

The ZLINKS.DBF file is described in Appendix D.7


About SurView
Appendix B: About SurView

About the Author:

John A. Grant graduated from Queen's University (Kingston, Ontario) in 1973 with a B.Sc. in Physics.  As a student, he spent several summers with the Gravity Division of the Earth Physics Branch (now part of the Geological Survey of Canada), working on helicopter gravity surveys in the Northwest Territories and British Columbia.  After obtaining an M.Sc. in Geophysics (Seismology) from the University of Western Ontario (London, Ontario) in 1976, he joined the Gravity Division.  In 1979 he moved to the Airborne Geophysics Section of the Geological Survey of Canada, where he has been responsible for the creation of all of the software used to process airborne gamma-ray spectrometry survey data acquired by the Section.

Author's Address

John A. Grant

Airborne Geophysics Section

Applied Geochemistry & Geophysics Subdivision

Mineral Resources Division

Geological Survey of Canada

601 Booth St., Room 591

Ottawa, Ontario, K1A 0E8

Voice:    (613) 992-1082

FAX:      (613) 996-3726

Internet: jagrant@gsc.NRCan.gc.ca  (gateway to PC/Banyan Vines)

About the Cursor

The airplane cursor represents the 'Skyvan' aircraft (manufactured by Short Brothers & Harland), which is owned by the Airborne Geophysics Section (Canadian registration CF-GSC).  It has been in continuous use for airborne gamma-ray spectrometry research & development since 1968.

Development Environment

SurView was initially developed on:

Primax 25 MHz 80386+80387

ATI VGA Wonder 512k graphics card

NEC/MultiSync 3D monitor

200 Mb disk, 8 Mb RAM

DOS 5.0, Windows 3.1

SurView is written in C & C++ (large memory model) using Borland C++ 3.1 (no OWL) and Resource Workshop.  Initial development time was about 5 months.  The source files comprise about 100k lines of code, excluding the help text (~275 topics).

This application is published as Geological Survey of Canada Open File 2661 (List 1025, May 1993).


Revision History, Bugs, Known Problems
Appendix C: Revision History, Bugs, Known Problems

Version 1.0 (92.06)

Initial development started.

(92.11)

Initial release.

(93.03)

Fixed clipping problem when printing map.

(93.05.04)

1.	Completely redesigned dialog box for grid file display options and added facilities to:

- set/edit data levels for grid file

- save data levels

- generate histogram

- draw colour distribution figure

2.	Added compressed bitmaps to layout cartoons in dialog boxes for printing map & stacked profiles.

3.	Added 'Fit' button to dialog box for printing stacked profiles.

4.	Fixed scalebar and direction arrow at bottom of stacked profile display to adjust size to the current scale (if zoomed) and/or window size.

(93.05.31)

1.	Removed all references to 'annotate' in both the program and the help file (this has dropped to a low priority and may never be implemented).

Version 1.2 (93.06.06)

1.	Extensive changes to file formats (but retaining compatibility with previous file formats):

LXF	Added keyword #line_StartRecord, replaced keyword #UTMZone with #Projection.

SLD	Changed file header, variable table & line header (added reserved space for future expansion, added new projection information, changed size of some integers)

AOB	Replaced keyword #UTMZone with #Projection.

Added keyword #Interpolate.

BOB	Added reserved space for future expansion.

GRX	Replaced keyword 'UTMZone' with 'Projection'.

(93.06.17)

1.	Fixed bug in saving SLD/BOB/BLC display attributes.

2.	Fixed bug in saving SLD Presentation attributes.

3.	Fixed truncation of text in dialog box for display attributes.

4.	Added #Break keyword for AOB/ALC files for complex polygons.

(93.08.17)

1.	Fixed bug in Tools | Compile LXF file (if optional #var_Transform was not specified, default transform was undefined, instead of [1,0]).

2.	A computed font height of 0 would result in a (too large) default font height.  Fixed.  Also made stacked profile Y axis labels slightly larger.

3.	Fixed cosmetic bug in flight line listbox (Profiles | Choose by Name).

4.	Clarified documentation for LXF file data streams (values must not be separated by commas).

Version 1.3 (93.09.17)

1.	Fixed bug in code which scanned the grid file for [min,max] range:  it was 'forgetting' to skip past the grid file header if it existed.

2.	Fixed bug in grid histogram display attribute dialog box: SurView aborted if the filename was simple (in certain cases).  Sorry.

3.	Fixed bug in creation of suggested filename for stacked profile export (if the linename contained '.' it would fail silently on invalid filename error).

4.	Changed meaning of  the sixth value in the #line_TimeStart entry in the LXF file.  Previously the last value was interpreted as 'seconds', but now it is expected to be 'centiseconds':  use 1800 cs instead of 18 s.  Allowable values are in the range [0,5999].  This value was never actually used for any computation in SurView and this change shouldn't affect any previous files.  The use of centiseconds accommodates those systems which use a sample time of less than 1 s and which (might) start a flight line at a time which is not a multiple of 1 s.

5.	Added a choice of hatch & user-defined fill patterns to the attribute dialog box for filled polygon colours.  The line colour (polygon outline) is used to draw the hatch pattern.

6.	Added #BeginPatternTable/#EndPatternTable keywords to AOB files.  These user-defined patterns can be selected in the dialog box for polygon fill colours.

7.	The AOB/ALC compiler now displays an error message if the input ASCII file does not contain any text or polygons (instead of aborting).

8.	Added 2 fields to the Display | Other dialog box (for the map cursor and reference grid styles) allowing the X & Y reference grid line spacing to be specified (over-riding the values automatically computed).

9.	The AOB/ALC compiler now warns you if any text and/or polygon styles defined in the file are unused.  Unused styles remain in the BOB/BLC file, but are flagged as unused and are no longer displayed in the dialog box for attributes.

10.	Added a -debug command-line option.  If this option is used, a 'debug' checkbox appears in the File Display List dialog box.  This allows the 'debug' option to be enabled/disabled individually for each file.  At the moment, only BOB/BLC files monitor this flag.  If it is enabled, the polygons are numbered as they are drawn (this may be useful for identifying a corrupted polygon in a large file).  Note that this -debug option will remain relatively undocumented (except for here).  The use of this option is completely unsupported: the behaviour of SurView in this mode is subject to change without notice.

Version 1.4 (93.10.23)

1.	Removed the 'Order' dialog box which allowed the order of the files to be changed.  You can now drag & drop items in the File Display List listbox to change their order.  This is more intuitive and easier to use.

2.	Added 'drag & drop'  capabilities to SurView: you may now drop valid SurView files (i.e. from File Manager) onto SurView while it is running.  This is an alternative to SurView's File | File Display List file selector.

93.10.30

1.	Added bar graph display for disk usage to the System Information dialog box (from the system menu).

2.	Added brief examples for GeoSoft & Surfer grid files to GRX file description.

93.11.2

1.	Added capability to specify colours in AOB files using CMY(c,m,y)  which is complementary to the existing RGB(r,g,b) format.

2.	Fixed bug in AOB compiler that caused an abort if the AOB file only contained #Text items.

3.	Fixed a bug in the polygon drawing routine that caused geographic polygons with #Break points to be displayed incorrectly.

Version 1.5 (93.11.15)

This is a major version change.

1.	Intersection of SLD & BOB files is now done with a new SLD/BOB Intersection Tool, rather than when the line is selected.  This takes more time, but only needs to be done once and results in an instant display of polygon backgrounds in the stacked profile display.  The main map menu Preferences choice has been removed and a new entry was made in the Tools menu.  Intersection information for BOB files is not displayed in the File Display List dialog box as well as with the 'File Info' button in that dialog box.

2.	An SLD/Map Intersection Tool has been added to create STP files for plotting sets of stacked profile sections.  Along with this new tool, the format of the STP files has been changed (old STP files must be re-generated).

3.	Added a new cursor display in the grid histogram dialog box to show the colour number and data level as the cursor is moved around in the histogram.

4.	Added a new #include keyword for AOB/ALC files.  This allows common style and/or pattern tables to be stored in a single file which is then included by other AOB/ALC files when compiled.

5.	Added new #LongLatDegrees & #LatLongDegrees keywords for #Projection in AOB/ALC files.  This allows geographic co-ordinates to be expressed as decimal degrees as well as the previous (D,M,S) notation.

6.	The "% done" progress display has been cosmetically enhanced.  The map & stacked profile windows are now disabled while the "% done" box is visible.

7.	Added 'C' & 'L' keystroke commands to change the zoom/pan cursor colour and line style while zooming/panning (rather than have to return to the menu to change them).

8.	Added choices on the View menu (of all windows) to tile the stacked profile windows in 2 modes.

9.	Added "Search for help on..." choice to the Help menu.

10.	Added 'auto-Add' to the dialog box used to build and maintain the File Display List.

Version 1.6 (93.12.6)

This is another major version change (will it ever be finished?!).

1.	Added #SymbolStyle and #Symbol keywords to AOB files.  This provides support for Geochemical sample data as well as miscellaneous point symbols (towns, mines, etc).

2.	Changed the meaning of the sign of the TextHeight parameter for #TextStyle in AOB files.  Previously, negative values were used for mm and positive values were used for map projection metres.  A similar distinction was needed for the new #SymbolStyle characteristics, however since Geochemical data is usually plotted with symbol size expressed in mm, a requirement to continually use negative values was deemed to be hostile.  Therefore as of this version, positive values for #TextStyle & #SymbolStyle are now interpreted as being in mm: negative values are expected to be in map projection metres.  This will not make much of a difference on old AOB files (which must be edited) since it is not expected that #TextStyle was widely used (if at all).

3.	Added support for *.CMY files (in addition to *.RGB) files for grid palettes.

4.	Line Azimuth Bug Fix

SurView previously used the overall survey flight line azimuth (as defined by #Azimuth in the LXF file) for the following items:

-	label on the arrow direction indicator at lower right of stacked profile section

-	projection of flight line (x,y) to obtain stacked profile 'x' co-ordinates

-	intersection of flight lines with map sheet boundaries to create .STP files (SLD/Map Intersection Tool added in version 1.5)

-	projection of variable data for creating profile maps

This use of the survey azimuth was legitimate if all lines were flown in the same direction, but it failed for 'tie' lines and other 'cross-survey' lines.

SurView now uses the individual flight line azimuth (as defined by #line_Azimuth in the LXF file) for the above items.

However, the above change has resulted in the detection of a bug in the LXF->SLD compiler tool.  Previously, the individual line azimuth was set to 0 (north-south) if #line_Azimuth did not appear in the LXF file or if the value was invalid (i.e. not in the [0,180] range).  This was incorrect: now the default value is set to the survey azimuth as it appears for #Azimuth in the LXF survey header.

LXF files should be re-compiled by SurView, particularly if the survey contains any 'tie' lines or if the overall flight line azimuth is not 0 (north-south).  If this is not done, the SLD/Map Intersection Tool will give totally incorrect results (it intersects flight lines with either the longitude or latitude map boundaries, according to the flight line azimuth).

5.	New Filenames

Since the old AVC files can now contain polygons, text and symbols, the 'VeCtor' file nomenclature is somewhat outdated.  Therefore, the filename extension for the ASCII and binary versions of these files has been changed from AVC to AOB (ASCII OBject) and BOB (Binary OBject).  This new name is more meaningful and allows the files to be referred to as 'objects'.  While I was at it, the ACN/BCN names appeared unnecessarily awkward so these were also changed to ALC (ASCII Line Contour) and BLC (binary Line Contour).  The format of all of these files remains identical: simply rename the files:

Old Name        New Name

*.AVC	*.AOB

*.ACN	*.ALC

*.BVC	*.BOB

*.BCN	*.BLC

6.	The custom buttons in the dialog boxes for Drawing Attributes now have a 'proper' look and feel.

7.	Removed the 'Ok to remove' dialog box used to confirm removal of a file from the File Display List.  It was annoying.

8.	The startup screen with the GSC logo now has a two colour background blend which is randomly selected each time SurView starts up.

9.	Polygons now draw correctly when you zoom in really close.

10.	Added option to 'tile' map windows if several copies of SurView are running.  Although each copy of SurView can only display a single GRX grid file or SLD line data file at a time, you may have several copies of SurView running, each with a different GRX or SLD file.  This multiple copy is not a new feature, however the 'tile' feature is.

 Version 1.7 (94.01.17)

1.	Added option to enable/disabling plotting of 'tie' lines in Preferences | Flight Lines dialog box.

2.	Geographic LXF files can now be compiled to create SLD files and SurView can view SLD files containing geographic (longitude,latitude) co-ordinates.  Since the co-ordinate variables are always in (x,y) order in the LXF file and since LXF files do not allow these to be (d,m,s), the only valid geographic #Projection is #LongLatDegrees.

 Version 1.8 (94.01.26)

1.	Added optional #BeginPolygon polygon identifier to AOB file format.  This allows text descriptions to be associated with polygons, which SurView displays when the polygon is picked with the right mouse button.  The text display dialog box is described in new Section 8.5.1.1.

2.	Created new AOI file format for polygon descriptions (see above).

3.	Changed the method of configuring the right mouse button for picking items.  Instead of toggling the menu item between SLD & symbol picking, there is a dialog box to pick one of 3 items to pick: SLD flight lines, BOB symbols & BOB polygons. (see Section 8.5.1).

4.	Re-wrote Appendix D.4.2 to make it more readable and to add description of AOI file.

 (94.02.3)

1.	Fixed bug in parsing projection specification for Lambert Conformal Conic projection (proj=lcc...) for all input file types.

2.	Added 3 menu choices for the smart cursor (see Section 8.3.6), allowing metres, degrees or NTS map sheet number to be displayed.

3.	 Added '~' character for 'hard' space in #Text strings in AOB files.

4.	Added #LongLatDMS & #LatLongDMS which are identical to the older (but still supported) #LongLat & #LatLong, which also implied DMS, but not explicitly.

5.	If the first #Projection is geographic, allow other geographic instances of #Projection in AOB/ALC files.  This allows you to switch back & forth between (longitude,latitude) & (latitude,longitude) order and/or (D,M,S) triplets or decimal degrees.

 (94.02.8)

1.	Added the Band= keyword to the GRX files to support band-interleaved grid files.

 (94.02.15)

1.	Fixed error in documentation: Srot in #SymbolStyle (in AOB file) was misplaced - it should follow the symbol name.

2.	Fixed bug in tool to intersect SLD & BOB files.  I broke this tool when  I added geographic support for SLD files in version 1.7.

 (94.02.18)

1.	Added plotting option in dialog box for drawing symbols.  If the option is checked, all symbols are drawn, but if the value is outside the [Zmin,Zmax] range, the size is set to Smin or Smax.  If the option is not checked, symbols whose values lie outside the [Zmin,Zmax] range are not plotted at all.

2.	Modified the 'Plot?' checkboxes on the left of the Symbol/Polygon Fill Attributes dialog box.  If the symbol or polygon is not being plotted (i.e. the 'Plot?' option in the corresponding Symbol/Polygon Line Attributes dialog box is not selected), then the 'Plot?' option is not enabled, however you can still change the colour attributes.

 Version 1.9 (94.02.23)

1.	Added option to completely suppress the background colour when printing the map and stacked profiles.  This option appears in all dialog boxes for printing.

2.	Added an option to the View menu (for both the map and stacked profile displays) to suppress automatic redraw of the display.  This is useful when changing many display attributes.

3.	Added 'Labels' dialog box to provide a limited method of labelling the map with 2 titles, the map scale and the current date.

4.	Made the flight line labels a bit smaller (they are now 0.8 X line spacing), but with a maximum height of 6 mm.  The flight line tick marks are now smaller: they are now 1/3 of the line name height (previously 1/2 the line name height).

5.	The tick mark labels have been changed to plot parallel to the flight line (previously they were perpendicular).

 Version 1.10 (94.04.04)

1.	Added capability to pick open polygons (lines) in addition to closed polygons.  This required the addition of a 'tolerance' value to the dialog box for right mouse button configuration.

2.	Completely rewrote and re-arranged the 'Display' menu for the map view.  It is now called 'Edit' (same for stacked profile menu item too), in keeping with Windows standard naming conventions for menu items.

All of the confusing menu items and dialog boxes used to select a file and an edit group have been replaced with a single hierarchical listbox.  This provides more consistent access to the attribute dialog boxes.  It eliminates the dialog box for 'Which File' (used if there was more than one BOB or BLC file).  It also eliminates the 'Which Attribute' dialog box used to select 1 of 5 attributes to edit in BOB/BLC files.  It's also very pretty.

Although there are no longer separate menu items for each file type, some of the original accelerator keys (^O, ^G, ^S) are still available for directly accessing display attributes for 'other', grid files and SLD file line colours.  These appear beside the appropriate entries in the hierarchical listbox as a reminder.

 (94.04.19)

1.	SurView used to automatically switch to attribute table C for printing (assuming most printers were black & white), but would give you a last chance to change it if you wanted.  However, too many people were mistakenly printing maps and/or stacked profiles using attribute table C, when they actually wanted the current table A. Since colour printers are now quite common and since black & white Postscript or LaserJet printers can print colours using very nice gray shades, this automatic selection seems unnecessary.  So, I have changed SurView so that it does not automatically select attribute table C for printing.  You can however, select any table you wish from the 'print' dialog box.

 (94.05.21)

1.	Added option in the 'Labels' section of the map printing dialog box to allow a simple frame to be drawn around the map (delimiting the paper margins imposed by the printer hardware).  This provides a simple way to 'dress up' the picture.

 Version 1.11 (94.07.15)

1.	Fixed bug which caused SurView to crash if a symbol was 'picked' that had no identifier.

2.	Fixed bug in routines which extracted a filename from a complete pathname.  It failed if the directory name contained a "." character.

3.	Added #BeginSymbol & #EndSymbol keywords to the .AOB file syntax.  This makes it easier to create a block of symbols all having the same style.  This is most useful for geochemistry data and eliminates the need for using #Symbol and the symbol stylename for each of many symbol values.

4.	Made a small change to the syntax of the polygon id for keyword #BeginPolygon in the .AOB file.  Formerly, the presence of this id string would tell SurView to look for a .AOI file (same name as the current .BOB file) and read and display the polygon description from that file.  Now, if the polygon id string for #BeginPolygon begins with "[H]", SurView will attempt to launch WinHelp to find the information (it uses the remainder of the id string as a 'context string', a term which should be familiar to those who know how to create Windows .HLP files).  The .HLP file must have the same root name as the .BOB file and it must be in the same directory as the .BOB file (as for the .AOI file).

5.	Added code to automatically re-compute the polyline 'pick' tolerance each time the 'view' changes (i.e. when the File Display List changes or when the picture is zoomed or unzoomed).  The value is 0.01 times the smaller of the current view width and view height.  If the picture is 100,000 m wide, then the pick tolerance will be 1000 m.

6.	Modified cartoon in dialog box for printing map to show the page outline in black if the current map background is white (previously it was shown in yellow and was almost invisible).

7.	Moved 'Copy to Clipboard' menu item from the 'File' menu to the 'Edit' menu for both the map and stacked profile view.  This makes more sense and follows the style of most Windows applications.

 Version 1.12 (94.07.29)

1.	Added support for palettes for plotting filled polygons in .BOB files.  Previously, a palette was created for a grid file in order to produce 'pure' (non-dithered) colours, however polygons were plotted directly, letting Windows decide whether to use a dithered colour or a pure colour from the existing palette.  Now, a palette is created for all of the files in the File Display List.  First priority goes to the grid file (if present).  If there is still room in the palette, it is extended with fill colours from the .BOB files.

A menu item 'Use Palette for Non-Grid Items' (under 'Preferences') was added to disable the use of the palette for polygons.  This is useful for rendering the picture with dithered colours so that it can be copied to the clipboard and then pasted into another application which does not support palettes.

2.	Added a display in the Attributes dialog box to show the fill colour when the button is selected.

3.	Combined the 'Plot All' and 'Plot None' buttons in the Attribute dialog box into a single 'Plot all (Set/Clear)' button.  If all items are unchecked, clicking this button checks all items, otherwise, all of the items are unchecked.  This provides the same functionality as the 2 buttons (but perhaps requiring 2 clicks to obtain the desired result) and works better with the enhancement described in the next section.

4.	Added an option to disable plotting the outline of filled polygons.  Previously, the 'Plot?' checkbox in the 'Line Attributes' dialog box was used to enable or disable plotting of the entire polygon.  Now these checkboxes have 3 states:

- checked (plot the polygon)

- unchecked (don't plot the polygon at all)

- 'greyed' (same as checked, but don't plot the polygon outline)

This third state is useful for plotting very dense sets of polygons in a small area, where the (usual) black polygon outline tends to dominate the picture.

5.	Made a small change to the syntax of the symbol id for keyword #Symbol in the .AOB file (this is similar to modification #4 in version 1.11 above) .  Formerly, this entire id string was displayed in a brief message box when a symbol was 'picked'.  Now, if the first 3 characters of the id string are "[I]", SurView will look for a .AOI file (same name as the current .BOB file) and read and display the symbol description from that file.  The "[H']" prefix is also supported, i.e. SurView will attempt to launch WinHelp to find the information (it uses the remainder of the id string as a 'context string', a term which should be familiar to those who know how to create Windows .HLP files).  The .HLP file must have the same root name as the .BOB file and it must be in the same directory as the .BOB file (as for the .AOI file).  If the prefix is not [I] or [H], then SurView simply displays the string as before.

 Version 1.13 (94.08.15)

1.	Replaced projection equations with new equations which are valid for all longitudes and latitudes.  Note that SurView still uses the convention that west is positive and east is negative. North is positive and South is negative.  The 'west=positive' convention is primarily for input files of (longitude,latitude).

2.	Added support for 'van der Grinten 1' spherical projection.

3.	Added 2 more menu choices for the smart cursor (see Section 8.3.6), allowing (degrees,minutes,seconds) and NEWS degrees to be displayed.

4.	Fixed bug in parsing projection specification that used 'N', 'S', 'W' or 'E' suffixes on central meridian (lon_0) and/or Lambert parallels (lat_1, lat_2).

5.	Added -ct= command-line switch to specify the active colour table on startup.  The value can be A, B or C.  For example, -ct=B.

 Version 1.14 (94.08.24)

1.	Since palette colours are being used now for polygons, the 'Copy to Clipboard' operation doesn't seem to work very well.  The picture displays correctly (i.e. if pasted into PaintBrush), but if it is saved to a .BMP file and re-loaded later, the colours are mostly black.  That is because the image is copied to the clipboard as a device-dependent bitmap (DDB), i.e. the colours are dependent on the contents of the current palette.  A device-independent bitmap (DIB), contains its own colour table, so it will always display correctly.

Accordingly, whenever an area is selected for copying to the clipboard, SurView will now ask "...as Device Independent Bitmap?".  If the answer is NO, then the bitmap is copied as a DDB image, for compatibility with previous versions of SurView.

The only reason I have left the DDB choice in is that PaintBrush doesn't seem to accept DIB images for Pasting, whereas other applications seem to be able to paste DIB or DDB images.  I'm not entirely pleased with this, and I will be looking at it further as time permits.

2.	Removed descriptions of colour tables A,B & C from the help text and from the program.  The tables can be used for any purpose (always could), so there are no particular names attached to them, other than A, B & C.

3.	Changed the name of the Preferences menu item to Options to conform to current Windows style guidelines.

 Version 1.15 (94.09.04)

1.	Added the COMPOSITE keyword to GRX file to support composite (ternary) images.  This is an alternate keyword to FILENAME.

2.	Added the '[@]' section and '@=' keyword to the GRX file.

3.	Modified the syntax for the identifier string for #BeginPolygon in AOB files.  Previously, the polygon could not be picked unless the optional string was supplied, otherwise the string was assumed to point to information in a .AOI file if it did not have the [H] prefix, (directing it to a .HLP file).  Now, the string requires the [I] prefix in order to point to a .AOI file (rather than that being the default mode).  If neither [I] or [H] prefix is used, only the simple string is displayed when the polygon is picked.  This matches the syntax used for #Symbols and is the reason for the change.  For an overview of this topic, see the 'Overview' section at the end of the AOB file description.

4.	I found the correct syntax for invoking Windows .HLP files with a 'context string' instead of 'keywords'.  Changed the documentation and usage of [H] prefixes in symbol and polygon identifier strings in .AOB files (from 'keyword' to 'context string').

5.	Fixed problem with geographic 2-point polygons not being displayed when zoomed in.  The problem was that the bounding rectangle of these lines did not intersect the bounding rectangle of the current zoomed view, so they were not ignored, but in fact they did cross the current view.  The problem is due to the extreme curvature of these lines, which are almost always lines of constant longitude or latitude.  SurView now plots all such lines without checking to see if they are visible.

6.	Added the #CaseSpecificStylenames keyword for .AOB files.

(94.09.16)

1.	Added [View] section and subset= keyword to GRX file.

2.	Added 'Always on Top' style to View menu options for stacked profile window.

 Version 1.16 (94.09.14)

1.	Moved left & right mouse button menu items from 'Options' to their own 'Pick' menu item.

2.	Added option to enable/disable automatically returning to zoom mode after an area has been selected and redrawn.  The default mode is 'exit zoom mode after each selection'.

3.	Added command-line option -view=xmin:xmax:ymin:ymax, which can also appear in FDL files (like all such options).

4.	Added 'Adjust View on Return' option to the dialog box which manages the File Display List, to allow files to be added or removed without having SurView re-adjust the 'view'.

 Version 1.17 (94.10.16)

1.	Added support for Azimuthal Equidistant projection (Polar only).

2.	Added lat_0 parameter for the projections.  This is the latitude of the origin.  The default is 0 (equator) for all projections.

3.	Replaced CTL3D.DLL with CTL3DV2.DLL.  SurView no longer uses CTL3D.DLL, but you shouldn't delete it from your ...\windows\system directory, because other applications may use it.

(94.10.18)

1.	Added capability to select more than one *.AOB (or *.ALC) file (with the usual CTRL-CLICK & SHIFT-CLICK operations) for the AOB->BOB compiler tool.  If more than one file selected for compilation, the summary at the end of the compilation is suppressed, as are summary warnings about 'unused styles' and 'empty files'.

2.	Added option to label the tick marks on a stacked profile section with distance from start/end of line (metres) in addition to record numbers.

 Version 1.18 (94.10.25)

1.	Fixed palette colours for stacked profile display.  When I added palette support for polygons in version 1.12, I forgot to extend this to the polygon background colours displayed for the stacked profile view.

2.	Added option to 'Smart Cursor' to display the (column,row) and grid value for grid files.

 Version 1.19 (94.12.04)

1.	Fixed bug which caused Y axes to disappear on stacked profile display when more than the flight line contained more than one segment and the display was zoomed.

2.	Added "Choices Are:" header to the popup menu list of choices that appears when a 'pick' finds more than one line or polygon.

3.	Added 'Clear List' & 'Save List' buttons to File Display List dialog box.  The 'Clear List' button removes all files from the File Display List and is functionally equivalent to using the 'Remove' button for each file in the list.  The 'Save List' button allows the current File Display List and the current 'view' to be saved in a .FDL file.  The 'view' is stored in the .FDL file with the -view= option.

4.	Added a new option to 'Options' menu of the stacked profile display.  The 'Use Point-to-Point Distance for X Axis' option is useful for flight lines which are not straight (i.e. if the data is measured along a road instead of a flight line).  By default, SurView projects the (x,y) co-ordinates along a straight line, the direction of which is specified by the azimuth of the flight line (in most cases, flight lines are nominally north-south, east-west or oblique).  However, If this option is enabled, the line-of-sight 'true' distance between the points on the 'flight line' is used for the X axis co-ordinates.

5.	The file selector (activated by the 'Add' button) in the dialog box which maintains the File Display List now allows multiple files to be selected.  Use the 'ctrl' & 'shift' keys with the mouse (see your Windows manual).

6.	Added #RotSymbol & #BeginRotSymbol/#EndRotSymbol keywords to AOB file.  These are the same as #Symbol & #BeginSymbol, except that there is an additional parameter (after the symbol value and before the optional identifier) for the angle of rotation of the symbol.  This rotation angle over-rides the rotation angle which is associated with the symbol style (as defined by #SymbolStyle).

7.	Added double quotes to the non-data 'comment' lines in XLD files of exported stacked profile data.  The comment lines were being ignored by spreadsheets which expected "command quote-delimited format".  Also added the 'units' to the variable names written out as column headers.

8.	Added new tool 'Find grid values at symbol locations' (in the Tools menu).  This is only selectable if there is a single grid file (GRX, not composite image) present and if any of the current BOB files contain plot-enabled symbols.  An ASCII file containing the locations of the symbols and the grid values is created.  This is useful for comparing geochemistry to airborne radiometric data grids.

 Version 1.20 (95.02.01)

0.	This version contains major changes and additional new functionality.

1.	New AOB Keywords (Appendix d.4.2)

The following changes to the AOB keywords have been made:

Old Keyword	New Keyword

#SymbolStyle	#PointStyle

#Symbol	#Point

#RotSymbol	#RotPoint

#BeginSymbol	#BeginPoint

#BeginRotSymbol	#BeginRotPoint

---	#BeginSymbol

The old keywords are no longer allowed in AOB/ALC files.  Note that the meaning of #BeginSymbol has changed!  These changes do NOT affect .BOB/BLC files created from AOB/ALC files which contained the old keywords: they are still valid and will display properly.  These changes were made to improve the syntax for the introduction of user-defined symbols. In particular I needed to use the #BeginSymbol keyword for this purpose.

2.	New AOB Keywords

Added #Rectangle & #Ellipse keywords for AOB files.  These primitives were added to support user-defined symbols, but can also be used by themselves.  In particular, the #Rectangle keyword is very useful when creating .AOB files containing legends.

3.	New ASY/BSY File Types (Appendix D.5)

Created a new file type to contain user-defined external symbols.  ASY files are ASCII Symbol files which are compiled (like AOB) files to create .BSY files (binary Symbol files).  The syntax is the same as .AOB files, with some minor keyword restrictions.

4.	Modified SurView's AOB/ALC compiler tool to allow ASY files to be selected for compilation.

5.	New Interpretation for Symbol Size/Radius

Changed the interpretation of the original Rmin & Rmax for symbol sizes (as used by keyword #PointStyle in AOB files and as presented in the dialog box containing the scaling factors for point data.  Previously, these values represented the radius of the symbol.  The documentation now refers to these variables as Smin & Smax and they now represent the size of  the symbol, rather than the radius.  For a symbol 'circle', these values are now equivalent to the diameter of the symbol.  This change was made to simplify the terminology and meaning of the 'size' of a user-defined symbol, which may not be circular (i.e. 'radius' is meaningless).

Symbols in older .BOB files will be drawn at half the size, because of this change.  To fix the size, select the .BOB file for viewing and then go into the Edit | Point Attributes dialog box and double the Smin & Smax symbol scale factors for the point data.  For example, if the AOB file was created with:

#PointStyle Au circle 0 white black 1 10  0 0 1

(i.e. radius [1,10] mm, diameter [2,20]), then change the [1,10] values to [2,20].  When you remove the file from the File Display List or shut down SurView, you will be prompted to save the changes in the .BOB file.  Choose 'YES'.

6.	New Point Picking Threshold (Section 8.5.1)

Added a distance threshold for picking point data.  This works exactly like the threshold for picking polylines.  If there is more than one data point within the threshold distance of the picked location, an ellipse (may not be visible, depending on scale) is drawn around the group of points.  Then a menu containing a maximum of 20 data points is displayed (in order of decreasing distance from the picked location), from which one data point can be selected.

7.	New Action Items for Feature Picking (Appendix D.4.3 & Section 8.5.1.3)

Added new pick options for picking lines, points & polygons.  Previously, the syntax of the pick id in the AOB file only allowed for one of:

- a simple id

- a key to a block of text in a .AOI file

- a key to a topic in a Windows .HLP file

The pick id may now contain more than 1 'action' to be performed and in addition to the items above, the action may also be:

- display/edit a record from a .DBF file

- display a picture (i.e. a .BMP file)

- execute (run) a program, with optional command-line arguments

The overview of picking at the end of Appendix D.4.2 was moved into a separate Appendix D.4.3 to describe the new features.

8.	New Tool to Import Point Data from DBF File (Section 8.7.7)

Added a new tool to import point data directly from a .DBF file.  Two types of DBF file structures are supported:

(a)	multivariable, i.e. geochemistry data, where each record (location) has several different values, each of which is a set of point data drawn with a particular style

(b)	single-variable, i.e. each record only has only 1 field which represents a symbol

This tool creates the .AOB file and optionally runs SurView's AOB -> BOB compiler tool.

9.	New Tool To Examine External Symbols (Section 8.7.9)

Added a new tool to view the names of the symbols in a BSY symbol file.  This tool can also create and compile a .AOB file to view and print the complete set of symbols from the .BSY symbol file.

10.	I'm not much of an artist, but I added a whole bunch of new icons (use Program Manager File | Properties to view & select).  Most of the icons have an 'S' in the upper left corner to indicate 'SurView'.  You can now choose an appropriate icon for specific files attached to each icon:

-	SLD file

-	polygons (BOB file)

-	polygons with lines (i.e. geology & faults) (BOB file)

-	rectangular polygons

-	index map

-	line contours (BLC file)

-	geochemistry point data

-	other point data

-	grid images (GRX file)

-	composite image (i.e. radiometric ternary image) (GRX file)

-	FDL file

-	magnetic data (total field, residual, vertical gradient)

-	EM (VLF, VLF Total FIeld, VLF Quadrature)

-	gravity (Free Air, Bouguer)

There should be something there for everyone.

 Version 1.21(95.03.05)

1.	Bug Fix!

The dialog box used to import point data refused to accept a geographic projection keyword, i.e. "#LongLatDegrees".  I fixed this problem, but also changed the dialog box (see point #3a below) to make the selection of geographic co-ordinates more obvious and direct.

2.	Bug Fix!

The problem above with the projection also extended to the compiler tools: they also refused to recognize any of the geographic projection keywords.  It's fixed now.

3.	Made several modifications to the dialog box used to import point data from a DBF file:

(a) Added a checkbox to select geographic (longitude,latitude) explicitly.  This is directly equivalent to #LongLatDegrees, and eliminates the need to enter this as a projection.  The other geographic keywords are irrelevant here, since SurView always writes the .AOB file in #LongLatDegrees format.

(b) Added a 'Format' button to popup 2 options for geographic (X,Y):

-	format:

-	floating-point degrees, each in a single field

-	assemble X or Y from 3 consecutive fields containing degrees, minutes & seconds.

-	assemble X or Y from a packed DDMMSS string in a single field

-	multiply co-ordinates by -1 to make west positive (as SurView requires)

(c) Redesigned the dialog box to use popup dialog boxes to edit pick id options, rather than the 'edit' section at the lower left, controlled by the Edit/Ok button.

4.	Fixed a long-standing problem with slow/fast screen redraws.  SurView tries to optimize the redrawing of the map by drawing the map picture the long, slow way from the data files when necessary and then capturing a copy of the picture, to be used for subsequent fast redraws (until the picture changes).  However, the picture can not be captured if the drawing area (not the window title or menu area) of the window is occluded by any other window.  Normally this isn't a problem because most of the time, SurView is on top.  However, some windows are ALWAYS on top (i.e. the clock, WinHelp if enabled,...).  Up until now, the presence of any of these windows would always prevent the capture of the picture for fast redraws, so that even after a dialog box was closed, the picture would have to be drawn the slow way.  I have now fixed this problem by moving the SurView window to the top (above ALL other windows) when it is drawn the slow way, so that the complete picture can be captured.  It then returns to the normal position underneath any 'always on top' windows that might be present.

I don't use this fast redraw trick on stacked profile windows, since they can be drawn quite quickly.

5.	Major Enhancement for Displaying Information from DBF Files

Support for DBF files was added in the previous version of SurView: when a line, point or polygon is picked, SurView displays 1 or more records corresponding to that feature from a single .DBF file.  SurView now supports a relational database consisting of 1 or more tables (each table is in a separate .DBF file).  SurView looks for two special DBF files in the same directory as the primary DBF file to which the .AOB/BOB file refers:

ZFILES.DBF	contains the names of the DBF files which are related, their descriptions and the names of other DBF files which contain the descriptions of the fields

ZLINKS.DBF	contains the names of the files and the fields which link them together

These files are only required if there is more than one table in the database.  SurView uses the information to enable extra features & controls in the dialog box which displays records from DBF files.  For further information on the format and use of ZFILES.DBF & ZLINKS.DBF, see Appendix D.7.

 Version 1.22 (95.03.20)

1.	Bug Fix

The BGEOCHEM.AOB file included with the sample data still had the old keywords: #SymbolStyle & #Symbol.  I replaced them with the new #PointStyle & #Point keywords.

2.	Added a "Copies" button to the dialog boxes for printing the map and stacked profile sections.  Note that some printers do not support multiple copies, so the field will be disabled.

3.	The 'Print All'  menu item in the File menu of WinHelp was experimental and was still being tested - it didn't work properly and has been removed.  At some point, I will find a way to add a 'Print All' to this menu, allowing the entire manual to be printed (the Windows WinHelp application does not have this capability).

4.	Added support for 'M' memo field display for DBF files.  See Section 8.5.1.2.

5.	Added extra 'Multiple' field (optional) to ZLINKS.DBF file to provide a mechanism to specify whether SurView should search for one (the first) record which matches or all records which match (see Appendix D.7).

6.	Fixed bug in copying text to clipboard from .AOI text display.  If the cursor is clicked anywhere in the text without selecting (highlighting) a block, it would register as an 'empty' selection and nothing would be copied to the clipboard.  Now it is treated the same as if no text was selected initially and the entire block of text is copied to the clipboard.

7.	Fixed 'PANIC' handling.  It now popups a single dialog box and then abruptly terminates SurView.  These occur rarely, but when they do, they used to go into an infinite loop, requiring a re-boot to recover.

 Version 1.23 (95.03.20)

1.	I finally got around to improving the grid legends.  This was a significant amount of work!  There are now 3 fully configurable grid legends (single image, 3-component ternary image and 2-component composite image).  The legends can be sized and placed anywhere on the screen.  When the map is printed, the legend is also printed.  See Section 8.3.7.

2.	I fixed most of the problems related to the map or stacked profile view not being redrawn correctly after a dialog box (for option selection or printing) is closed.  In most cases, the screen will now be redrawn correctly, either while the dialog box is still being displayed or after it is closed.  In some cases, you may have to force a screen redraw with View | Redraw.

3.	Added the COMPOSITELABELS keyword to the GRX file format in the [DESCRIPTION] section.  This is used to specify labels for the grid legend if a 'composite' image is being displayed (the labels are for the triangle vertices or bar endpoints).

 Version 1.24 (95.04.13)

1.	Added a new tool to allow point data to be entered into an existing DBF file (click on the map location and fill in the record for the point).  Also added the capability to 'digitize' a series of points (as individual points or as a polygon) and write to a new or existing AOB or plain text file.  Co-ordinates can be geographic (longitude,latitude) or projected units.

 Version 1.25 (95.05.8)

1.	Added a new tool to register a grid or image file.  Use the HDR2GRX.BAS program (run it with QBASIC from a DOS prompt) to create a GRX file for a Windows .BMP obtained by scanning a topographic map or aerial photograph.  Then use the tool to register the grid by identifying known points on the image.

 Version 1.26 (95.05.19)

1.	Added a new display attribute for SLD files (see Section 8.2.1.3).  You can now draw proportionately-scaled symbols along the flight lines, representing the relative values measured for each SLD variable.  These attributes appear in the hierarchical listbox of display attributes under the 'Edit' menu item.  The rules for scaling and drawing the symbols are the same as for BOB point data (see Section 8.2.3.1).

2.	Added #Text2 keyword to AOB files.  This allows the text height & rotation angle to be specified for invidividual text strings, over-riding the height & rotation angle specified in the #TextStyle.  This is useful for dealing with a wide range of text sizes, perhaps all at different angles, but all drawn with the same colour ('style').  #Text string syntax does not change - no height or rotation angle are specified - these are obtained from the #TextStyle.

 Version 1.27 (95.06.05)

1.	Bug Fix

Fixed minor problem with pathnames of files listed in FDL files - sometimes it wouldn't find the files.  Seems ok now.

2.	Enhancement

The 'Adjust view on return' option in the File Display List dialog box is now persistent throughout the SurView session, i.e. it will remain checked/unchecked until it is changed or until SurView terminates.  The initial default value remains as before, i.e. 'checked'.

3.	New Tool: Import DXF Files

Well, ok, you all win - I finally wrote a DXF import tool, such as it is.  I've been avoiding this for a couple of years, because I absolutely detest DXF files - they are truly ugly.  The DXF import tool isn't perfect, but it will have to do, because I don't have any more time to spend on it.

 Version 1.28 (95.06.15)

1.	Enhancement: 'Browse Links' menu

The dialog box which displays DBF records for picked items (see Section 8.5.1.2) now has a 'do-nothing' menu item which shows the hierarchy of the database tables.

2.	Enhancement: File Association

Prior to this version, SurView would make the File Association entries automatically when it was run the first time.  This was fine, but it provided no means to re-do them if surview.exe was moved, other than doing each one manually in File Manager with the File | File Association menu item or by removing/editing the entries manually in WIN.INI.  Now, there is a new menu item in the [--] system menu in the upper left corner which displays a dialog box to add or remove the File Association entries.  Running this is now part of the installation procedure.  Read Section 2.3.5 for details.

3.	New .ASX File Type for Arc/Info 7 .SHP Files

This is a major new feature which allows SurView to read and display point, line & polygon data from 'shape' files exported from Arc/Info 7 (or later).

 Version 1.29 (95.09.26)

1.	Keywords renamed for LXF files

Instead of calling each X, Y, Potassium, VLF entity a 'parameter', I now call them 'variables'. The term 'multivariable data set' is preferred over 'multiparameter data set'.  Correspondingly, I have also changed the LXF keywords:

Old	New

#NParameter	#NVariable

#par_XXX	#var_XXX

2.	Added 'colour picker' for the attribute dialog box for ASX files (Arc/Info shape files).  The mechanism for changing ASX is evolving and will improve greatly in future versions.

3.	Added [e] pick option for AOB/BOB file polyline/polygon/point picking. It indicates that a file is to be 'executed' by Windows, using the correct application from the 'File Association' settings.

 Version 1.30 (95.12.19)

1.	Bug Fix

Zoom was not working properly for stacked profiles for multi-part flight lines.  All lines were being drawn incorrectly even when zoomed.  This has been fixed.

2.	New Feature

There is a new option in the stacked profile 'Options' menu which allows you to change the vertical order of the variables in the stacked profile view.  Variables can also be superimposed on each other (useful for VLF total field & quadrature data).  The order is saved in the SLD file when it is removed from the File Display List.

 Version 1.31 (96.1.7)

1.	New Ellipse for Projection

Added support for 'ellps=intl' ellipsoid in the projection specification.  This is for the International (Hayford 1910) ellipsoid.  Clarified documentation of projection parameters, including X_0 & Y_0.

2.	New Feature

Added a 'Count' button to the dialog box used to import point data from DBF files.  This allows you to select a style field and determine the number of unique values in that field. This will be the no. of styles in the AOB/BOB file.

3.	Removed the 'Auto-redraw' option from the View menu (for both the map and stacked profile displays) to suppress automatic redraw of the display.  This was added in version 1.9, but was not as useful as expected - just made the drawing logic more complex than necessary.

 Version 1.32 (96.2.4)

1.	Bug Fix

There was a bug in picking flight lines from SLD files that caused SurView to pick an obviously wrong line in certain circumstances.  It showed the line correctly, but it was frustrating to attempt to pick line 2 and have SurView pick line 4 instead.  I have fixed the algorithm, but there is now a brief delay before the initial display of the flight lines when an SLD file is first drawn.  Subsequently, however, the lines draw at normal speed.  A side effect of the new algorithm is that 'fast flight lines' (endpoints only) are much faster.

2.	Picking Capabilities for Arc/Info .SHP Shape Files (.SHP/.ASX)

You can now pick polylines, polygons or points from Arc/Info 'shape' files (SurView file .ASX file type).  The [auxiliary] section of the .ASX file allows you to specify the field of the associated .DBF file which contains the 'pick action'.  This gives .SHP files the same capabilities as .BOB files, in terms of picking a feature and displaying related information.

 Version 1.33 (96.2.19)

1.	New! Legends for ASX Files

ASX files can now have 'themes' (i.e. 1 or more tables of colours associated with key values in the corresponding .DBF file).  These legends can be displayed in floating windows (as for the grid legend).  The legends will print as they appear on the screen.  For further information see the ASX file description.  There is also a new View | Legends menu option to control the visibility of the legends.

2.	Right Click on Legends to Configure

The dialog box for configuring legends (grid and ASX) can be summoned by right-clicking with the mouse on the legend window (also by selecting 'Configure Legend' from the [--] system menu of the window.  The configuration options for ASX legends are extensive.  Try all combinations in order to fully understand how they work.

3.	White Background

All ASX & grid legends can be displayed with an optional white background.  This is an option in the legend configuration dialog box (see #2 above).

 Version 1.34 (96.4.20)

1.	Bug Fix for SLD Files

SurView abort if all of the data for any variable in a flight line was all undefined.  This has been fixed. The axes are labelled [0,0] and no attempt is made to plot the data.

2.	Improvements on a Previous Bug Fix

As part of the bug in flight line picking, Version 1.32 introduced a 'short' delay before drawing the flight lines from an SLD file (SurView had to build a table of flight line endpoints for use in picking flight lines).  The delay was found to be unacceptably long for very large SLD files (i.e. ~100 Mb). Therefore the table is now built as the lines are being drawn. If you 'ESC' to stop drawing, the table will be incomplete. When you click to pick a flight line, SurView will fill in any parts of the table that remain incomplete (perhaps none, if all of the flight lines were allowed to draw). Therefore the 'short' delay may be encountered if you use 'ESC' to stop drawing flight lines and then attempt to pick a flight line. For very large files, this may still take a minute or 2.

3.	Modification to GRX Syntax

The syntax for the Composite entry in GRX files:

Composite=colourmodel,file1,file2,file3

has been extended. In previous versions, the recognized 'colourmodel' keywords were:

CMY	- interpret the contents of the files as (R,G,B) colour values

RGB	- interpret the contents of the files as (C,M,Y) colour values

The legend for the composite was always drawn using the same colour model as for the data. In the current version, the following keywords have been added:

-CMY	- same as for CMY, but draw the legend with the RGB colour model

-RGB	- same as for RGB, but draw the legend with the CMY colour model

These keywords are useful if the files contain (R,G,B) colour representations of CMY colours, so that the legend should display CMY colours.

 Version 1.35 (96.6.13)

1.	Major Re-write of ASX File (Introduced in Version 1.28)

Support for .SHP files of points has been removed. Considering that the .SHP file only contains (x,y) and the rest of the information is in the .DBF attribute file, it didn't seem as if it was worth the effor, complexity and duplication of code, since SurView supports importing point data from .DBF files already (creates a .AOB/.BOB). In addition, the code for the point files was just getting in the way of the code to support arc/polygon .SHP files.  The support of point .SHP files wasn't very good or complete anyway.

2.	Major Enhancement to .SHP Files: Fill Patterns for Polygons

The removal of the support for .SHP files of point data simplified the code greatly and made it easier to add support for drawing patterns for polygons (6 hatch styles and user-definable patterns). The syntax of the ASX file has changed completely: many keywords have been removed, while others have been combined and replaced with new keywords.

3.	Smart Cursor: Enhancement

Added 'UTM Zone' display option to the 'Smart Cursor'. As you move the cursor around, it will display the UTM Zone, whether the current projection is UTM or not.

4.	File Display List: Enhancement

Removed the 'auto-Add' button from the File Display List dialog box. This was added a long time ago to minimize the button clicks required to select several files.  Since the file selection dialog allows multiple-selections, this button was considered to be obsolete.

Added the capability to show/hide any of the files in the File Display List. Selecting 'hide' temporarily suspends drawing of the file. Prior to this, it was necessary to remove the file form the File Display List or disable the line or fill colours for all of the polygons (if it was a polygon file).

5.	Enhancement to ASY Symbols

If the #TextStyle stylename in the ASY symbol definition has a '!' prefix, the #Text/#Text2 items in the symbol will not be rotated if the symbol is rotated (i.e. with #RotPoint).

 Version 1.36 (96.07.10)

1.	Added Support for Geographic (longitude,latitude) for .SHP Files

The Projection= keyword in ASX files can now be #LongLatDegrees, indicating that the .SHP file contains geographic (longitude,latitude) co-ordinates. Interpolation can be enabled with the Interpolate= keyword in the ASX file.

2.	Added Support for .SHS (Single-Precision .SHP) Files

Arc/Info .SHP files are double-precision. This precision is unnecessary for most types of data and only serves to double the size of the file. Arc/Info & ArcView should support a single-precision .SHP file but they don't. SurView does (.SHS), but there are no formal methods of creating such files and as such are only for internal use. ArcView can not view them.

 Version 1.37 (96.07.28)

1.	New Method of File Association

Prior to version 1.37, SurView implemented Windows File Association functionally by inserting entries into the [Extensions] section of ...\windows\win.ini, not realizing that this method only existed to ensure compatibility with Windows 3.0 applications.  The 'modern' way to implement File Assocation is with the Windows registry (file ...\windows\reg.dat for Windows 3.x).

Accordingly, this version adds entries to the registration database, but it also cleans up older entries in ...\windows\win.ini. Each time it starts up, it does the following:

if(there are any SurView entries in ...\windows\win.ini) then

    delete the SurView entries in ...\windows\win.ini

    if(there are no entries in the registration database) then

        add entries for the current ...\surview.exe location

    end

end

For a new installation, no registration entries are made because the current location may not be the final destination. The installation procedure instructs the user to first install surview.exe and then 'run' it and set the File Assocation.

 Version 1.38 (96.08.04)

1.	New Monitor Calibration Procedure

SurView now has a new calibration for monitor size, as described in Section 2.3.8. The previous method was trial & error and required 2 factors to be entered.  The new method is graphical and can be done with a single click.

 Version 1.39 (96.08.12)

1.	Changed the way Colour Tables A,B,C are Used

First of all, I removed the A,B,C mandatory choice from both printing dialog boxes.  This made sense a long time ago, but as SurView evolves, it is just annoying. The idea was that you might want to print using a different colour table than was currently being used to view the data on the screen. Since I added the option to suppress the background colour when printing a long time ago, this is no longer really necessary.

The second thing I changed was the way that the active colour table was used. It used to be a global setting that would affect all BOB, BLC & SLD files the same. This wasn't very flexible - it was impossible to view XXX.BOB using colour table A and YYY.BOB using colour table B. It was also meaningless for GRX & ASX files. So now it is a characteristic of each individual BOB, BLC & SLD file.  There is also a separate colour table setting for general drawing attributes (although it is shared by the map & stacked profile views).

Finally, since the active table setting is now tied to each file, I removed the attribute table option from the Options menu for both the map and stacked profile windows. It is now accessed from the general purpose dialog box used for drawing attributes.

2.	Added a new menu item (system menu and File menu) to launch a new copy of SurView.

 Version 1.40 (96.08.24)

1.	Enhancement

Fixed some of the weirdness associated with drawing overlapped legend windows for ASX files.

2.	New Colours

In addition to colour 'names' (i.e. "red") and RGB(r,g,b) and CMY(c,m,y) colour triplets for colours, there are now 2 new ways to specify a colour: RGB%rgb & CMY%cmy. In addition, any permutation of the 3 RGB or CMY letters is allowed for all triplets.  See Appendix F for details.In addition, any permutation of the 3 RGB or CMY letters is allowed for all triplets.

 Version 1.41 (96.09.25)

1.	Enhancement: New Pick Options

Previously, SurView read the entire BOB/SHP file to search for polygons in which the pick point was located.  This was necessary in case the polygons in a single file were not mutually exclusive or if the File Display List contained several polygon files that were 'pickable'.  A new option in the Pick | Right Mouse Button Pick Mode dialog box allows this search to be shortened by specifying that the search should stop on the first polygon which 'contains' the pick point.

 Version 1.42 (96.09.29)

1.	Enhancement: 2 new symbols

Added Circle-Plus & Circle-Dot to the table of symbols available for us in AOB files (see Appendix F).

2.	Bug Fix:

Lengthened the 'Projection' field in the dialog box used to import point data from DBF files (it was too short).

 Version 1.43 (96.10.07)

1.	Enhancement: ASX Attribute dialog box

Added 3 checkboxes to allow the line, fill or pattern to be temporarily disabled. For example, if you are viewing a polygon file, you can temporarily disable the fill and draw only the outline. Or you can disable the line outlines.

2.	New -projection= FDL/Command-line parameter

You can now put -projection=... in an FDL file to view a geographic BOB/ASX etc file. Previously, projection specifications were restricted to SLD/BOB/BLC/ASX/GRX files only.

 Version 1.44 (96.10.09)

1.	Bug Fixes

Relative pathnames in nested FDL/ASX files weren't working properly. It should be ok now.

2.	New -title= FDL/Command-line parameter

You can now put -title=... in an FDL file to set the title for a set of files. While processing the FDL file, subsequent -title= parameters are ignored.

3.	Enhancement

Every file has a 'title' (title= for ASX/GRX files, #title= for AOB/ALC/LXF files). Normally, the first title found in the File Display List is displayed. You can now use ';' (semicolon) as the first character of any of these titles. This tells SurView it is a 'commented' title, which is never to be used for a SurView caption. However, the title is displayed when you ask for Info to be displayed in the File Display List dialog box.

 Version 1.45 (96.10.10)

1.	Enhancement

Added Options | Use Alternate Language Where Available menu option, new keywords for several files:

-title2=	(FDL & command-line)

title2=	(GRX, ASX files)

DESC2	(alternate description) for the ASX legend/theme DBF tables.

The menu item controls a global setting. When enabled, the alternate language (usually french) titles (if supplied) are used from the GRX, ASX & FDL files. They are displayed when the Info button is clicked in the File Display List dialog box. They might also be used as a window caption. Most importantly, this language setting controls the display of labels for the ASX legends. When enabled, the names from the optional DESC2 column are displayed, otherwise the labels from the mandatory DESC column are displayed.

This option can also be 'pre-enabled' by the use of the -altlang command-line option in an icon and/or in FDL files (see Section 2.3.3)

2.	Enhancement

There is a new [*] pick action (for BOB/BLC, SHP files) which launches another copy of SurView to view any combination of SurView files (i.e. BOB, SLD etc).

 Version 1.46 (96.10.15)

1.	Enhancement to FDL Syntax

Modified the FDL syntax to permit the LINE=, FILL= & PATTERN= [display] options to be over-ridden.

Also allow 2 filenames to be specified on a single line, separated by a '|', with no spaces between. If the 'alternate language' is enabled, the second file will be used, otherwise the first file will be used.

 Version 1.47 (96.10.29)

1.	Enhancement to ASX Legend Editor

The 'Edit' button in the ASX legend dialog box allows the colours to be modified. At the moment, there is no way to save the modified colour table - it disappears when the ASX file is removed from the File Display List.

 Version 1.48 (96.11.6)

1.	Enhancement to ASX Legend Editor

The 'Save Theme' button in the ASX legend dialog box allows the complete table of colours to be saved to a new .DBF file.

2.	Bug Fix

Fixed bug which failed to resolve some instances of "..\..." relative pathnames (i.e. in ASX/GRX files).

 Version 1.49 (96.11.17)

1.	Moved 'Legend' options from the main Options menu to the more appropriate View menu item.

2.	Added optional COLOUR2 column to DBF theme files for ASX/SHP files. This is selected with the new Options | Use Alternate ASX Colour Table Where Available menu option. This is intended to allow the use of a second table of colours more suitable for printing than the primary colours in the COLOUR column.

 Version 1.50 (96.11.25)

1.	Fixed File | DOS Prompt so it works on Windows '95 & NT where DOSPRMPT.PIF doesn't exist.

2.	Added colour ramp generator to the colour editor in the ASX legend.

 Version 1.51 (96.12.02)

1.	Bug Fix: ASX Legend Printing

ASX legends were always printed in their entirety, even if not fully visible (not fully sized) on the screen.  It was indicated to me that this was a bug, rather than a feature, so I changed it so that legends are printed as they appear on the screen.

2.	Legend Enhancements

(a)	Added 'Show All' and 'Hide All' to the View | Legends menu.

(b)	ASX legend windows are now initially drawn with an offset in 'cascade' fashion (within each of the line, fill & pattern groups), so you can see if there are multiple menus. Previously, legend windows were superimposed within each group.

(c)	The initial position of the 'smart cursor' is now the upper right (instead of upper left) so it doesn't get mixed up in the ASX legend windows.  It also remembers where it was when you disable it and then re-enable it (previously it always re-appeared in the upper left corner).

3.	Zoom Enhancement

Added 'flashing' hint to the caption of the main window, when Zoom/Pan mode is enabled. Hope it's not too annoying.

 Version 1.52 (96.12.16)

1.	Bug Fix: DBF Import Tool

The tool for importing point data from a DBF file caused a fatal error if a symbol field was specified. Fixed.

Known 'Problems'

1.	There is a continuing problem with some printer drivers with respect to files) for user-defined polygon fill patterns (i.e. other than the standard 6 Windows patterns).  These patterns and colours always seem to draw perfectly on the screen, but for some drivers (Hewlett Packard PaintJet XL, DeskJet 550C etc), the driver plots the pattern, but with the 'nearest' colour to the specified colour.  Quite often, this comes out as 'grey'.  This is a driver problem and is unrelated to SurView.

2.	Large grid files take a long time to draw and they produce very large print files.  This is a known problem.  The grid files are drawn the long, slow way in order to obtain dithered colours on 16-colour video drivers.  I will speed this up by drawing the grid images with a single BitBlt as soon as I can.  It's reasonably easy to do - I just need time to do it.


File Formats
Appendix D: SurView File Descriptions

Intermediate ASCII files for importing data:

Survey Line Data:	LXF	(to create SLD files)

Line Contour:	ALC	(to create BLC files)

Object:	AOB	(to create BOB files)

External Symbols:	ASY	(to create BSY files)

Primary data files used to draw the map:

Survey Line Data:	SLD

Grid Data:	GRX	RGB/CMY	LVL

Line Contour:	BLC

Object:	BOB

External Symbols:	BSY

Arc/Info Shape Files:	ASX

Displaying information from picked features:

ASCII Object Information:	AOI	(also Windows .HLP files & .DBF files)

Database Info/Structure:	ZFILES.DBF & ZLINKS.DBF

Miscellaneous files:

File Display List:	FDL	(to encapsulate a file list and/or 'view')

Stacked Profiles:	STP	(for batch stacked profile plots)

SurView also creates 2 types of files:

eXported Line Data:	XLD

Configuration:	SURVIEW.CFG


Survey Line Data (SLD) File
D.1 Survey Line Data (SLD) File

This is the primary input data file used by SurView.   It contains a complete set of multi-variable airborne data (including co-ordinates) for a single survey.

The header contains descriptive information as well as the no. of flight lines and variables in the SLD file.

Following the header is a set of data for each line.  For each line, there is some descriptive information followed by:

· an array of X co-ordinates

· an array of Y co-ordinates

· an array of data values for variable 1

...

· an array of data values for variable N

Note that SLD files are binary and must be created by compiling an LXF file with SurView's compiler tool (see Section 8.7.2).

How to Create an SLD File	SLD File Format


How to Create an SLD File
D.1.1 How to Create an SLD File

Use SurView's compiler tool (see Section 8.7.2) to 'compile' an LXF file to produce a binary SLD file.


SLD File Format
D.1.2 SLD File Format

A complete description of the format of the SLD file is only useful for those who are going to write a program to read it.  As such, it is beyond the scope of this document to describe it completely.  However the overall structure of the file can be illustrated with the following pseudo-code:

Read file version number

Read file header

Read file status

loop for each variable:

Read variable information

end loop

loop for each line:

Position to line descriptor

Read line descriptor (N=no. of points)

Position to start of data for current line

Read 'N' X values

Read 'N' Y values

loop for each variable:

Read 'N' values for the variable

end loop

end loop


Line Exchange Format (LXF) File
D.2 Line Exchange Format (LXF) File

The LXF (Line eXchange Format) file described here allows multi-variable survey line data to be written out to an ASCII file which allows it to be easily ported to another system.  It is similar in concept to the ASCII GXF (Grid eXchange Format) file format developed by Geosoft, Inc. (Toronto).

The LXF file has the following features:

·	complete header information, including counters, to simplify programs which read LXF files

·	full variable identification to suit most purposes

·	support for any number of variables without concern for physical line (record) length, like some spreadsheet-type data formats

·	data stored in a continuous stream for each variable, allowing it to be read quickly

·	support for different sampling rates for each variable

How to Create an LXF File	LXF File Format


How to Create an LXF File
D.2.1 How to Create an LXF File

The creation of an LXF file normally requires an application which can read survey line data in one file format and write it out in LXF file format.


LXF File Format
D.2.2 LXF File Format

An LXF file is a Line eXchange Format ASCII file of multi-variable survey data recorded along flight lines, i.e. there are several measured values (i.e. variables) at each data point along the line.

Note: as of version 1.29, I changed the #par_XXX keywords to #var_XXX and I changed #NParameter to #NVariable. The term 'variable' is now used instead of 'parameter'.

Consider the following example (discussion follows):

Begin Sample LXF File

!Airborne Radiometric Line Data

!LXF File Header--------------------------------------------------------------------

#LXFVersion

1 0

#DateCreated

93  1 25  8 37 22	!y.m.d.h.m.s

#DataSource

'Geological Survey of Canada'

#Title

'Red Lake, Ontario, 1992'

#FlownBy

'Geological Survey of Canada'

#SelectRange

77.4194   78.0484   45.9870   46.2530	!min/max longitude/latitude

#SampleTime

1000	!sample time (ms)

#Azimuth

90	![0,180], N=0, E=90

#LineSpacing

1000	!flight line spacing (m)

#NLine

30	!no. of flight lines

#NVariable

9	!no. of variables, incl. (x,y)

#Projection

proj=utm,ellps=clrk66,zone=18	!UTM zone 18

#Comment

' '

#End

!Variable Descriptors----------------------------------------------------------

#var_SourceFile

'EASTING.DAT'

'NORTHING.DAT'

'ALTIMETER.DAT'

'THORIUM.DAT'

'URANIUM.DAT'

'EXPOSURE.DAT'

'POTASSIUM.DAT'

'MAGNET.DAT'

'VLFTOTAL.DAT'

#var_DataClass

'X'	!X co-ordinate

'Y'	!Y co-ordinate

'Z'	!vertical (elevation,altimeter,barometer)

'R'	!radiometric

'R'

'R'

'R'

'M'	!magnetic

'V'	!VLF

#var_Undefined

-12345

-12345

-12345

-12345

-12345

-12345

-12345

-12345

-12345

#var_Ident

'XUE'	!X  UTM  Easting

'YUN'	!Y  UTM  Northing

'RAL'	!Radar ALtimeter

'THO'	!THOrium

'URA'	!URAnium

'POT'	!POTassium

'EXP'	!EXPosure rate

'MTF'	!Magnetic Total Field

'VTF'	!Vlf Total Field

#var_ShortName

'E'	!Easting

'N'	!Northing

'Height'

'eTh'

'eU'

'K'

'Exp'

'Mag TF'

'VLF TF'

#var_LongName

'UTM easting'

'UTM northing'

'Radar Altimeter'

'equivalent Thorium'

'equivalent Uranium'

'Potassium'

'Exposure Rate'

'Magnetometer Total Field'

'VLF Total Field'

#var_Units

'm'	!metres

'm'

'm'

'ppm'	!parts per million

'ppm'

'%'	!percent

'uR/h'	!micro-Roentgens/hour

'nT'	!nano Tesla

'%'	!percent

#var_SampleRate

1	!1 sample per #SampleTime

1

1

1

1

1

1

1

#var_Transform

1  0

1  0

1  0

1  0

1  0

1  0

1  0

1  0

1  0

#var_Comment

''

''

''

''

''

''

'exposure=1.505*K + 0.625*eU + 0.310*eTh (GSC Bulletin 360, 1984)'

''

''

#end

!Line Descriptor----------------------------------------------------------------

#line_Name

'36A-YY'

#line_StartRecord

1

#line_Npt

739

#line_GridLine

36	!belongs to planned flight line number 36

#line_Type

1	!(0=background,1=traverse,2=tie)

#line_Direction

+1	!(0=unknown,-1=reverse,+1=forward)

#line_Azimuth

90	![0,180] N=0,E=90,unknown=-1

#line_TimeStart

92  8 12 13 36 1600	!y.m.d.h.m.cs

#End

420827  420884  420942  421000  421058  421116  421174  421232  421290  421348  421406

...[rest of eastings deleted]...

464472  464533  464595  464655  464716  464778  464839  464901

5092888  5092889  5092890  5092891  5092890  5092891  5092894  5092893  5092894

...[rest of northings deleted]...

5092893  5092893  5092892  5092892

129.519  131.505  132.357  132.924  132.357  132.924  132.357  132.924  132.924  133.208

...[rest of variable 3 deleted]...

110.79  121.857  122.709  120.722

......[data streams for variables 4-9 deleted]...

!Line Descriptor----------------------------------------------------------------

#line_Name

'36B-XX'

#line_StartRecord

1

#line_Npt

213

#line_GridLine

36	!belongs to planned flight line #36 (part 2)

#line_Type

1	!(0=background,1=traverse,2=tie)

#line_Direction

-1	!(0=unknown,-1=reverse,+1=forward)

#line_Azimuth

90	![0,180] N=0,E=90,unknown=-1

#line_TimeStart

92  8 12 14 12 0800	!y.m.d.h.m.cs

#End

...[data streams follow]...

End Sample LXF File

0. General Notes

·	Programs which read LXF files should be case-insensitive to all keywords.  Abbreviated keywords are not permitted (sacrificing nothing and improving readability immeasurably).  Mixed case keywords are used in this document for readability.

·	Any lines beginning with '!' are to be treated as comments.  Also, any text which appears to the right of the data line (following a keyword) is considered to be a comment and is also ignored.  Such text can be delimited from the data on the line by a '!' for readability, but it is not required.  Comments of any kind are not allowed within the data streams, i.e. between the last #End of the line header section and the start of the next line header section.

·	Blank lines are always ignored.

·	Keywords are not enclosed in quotes (to improve readability).  All other character data (titles, variable names) must be enclosed in single quotes to allow FORTRAN free-format I/O of these items.  Do not use double quotes: some FORTRAN run-time I/O kernels reject double quotes on free-format input.

·	Each keyword is followed by a single line containing the data value(s).  Multiple values should be separated by whitespace (space, tab or comma).

·	ASCII LXF files are usually quite large, but can be compressed significantly for distribution with popular compression utilities (i.e. LHA, PKZIP).  Furthermore, splitting the LXF file into two parts can provide a measure of convenience for the receiver:

*.LXI	(Line eXchange Index/Info, small)

*.LXD	(Line eXchange Data, large)

The complete LXF file is formed by concatenating the LXI & LXD files (LXF=LXI + LXD).  Without this separation, any changes to the LXF file header would require an editor that could edit such a large file easily and quickly (there aren't many).  The LXI header part (everything before the first #line_* keyword)  is easily edited to add or change the descriptive parts (obviously the #NVariable & #NLine counters should not be touched).

1. keywords for LXF file header

#LXFVersion	(optional)

The next line contains 2 integers: a major and minor revision no.  The current revision is 1.0 (assumed if not present), i.e. 1  0.

#DateCreated	(optional)

The next line contains 6 integers: year, month, day, hour, minute second (ISO standard order).  This is the date the LXF file was created.

#DataSource	(optional)

The next line contains a 0-80 character name (enclosed in quotes) of the agency or organization which created the LXF file.

#Title	(optional, but recommended)

The next line contains a 0-80 character title (enclosed in quotes) of the survey area. If the first character (inside the quotes) is a semicolon, the title is not used as a caption for SurView, but can still be seen when the Info button is clicked in the File Display List dialog box.

#FlownBy	(optional)

The next line contains a 0-80 character title (enclosed in quotes) of the agency or organization who flew the survey.  This is not necessarily the same as the agency referred to in #DataSource.

#SelectRange	(optional)

The next line contains 4 values for the geographic box which bounds the survey area.  This may coincide with a requested area or the range which was used to extract the data set from a database.  The order of the parameters is: minimum longitude, maximum longitude, minimum latitude,  maximum latitude.  For both longitude and latitude, the minimum value is always the arithmetic, rather than spatial minimum.

#SampleTime	(mandatory)

The next line contains the primary sample interval (in milliseconds) of the data set.  This is the coarsest sample rate of all of the variables contained in the file.  For example, the #SampleTime might be 1 second, even if some variables were sampled 5 times/second.  See also #var_SampleRate.

#Azimuth	(mandatory)

The next line contains the primary azimuth of the set of flight lines of the survey.  This number must be in the range [0,180], where 0 is north-south and 90 is east-west.  It does not take into account the azimuth of the individual lines (i.e. tie lines) which may vary.  It is the planned or cross-strike azimuth of the survey.

#LineSpacing	(mandatory)

The next line contains the primary or planned flight line spacing (metres) of the survey flight lines.

#NLine	(mandatory)

The next line contains the total number of flight lines in the LXF file.  This value and #NVariable is used by an LXF reader program to loop through the remainder of the file.

#NVariable	(mandatory)

The next line contains the number of variables in the LXF file.  The number includes the X & Y co-ordinates, each of which is considered to be a variable.  This value and #NLine is used by an LXF reader program to loop through the remainder of the file.

#Projection	(mandatory)

The next line contains the projection parameters.  See Appendix E for further details on projections.  SurView supports geographic (longitude,latitude) co-ordinates however since the LXF (x,y) order is always (longitude,latitude) and the values are always floating point (not D,M,S), the only valid #Projection keyword in this case is #LonglatDegrees.

#Comment	(optional)

The next line contains a 0-80 comment (enclosed in quotes) regarding the data in the LXF file.

#End	(mandatory)

This keyword ends the LXF file header definitions and signals the beginning of the variable definition section.

2. keywords for LXF variable header

Each of the following keywords is followed by #NVariable lines, each of which contains a value for a single variable.  The values for each keyword must be in the same order for all keywords and must be in the same order as the data in the file.  This format allows additional keywords to be added in subsequent LXF versions.

The first variable MUST always be the X co-ordinate (easting, longitude).

The second variable MUST always be the Y co-ordinate (northing, latitude).

#var_DataClass	(optional)

Each of #NVariable successive lines contains a single letter (in quotes) describing the class of data to which the variable belongs.  The following codes are defined:

'X'	X co-ordinate (easting, longitude)

'Y'	Y co-ordinate (northing, latitude)

'Z'	Z co-ordinate (radar altimeter, barometric altimeter)

'R'	radiometric data component (K, eU, eTh, etc)

'M'	magnetic component (total field, vertical gradient)

'V'	VLF component (total field, quadrature)

'E'	EM data

'W'	environment data (temperature, pressure)

'!'	other data

'?'	unspecified

#var_Undefined	(mandatory)

Each of #NVariable successive lines contains the value used for 'undefined' (also known as a 'dummy' value) in the data set.  These values could be dropouts or other invalid data.

#var_Ident	(mandatory)

Each of #NVariable successive lines contains a 3-letter identifier for the data set.  The identifier can be used for creating filenames or for use in interactive programs which require menu items for variable selection.  These names must all be unique.

#var_ShortName	(mandatory)

Each of #NVariable successive lines contains the short name for the variable.  This is a title or name suitable for use on a 'Y' axis.  The name must not contain the data units: use #var_Units instead.

#var_LongName	(mandatory)

Each of #NVariable successive lines contains the long name for the variable.  This should be completely descriptive, but perhaps unsuitable for labeling axes.  The name must not contain the data units: use #var_Units instead.

#var_Units	(mandatory)

Each of #NVariable successive lines contains the name of the units for the variable.  If required, this can be concatenated with either the #var_ShortName or the #var_LongName value to create a fully qualified variable description.

#var_SourceFile	(optional)

Each of #NVariable successive lines contains the name of the data file from which the LXF data was extracted.  This allows the receiver of the data to refer to the filename if it is required to make inquiries about the data to the creator of the LXF file.  An LXF reader program could also use these filenames to store the data on the host system.

#var_SampleRate	(optional)

Each of #NVariable successive lines contains the number of data values recorded in the primary sample interval specified in the header with #SampleTime.  For most types of data, this will be 1, but some VLF data or EM data is sampled at a higher rate, i.e. 5 times in the primary sample interval (usually 1 s).  If this keyword does not appear, it is assumed that each variable is sampled once per #SampleTime.

Note:	SurView SLD files do not support variable sampling rates for different variables (not yet, anyway). If you need this, ask me and I will raise the priority on this capability.

#var_Transform	(optional)

Each of #NVariable successive lines contains two numbers: a scale and an offset.  These define a scalar transformation which is to be applied to the data as read from the file in order to recover the original or 'true' data.  The transform is applied as follows:

value = value  X  scale  +  offset

This keyword is optional: if it does not appear, no transform (i.e. scale=1, offset=0) is assumed.

#var_Comment	(optional)

Each of #NVariable successive lines contains a 0-80 character comment (enclosed in quotes), regarding the variable.

#End	(mandatory)

This keyword ends the LXF file header definitions and signals the beginning of the survey line data section.

3. keywords for LXF line header

Each of the #NLine flight line sections begins with a set of keywords which describe the line:

#line_Name	(mandatory)

The next line contains the name of the line (in quotes).  The name may contain any printable ASCII characters, including 0-9, A-Z, a-z.  This is the most general form of a flight line name/number and accommodates any flight line naming conventions.

#line_StartRecord	(optional)

The next line contains the start record number (as flown) for the line segment.  If this keyword does not appear, the default value is 1, as would be the case if the entire flight line (as flown) appears in the file and #line_Npt (see next section) is the total number of data points acquired.  For example, suppose that 1000 data points were collected in the flight line:

(a) if the entire line of 1000 points appears in the LXF file:

#line_StartRecord

1

#line_Npt

1000

(b) if a segment of the line appears (i.e. records 200-800) in the LXF file:

#line_StartRecord

200

#line_Npt

601

Note that SurView uses the record numbers as flown, i.e.:

record= #line_StartRecord -1 + i	i=[1,#line_Npt]

as follows:

(a) to label the tick marks on the flight lines

(b) to label the X axis of the stacked profiles

(c) in column 1 of the exported XLD file

so that the record numbers match the record numbers in the original survey data set.

#line_Npt	(mandatory)

The next line contains the number of data points in the line.  This assumes the sample rate is the primary sample rate defined in the header with #SampleTime.  Variables which are sampled at higher rates will have more data points.  For each variable, the number of points to be read from the LXF file is:

#line_Npt  X  #var_SampleRate

and the time separation of each of the data values is:

#SampleTime  /  #var_SampleRate

#line_GridLine	(optional)

The next line contains the planned number of the flight line, i.e. the flight line grid line.  The 'grid' line may have been flown in several sections.  This number allows the sections to be collected and processed as a single continuous line, without requiring an interpretation of the format of the #line_Name supplied.  For example, grid line 1072 may be flown in two parts, with different #line_Names, i.e. '1072-A' and '1072-B'.  However, these two flight lines share the same #line_GridLine, i.e. 1072.

#line_Type	(optional)

The next line contains an integer value which describes the type of line.  The following codes are defined:

-1	- unknown

0	- background line

1	- normal traverse line

2	- 'tie' line

If this keyword does not appear, the default value is -1 (unknown).

#line_Direction	(optional)

The next line contains an integer value which describes the line direction.  The following codes are defined:

-1	- reverse

0	- unknown

+1	- forward

If this keyword does not appear, SurView sets the value by comparing the (x,y) values at the start & end of the line.  For surveys where the lines are north-south (#Azimuth = 0), the direction depends on the Y co-ordinates, otherwise it depends on the X co-ordinates.

#line_Azimuth	(optional)

The next line contains the flight line azimuth for this particular line, i.e. [0,180]. Generally this will be the same as the azimuth defined in the header with #Azimuth, but may vary for individual lines such as tie lines.  If an invalid value (i.e. other than [0,180], including -1 for unknown) is encountered, SurView substitutes the survey flight line azimuth.

#line_TimeStart	(mandatory)

The next line contains 6 integers: year, month, day, hour, minute, centisecond (ISO standard order).  This is the date the flight line was started.  It is assumed that subsequent samples are all contiguous in time.  The year may be either 2 digits (i.e. 93), however 4 digits (i.e. 1993) is recommended.  The sixth number is centiseconds, i.e. 3600 cs is 36 seconds.

#End	(mandatory)

This keyword ends the line header definitions and signals the beginning of the survey line data.

4. Data Section

For each line, the data is written out in #NVariable streams, beginning with the X co-ordinate array, the Y co-ordinate array and followed by each of the other variables.

The data values in each stream must be separated by whitespace only, NOT commas.

Following the stream of data for the last variable is the line header section (#line_* keywords) for the next flight line.  An EOF at this point signals the end of the LXF file.

Pseudo-code to read an LXF file follows:

Read the LXF header

Read the variable description tables (#var_* keywords)

for each of #NLine lines

    Read the line header (#line_* keywords)

    for each of #NVariable variables

read #line_Npt X #var_SampleRate data values

    end loop

end loop


Binary Object (BOB), Line Contour (BLC) & Symbol (BSY) Files
D.3 Binary Object (BOB), Line Contour (BLC) & Symbol (BSY) Files

BOB,  BLC & BSY files are binary files which contain co-ordinates of open and/or closed polygons and/or text strings and/or points to be displayed.  BSY files contain symbols which are not displayed directly: they are referenced by #PointStyle statements in AOB files.  The file header contains a style table of line colours, line styles, point styles text colours, which SurView can update if they are modified by the user.

BOB & BLC files have identical internal structure: BOB files are usually used for lakes, rivers, geological features, labels and geochemistry points; BLC files are line contour files (and usually don't contain text labels).  The different filename extension was chosen to allow BLC files to be easily distinguishable from BOB files containing other types of polygonal or text data.  BSY files are similar to BOB files, with a few extra items.

How to Create a BOB/BLC/BSY File	BOB/BLC/BSY File Format


How to Create BOB/BLC/BSY Files
D.3.1 How to Create a BOB/BLC/BSY File

BOB/BLC/BSY files are created by compiling AOB/ALC files (see Appendix D.4) or ASY files with SurView's compiler tool (see Section 8.7.1) to produce a BOB,  BLC or BSY file.


BOB/BLC/BSY File Format
D.3.2 BOB/BLC/BSY File Format

BOB & BLC files have identical internal structure and BSY files are similar; each file is a binary equivalent of  the ASCII file (AOB/ALC/ASY) from which it was created (see Appendix D.4) and Appendix D.5.  These formats are not publicly documented to allow them to be easily changed by the author (while still retaining backwards compatibility with older files).


ASCII Object (AOB) & Line Contour (ALC) Files
D.4 ASCII Object (AOB) & Line Contour (ALC) Files

BOB and BLC files are both created by compiling ASCII polygon/text files using SurView's compiler tool (see Section 8.7.1).  The ASCII input file can be created using an editor or an application which reformats digitized co-ordinates.

AOB files are compiled to create BOB files; ALC files are compiled to create BLC files.

How to Create an AOB/ALC File	AOB/ALC File Format

Pick Id for Point/Line/Polygon: Syntax & Usage


How to Create AOB/ALC Files
D.4.1 How to Create AOB/ALC Files

These ASCII files may be large or small and may be created with an editor or with an application (i.e. perhaps to process a raw file of digitized points).

ALC files are generally produced by an application which applies a line contouring algorithm to a gridded data set and outputs (x,y) co-ordinates of the contour lines.


AOB/ALC File Format
D.4.2 AOB/ALC File Format

The format of both AOB & ALC files is as follows.  If an item can have either (x,y) or geographic co-ordinates, the syntax for (x,y) is shown on the left and the geographic equivalent is shown on the right.

!this title appears in the window caption and when file information is displayed

#Title "this is a title"

!you can name other files to be included when the file is compiled

#Include filename

!this disables the normal case-independent stylename string comparisons

#CaseSpecificStylenames

!this table defines styles for points, lines, polygons & text

#BeginStyleTable

!these are styles for polygons & polylines (#BeginPolygon)

#PolyStyle ps1 LineThickness LineStyle LineColour FillColour

#PolyStyle ps2 LineThickness LineStyle LineColour FillColour

...

!these are styles for text strings (#Text)

#TextStyle ts1 TextColour TextHeight TextAngle

#TextStyle ts2 TextColour TextHeight TextAngle

...

!these are point styles, i.e. for #Point, #RotPoint

#PointStyle ss1 Sname Srot LineColour FillColour Smin Smax Zmin Zmax E

#PointStyle ss2 Sname Srot LineColour FillColour Smin Smax Zmin Zmax E

!point styles can reference external symbols

#PointStyle ss3 file:sym Srot LineColour FillColour Smin Smax Zmin Zmax E

...

!this is an table of fill patterns for polygons (to be embedded in the BOB file)

#BeginPatternTable

!pattern 1 (bricks)

00000000

11110011

11110011

11110011

00000000

00111111

00111111

00111111

!pattern 2 (triangles)

XXXXXXXX

.XXXXXXX

..XXXXXX

...XXXXX

....XXXX

.....XXX

......XX

.......X

#EndPatternTable

#EndStyleTable

!define a transform to be applied to subsequent (x,y) co-ordinates

#Transform xscale yscale xoffset yoffset

!set interpolation interval (only for geographic co-ordinates)

#Interpolate interval

!define the cartographic projection or specify the (long,lat) order

#Projection pp	#Projection #LongLatDMS

(or #LatLongDMS or #LongLat or

#LatLong or #LongLatDegrees or

#LatLongDegrees)

!here is a complex polygon with a #break at an island

#BeginPolygon ps1 [Pident]	#BeginPolygon ps1 [Pident]

x y	d m s d m s  (or dd dd)

x y	d m s d m s  (or dd dd)

...	...

#Break	#Break

x y	d m s d m s  (or dd dd)

x y	d m s d m s  (or dd dd)

...	...

#EndPolygon	#EndPolygon

...

!here is a text string

#Text ts1 x y UniJust textstring	#Text ts1 d m s d m s UniJust textstring

#Text ts1 dd      dd      UniJust textstring

!this text string has it's own height & angle (over-riding #TextStyle)

#Text2 ts1 x y Unijust height angle textstring

!here is a point drawn with style 'ss1'

#Point ss1 x y Sz [Sident]	#Point ss1 d m s d m s Sz  [Sident]

#Point ss1 dd      dd      Sz [Sident]

!here is a symbol to be drawn at rotation angle 'angle'

#RotPoint ss1 x y Sz angle [Sident]	#RotPoint ss1 d m s d m s Sz angle [Sident]

#RotPoint ss1 dd   dd    Sz angle [Sident]

!this is a table of points, all drawn with style 'ss2'

#BeginPoint ss2

x y Sz [Sident]	d m s   d m s    Sz  [Sident]

x y Sz [Sident]	dd        dd         Sz  [Sident]

...

#EndPoint

!this is a table of rotated points, all drawn with style 'ss2'

#BeginRotPoint ss2

x y Sz angle [Sident]	d m s   d m s    Sz  angle [Sident]

x y Sz angle [Sident]	dd        dd         Sz  angle [Sident]

...

#EndRotPoint

!this is a rectangle, draw with polygon style 'ps1'

#Rectangle ps1 x y xsize ysize rotangle

!this is an ellipse, drawn with polygon style 'ps2'

#Ellipse ps2 x y xsize ysize angle1 angle2 rotangle

General Notes:

1.	Comment lines may appear anywhere in the file: the first non-whitespace character of the line must be '!'.

2.	All input is case-insensitive, including style names and other identifiers.  The case of the text string for #Text & #Text2 is preserved.  By default, style names are compared without regard for case: if the style names are case-specific, use the #CaseSpecificStylenames directive to disable the case-independent comparisons.

3.	Values may be separated by tabs or spaces.  CMY & RGB colour triplets must be separated by commas.  Optional values are shown above enclosed in [ ] brackets.

4.	The following items must be enclosed in "" quotes if they are composed of more than one 'word':

·	style names defined by #PolyStyle, #TextStyle & #PointStyle

·	style names used by #BeginPolygon, #Text/#Text2, #Point & #BeginPoint

·	the title supplied with #Title

·	the TextString for #Text or #Text2

·	the optional sample identifier Sident for #Point

·	the optional polygon identifier Pident for #BeginPolygon

5.	There are 3 distinct groups of items that can appear in the file.  There are a few restrictions in the order of the items:

#Title, #BeginStyleTable/#EndStyleTable, #Projection

·	any order, as long as they appear before #BeginPolygon,  #Text, #Text2, #Point or #BeginPoint

#PolyStyle & #TextStyle & #BeginPatternTable/#EndPatternTable

·	any order,as long as they are within #BeginStyleTable/#EndStyleTable

#BeginPolygon/#EndPolygon, #Transform, #Text, #Text2, #Point & #BeginPoint/#EndPoint

·	any order, any combination

6.	Colour Names

LineColour, FillColour & TextColour names for #PolyStyle, #TextStyle & #PointStyle must be a reserved colour name (i.e. RED, GREEN, BLUE etc) or an RGB(r,g,b) or CMY(c,m,y) triplet.  See Appendix F for a complete description of the colour names.

7.	TextHeight for #TextStyle & #Text2 and Smin, Smax for #PointStyle are in units of plot (paper) mm and so do not change size as the picture is zoomed in or out.  However, they will always plot at the indicated size in mm and is independent of the chosen map scale.  A negative value indicates the height is in metres: it will increase in size if the map view is zoomed in, i.e. it is dependent on the map scale.

8.	Rotation angles (for #PointStyle, #RotPoint, #BeginRotPoint, #Ellipse & #Rectangle) are measured counterclockwise.  East=0, north=90.

Individual Items (same order as above example)

#Title

This is used as the map window caption if the file is the first file in the display list and there is no SLD file present.  #PolyStyle, #TextStyle & #PointStyle style names appear in the dialog box which allows the display attributes to be modified.  If the first character (inside the quotes) is a semicolon, the title is not used as a caption for SurView, but can still be seen when the Info button is clicked in the File Display List dialog box.  #Title is optional, but recommended.

#Include

This keyword instructs the compiler to suspend reading the current file and start reading the indicated filename without any change of status or mode.  It is identical to using a text editor to insert the file into the current file before compiling it.  The filename can be a fully qualified pathname or a simple filename.SurView first looks for the file as specified.  If it can't find it, it removes the drive and/or directory (if present) from the filename and looks for the file in SurView's 'home' directory, i.e. where surview.exe is located.  There are no restrictions or assumptions on the filename extension - it must be explicit.

The #include directive allows you to have a standard set of patterns (see #BeginPatternTable) in a single file (perhaps in the SurView directory) which is shared by several AOB/ALC files when they are compiled.  It also allows sets of #PolyStyle,  #TextStyle or #PointStyle tables to be shared between several files.

#CaseSpecificStylenames

By default, all stylenames (for polygons, points and text) are compared in a case-insensitve manner.  This includes looking up a style name in the style table as it is being read to ensure there are no duplicate style names (#PolyStyle, #PointStyle & #TextStyle) and subsequently, when the features are being read (#BeginPolygon, #Point, #Text & #Text2).  Case sensitivity can be enabled (on a global basis, i.e. for all stylenames) by using the #CaseSpecificStylenames directive.  All subsequent comparisons of style names must match exactly.  Note that this keyword must appear before #BeginStyleTable or it will have no effect.

#BeginStyleTable, #EndStyleTable

These keywords define a block which contains the definitions of all of the text, point and polygon styles used in the remainder of the AOB file.  In addition the block can contain another sub-block of user-defined patterns.  The styles and user pattern block may appear in any order and grouping within the style block.

#PolyStyle

This defines the style of a polygon (open or filled) that is referenced by the #BeginPolygon keyword.

The first parameter is the style name (see note 2 & 4 above).

LineThickness for #PolyStyle is ignored for now: use 1

LineStyle for #PolyStyle must be one of: solid, dash, dot, dash-dot, dash-dot-dot

Note that if the FillColour for a polygon is 'none', the polygon is 'open', otherwise FillColour must be a valid colour name or RGB/CMY triplet.  For a closed polygon, there is no need to duplicate the first and last point - SurView will close the polygon for you.  However, since SurView allows you to disable the 'fill' of closed polygons and just plot the outline, you should close the polygon anyway, so the outline will appear 'closed'.

The #PolyStyle keyword only allows the polygon fill colour to be specified.  However, the attribute dialog box for polygon fill colours (Section 8.2.3) contains additional fill patterns that may be selected (default Windows patterns as well as any user-defined patterns defined with #BeginPatternTable/#EndPatternTable).  This pattern information is saved in the BOB file.

#TextStyle

This defines a text style which is referenced by the #Text & #Text2 keywords.

The first parameter is the text style name (see note 2 & 4 above).

TextHeight is in units of projected metres if negative, output device mm if positive (see note 7 above).

TextAngle is the angle of rotation of the text string (east=0, north=90).

#Text entries are drawn with the height & rotation angle from the #TextStyle, but #Text2 entries have their own height & rotation angle which take precedence over the values in #TextStyle, allowing them to be over-ridden.

#PointStyle

#PointStyle defines a point style in a similar fashion to #PolyStyle & #TextStyle.

Refer to the discussion of #Point (below) for details.

#BeginPatternTable, #EndPatternTable

These are used to define a set of user-defined patterns.  Windows provides 6 hatch pattern styles that can be used to fill the interior of a polygon (the dialog box is described in Section 8.2.1.1; polygon styles are described in Section 8.2.3).  Additional styles can be defined in the AOB file using the #BeginPatternTable,  #EndPatternTable section of the style table (one per file).

When the pattern table feature was added, I chose not to increase the complexity of the AOB file syntax (this would require an optional pattern name to be supplied with the #PolyStyle keyword).  Instead, the patterns can be selected for each closed polygon when the compiled BOB file is viewed with SurView (the pattern is then saved in the BOB file along with all of the other attributes).  Note that the patterns must appear in the file in which they are intended to be used.  This allows the AOB file to stand alone without relying on an external file of pattern definitions.

Each pattern is defined by an array of 8 X 8 bits and is entered in a picture format: 8 rows consisting of exactly 8 characters each.  The total number of rows within the #BeginPatternTable/#EndPatternTable block must be a multiple of 8.  Blank lines within the pattern and the entire table are ignored: you may wish to add blank lines and/or comments between each pattern (see example above).

In each character string, a '0' or '.' character represents a 0 bit (i.e. the background colour) and any other character ('1' or 'X' or ...) is interpreted as a 1 bit (the foreground colour).  Spaces are not allowed within the character string.

Remember that these patterns supplement the existing 6 standard hatch patterns (which are always available and may be sufficient for most purposes).

#Transform

#Transform applies a linear transform to all subsequent non-geographic (x,y) co-ordinates read:

E=x*xscale + xoffset

N=y*yscale + yoffset

The resulting (E,N) must be valid (easting,northing) for the specified projection. The default values are xscale=yscale=1 and xoffset=yoffset=0.  You may change the #Transform anytime between polygons and/or text and/or point objects.  #Transform is ignored if the #Projection is geographic.

The transform feature is particularly useful if you have a file of digitized co-ordinates in arbitrary units (i.e. mm, inches), which can be converted to UTM metres (for example) with an appropriate linear transform applied by SurView on the fly as it compiles the AOB file.  This of course assumes that there is a linear relationship between the two reference systems.

#Interpolate

#Interpolate specifies the interval to be used to interpolate (x,y) co-ordinates for the polygons: a 0 or negative value disables interpolation.  A positive value causes SurView to interpolate (x,y) values at the specified interval when the polygon is drawn.  The units are the same as the (x,y) units: if the file contains (longitude,latitude) the interval is decimal degrees; if the values are (easting,northing) the interval is metres.

The #Interpolate keyword may appear any number of times within an AOB file, however it must appear outside of a #BeginPolygon/#EndPolygon pair.  When a polygon is drawn, the most recent value of the #Interpolate keyword is used, whether it is 0 to disable the interpolation or not.

The interpolation is performed before projecting the data points.  This feature is intended primarily to allow curved latitude (or longitude for some projections) lines to be specified simply as a polygon containing two (longitude,latitude) endpoints. Note that the interpolation interval read from the AOB/ALC file is not used when compiling the file, it is simply stored in the binary BOB/BLC file for subsequent use by SurView when the file is displayed.

At the moment, the #Interpolate option is ignored unless the co-ordinates are geographic.  It may be of use in the future if and when capabilities are added to plot data provided in an arbitrary projection at any other projection.

#Projection

This specifies the projection parameters (pp) and is mandatory.  See Appendix E for further details.

There are 6 special keywords used to denote geographic (longitude,latitude) co-ordinates:

#LongLatDMS	(same as older #LongLat)

#LongLatDegrees

#LatLongDMS	(same as older #LatLong)

#LatLongDegrees

The #LongLat... & #LatLong... choices allow the order to be either (longitude,latitude) or (latitude,longitude).

The #L...DMS & #L...Degrees choices allow each longitude or latitude value to be expressed either as a (degrees,minutes,seconds) triplet or a single floating-point decimal degree value of arbitrary precision.  If #L...DMS is used, there must be 6 values (2 triplets) for each vertex.  If #L...Degrees is used, there must be 2 floating-point values for each vertex.  Note that in the latter case, it just reads the first 2 values and ignores the rest of the values, so if 2 triplets are supplied, but #L...Degrees is used, the co-ordinates will be wrong, but will not cause a compile error.

Note that this format applies to all (x,y) co-ordinates in the file, including #BeginPolygon/ #EndPolygon and #Text/#Text2.  Each AOB/ALC file may have only one #Projection and you may not mix geographic and projected data in the same file.  However, if the first occurrence of #Projection specifies a geographic projection, you may have other occurrences of #Projection in the file, provided they also specify a geographic projection.  This allows you to switch back and forth between (longitude,latitude) & (latitude,longitude) order and/or between (D,M,S) triplets and decimal degree values.

The use of the geographic co-ordinates and #Interpolate (see below) allows curved lines of longitude and latitude to be specified with only 2 endpoints:

...

#Interpolate 0.2	!interpolate every 0.2 degrees

#Projection #LongLatDMS

#BeginPolygon long

66 0 0 45 0 0	!line of longitude at 66W from 45N to 50N

66 0 0 50 0 0

#EndPolygon

#BeginPolygon long

66 0 0 45 0 0	!line of latitude at 45N from 66W to 72W

72 0 0 45 0 0

#EndPolygon

#BeginPolygon, #EndPolygon, #Break

Each polygon is defined by a set of co-ordinates enclosed in the #BeginPolygon, #EndPolygon keywords.

The first parameter is the name of a style defined with #PolyStyle (see note 2 & 4 above).

Each line of text between the #BeginPolygon/#EndPolygon keywords contains the co-ordinates of a vertex of the polygon.  See the description for the #Projection keyword for details on the format of the co-ordinates.

#Break is used to specify a breakpoint in a complex polygon such as a lake containing islands.  The following rules for complex polygons apply:

·	both island & lake polygons can be traversed in any order (clockwise or counterclockwise)

·	first enter the (x,y) list for the complete lake circumference (you don't have to close it: SurView will do that for you)

·	insert #Break before beginning the (x,y) list for each island

·	after the (x,y) list for the last island, do not put #Break or any other (x,y): simply end the complex polygon with the usual #EndPolygon.

Polygon Information & Picking

The second parameter of #BeginPolygon is an optional polygon/line identifier string which describes the polygon.  If this parameter is not supplied, the polygon/line can not be 'picked' to show the information (see Section 8.5.1 and Section 8.5.1.3 for details on picking polygons and lines.  If it is supplied, it must be enclosed in "" double quotes if it is more than one 'word'.

When a polygon is picked, SurView interprets the 'pick id' and either performs an action or displays the indicated information.  If the pick id contains several possible actions, a menu is displayed.  A complete description of the pick id and how it is used can be found in Appendix D.4.3.

#Ellipse, #Rectangle

These two primitive graphics functions are quite similar.  Both of them require the following:

- the stylename (defined with #PolyStyle) to be used to draw the figure

Both the ellipse and rectangle are outlined and filled according to the line & fill colour defined in the #PolyStyle, just as for a polyline/polygon.  If the fill colour is 'none', then only the outline is drawn.

- the (x,y) co-ordinates of the centre (projected or geographic)

- the size (width & height)

For the ellipse, this corresponds to the lengths of the major and minor axis of the ellipse.

- the angle of rotation (as for all other angles: counterclockwise from east=0)

In addition, the ellipse requires two additional values: the starting & ending angles of the elliptical arc, measured counterclockwise (east is 0, north is 90).  The direction of the arc is always counterclockwise from the first angle to the second.  The angles can be selected to choose either an elliptical pie slice or the complement of the figure. For example:

angle1	angle2	description
0	90	1/4 pie slice (upper right quadrant only)
90	360 (or 0)	3/4 pie (excluding upper right quadrant)
The current version of SurView ignores the rotation angle for #Ellipse figures which are not circular (ellipse rotation not supported by Windows).  Circular #Ellipse figures are rotated simply by adjusting the 2 angles.

#Text

The first parameter is the name of a text style defined with #TextStyle (see note 2 & 4 above).

UniJust for #Text is a code [0,8] for justification (alignment) of the text string (as used by the UNIRAS graphics library):

6	7	8

3	4	5	For example, 4 is (centre,centre) justification

0	1	2

Normally, Surview strips off all leading & trailing whitespace from the text string.  If you wish to have 'hard' spaces in the string, you can use the '~' character instead and SurView will change each occurrence of '~' to a space before plotting.  This is useful when positioning a text string which is to be offset from a point.  In the following example, the city name has the same co-ordinates as the city symbol, but will be plotted a bit to the right because there are 3 leading 'spaces' in the text string.

Example:

#Point	towns          75.8   45.2   10

#Text 	townlabels   75.8   45.2     3    "~~~Ottawa"

#Text2

#Text2 is identical to #Text, except that following the UniJust code (before the text string), are 2 extra values: the text height & rotation angle.  These values over-ride those specified in the #TextStyle.  Note that positive values of text height are in mm: negative values are in projected metres.

Example (50 m text at 45 degrees):

#Text2 townlabels   75.8  45.2 3  -50 45  "Ottawa"

#Point/#RotPoint, #BeginPoint/#EndPoint (and #PointStyle)

The first parameter of #PointStyle is the name of a style to be defined.  The first parameter of #Point (or #BeginPoint) is the name of a style defined with #PointStyle (see note 2 & 4 above).

#RotPoint is identical to #Point, except that it has an extra parameter after the value (and preceding the optional Sident sample identifier).  This parameter is the rotation angle of the point symbol and over-rides the rotation angle associated with the #PointStyle.  This allows the rotation angle to be varied individually for each point in a style group, rather than having the same rotation angle.

The #BeginPoint/#EndPoint block is useful if there are many points to be defined and provides an alternative to using #Point for each point.  When using #BeginPoint/#EndPoint, the stylename appears once for the block and subsequent point declarations within the block do not require the #Point keyword or the point stylename.

The LineColour & FillColour are the same as described for #PolyStyle and are used to draw the symbol.  For some symbols (like '+'), the FillColour is not used, but must still be supplied.

Srot is the angle of rotation for the symbol.  For 'Circle' this value has no effect, however for other symbols it can be used to create new 'derived' symbols.  A rotation angle of 45 degrees can turn a '+' symbol into an 'X' and a 'square' into a 'diamond'.

Internal & External Symbols

The symbol name Sname referenced by #PointStyle must be one of the following reserved names:

Symbol	Description
Circle	an open or filled circle
Square	an open or filled square
Triangle	an open or filled isosceles triangle
Plus	a '+' sign (no fill colour)
5-Star	the classic 5-point star (open or filled)
Arrow-Tip	an arrow with the 'tip' at the indicated point
Arrow-Tail	same as Arrow-Tip, but with the 'tail' at the point
Circle-Plus	same as Circle, but with a '+' (like Plus) in the middle
Circle-Dot	same as Circle, but with a 'dot' in the middle
or it can be of the form filename:symbolname where 'filename' is the name of a BSY symbol file file and 'symbolname' is the name of a symbol defined in the ASY file with #BeginSymbol.  Note that SurView does not verify either the existence of the .BSY file or the existence of the symbol of that name inside the .BSY file when it compiles the AOB file to create the .BOB file.  SurView only looks for the BSY file and the symbol definition when a BOB file is drawn: if it can't find the symbol, it will simply draw a white circle and label it with the filename:symbolname combination that could not be resolved.

Scale Factors

The final 5 numbers (Smin, Smax, Zmin, Zmax, E) are scale factors which are used to scale the symbol.  While this may seem overwhelmingly complex for simple symbols (towns, cities, mines) they do provide a general purpose scaling mechanism which makes it possible to display Geochemistry 'dot' symbols for various elements.

The 5 values are used to scale the 'Sz' symbol size (supplied with #Point) as follows:

 (Sz   - Zmin)E

r = Smin + (Smax-Smin) X (-----------)

 (Zmax - Zmin)

where:

Sz	is the value supplied with #Point

Smin	is the minimum size	(>0 is mm, <0 is metres)

Smax	is the maximum size	(>0 is mm, <0 is metres)

Zmin	is the minimum value

Zmax	is the maximum value

E	is an exponent (usually in the [1,2] range)

The values of Sz, Zmin & Zmax all have the same units.  Points used for Geochemistry will usually have values in concentration units (ppm, %).

If the symbol is circular, the 'size' of the symbol corresponds to the diameter of the circle.

The scaling equation and scale factors are also discussed in Section 8.2.3.1.

Special Values for [Zmin,Zmax]

If Zmin = Zmax = 0 in the AOB file, SurView will substitute the actual minimum & maximum values of the Sz values as read from the #Point entries for that #PointStyle.  These are written out to the BOB file.  This provides an easy way of establishing 'starting' values.  There are no heuristics applied to the [Smin,Smax] values read from the AOB file.

Statistics

As SurView reads the AOB file and creates the BOB file, it computes the following statistics for each #PointStyle it encounters (whether meaningful for that point or not):

·	[min,max] range of the Sz values

·	mean & standard deviation of the Sz values

·	a table of 20 fractile values (i.e. the value at the 98% percentile)

SurView displays these values in the dialog box used to edit the display attributes of the points (see Section 8.2.3.1).

Point Order

There are no restrictions on the order of the #PointStyles in the style table or on the order of the #Point entries.  This is a general purpose facility for drawing points and SurView doesn't known whether the points are cities & towns or geochemical data: it just reads the AOB (BOB) file and plots the points, polygons and text items in the order that they appear.  Therefore, if the #Point entry represents Geochemical data, it is essential that the #Point entries for each #PointStyle be ordered from the largest value to the smallest value for two reasons:

·	the larger symbols must be plotted first so that they don't obliterate the smaller symbols

·	the statistical calculations (fractiles, cumulative probability) rely on this descending order (SurView does not do any sorting itself)

Sample Identifier for Picking

The sample identifier Sident which follows the Sz value is optional, as indicated by [Sident] in the example far above.  If it is supplied, it must be enclosed in "" double quotes if it is more than one 'word'.  While viewing a set of point data, the RIGHT or MIDDLE mouse button can be used to 'pick' a point (see Section 8.5.1 for right mouse button configuration).  SurView will display the (x,y) of the point as well as the Sz value, the style name and the Sident identifier.  Therefore it is useful to set the value of Sident to the 'sample id' (or other information for that sample).

Unlike polygons, which can not be picked unless the AOB file was created with the optional pick id, point data can always be 'picked'.  Appendix D.4.3zz.d.4.3 contains a complete description of the pick id options and how they are used.

Simple Points (i.e. non-Geochemical)

For simple points of fixed size, there are several different combinations of scale factors that can be used to achieve the desired result.  However, the simplest method is to specify E=0 which reduces the equation to:

r = Smax

With a value of E=0, SurView ignores the values of Smin, Zmin, Zmax (and Sz). You can also set Smin=Smax so that the equation reduces to Smin.   However in all cases, you are still required to supply values all 5 values: for clarity, use values like 0 for the dummy values.  In the following example, the symbols are plotted at a fixed size of 10 and the Sz value for #Point is ignored.

	Smin	Smax	Zmin	Zmax	E
#PointStyle city circle black red  0	0	10	0	0	0
...

	Sz	Sident
#Point city x y	0

Also remember that positive values of Smin & Smax are used for the size in mm (regardless of map scale) and negative values are interpreted as 'map projection metres' and are scaled according to the map scale just like any other polygon (just as for TextHeight above).  This means that points with negative sizes will increase in size as you zoom in, but positive sized points will become smaller, relative to the other polygons.

SurView allows the 5 scale factors and the symbol type to be edited in one dialog box (see Section 8.2.3.1), which also provides statistical information and graphs to aid in the selection of appropriate scale factors for Geochemical data.


Pick Id for Point/Line/Polygon: Syntax and Usage
D.4.3 Pick Id for Point/Line/Polygon: Syntax & Usage

1. What is the Pick Id?

Each point, polyline or polygon item in a .BOB file can have an optional 'pick id' defined for it.  The polyline/polygon pick id has a maximum length of 50 characters, but there is no practical limit for the pick id assigned to a point.

The pick id can be just a simple identifier for the feature which either identifies it or describes it:

Example	Interpretation
"P12"	point number 12
"STN XYZ-3"	station XYZ-3
"granite"	polygon type
"Lake Ontario"	feature 'name'
but it can also contain a list of one or more instructions which tells SurView what to do when the feature is picked:

Magic Code	File	Example	Action to be Performed
[I]	.AOI	"[i]P12"	display a block of ASCII text from a .AOI file, identified by the key "#P12"
[H]	.HLP	"[h]granite"	display the topic "granite" in a Windows .HLP file
[P]	.BMP	"[p]site"	launch Windows PaintBrush to view the file "site.bmp"
[D]	.DBF	"[d]#123"	display physical record number 123 from a DBF file
		"[d]stn=XYZ-3"	display 1 or more records from a DBF file i.e. all records for which the value of field 'stn' is 'XYZ-3'
		"[d]stn==XYZ-3"	display only a single record from a DBF file, i.e. the first (and only?) record for which the value of field 'stn' is 'XYZ-3'
[R]	.EXE (run a program)	"[r]notepad readme.txt"	launch the Windows Notepad application to edit 'autoexec.bat'
[E]	execute any file (File Association)	"[E]manual.doc"	execute the 'manual.doc' file (presumably a Word for Windows application, since it uses the '.doc' filename extension.  SurView will ask Windows to execute the file and Windows will find the appropriate application using the File Association setting.
[*]	surview.exe	[*]XXX.BOB,YYY.SLD	execute another copy of SurView with 0 or more files or options as command-line parameters.  Note: you can only use [E] to execute a single SurView file (i.e. XXX.BOB): Windows will use the File Association setting to launch surview.exe. Use [*] to launch a set of files and/or command-line options.
Here is a sample pick id, containing some of the above items:

"STN XYZ-3 [i]P12 [h]granite [p]site [d]stn=XYZ-3 [r]notepad c:\autoexec.bat"

2. How Does SurView Use the Pick Id?

Polylines and polygons can not be picked unless they have been created with a 'pick id' in the AOB/BOB file.  On the other hand, point data can always be 'picked' (if there is no pick id, SurView just displays the location and 'value').  So the first use of the 'pick id' is to determine which polylines or polygons can be 'picked'.

If the pick id contains only a single item (i.e. 'display a picture'), then SurView performs that action without further interaction.  If there are several actions indicated in the pick id, SurView displays a menu of the possible actions.  After performing a selected action, SurView re-displays the menu.

3. Pick Id Syntax

There are several simple rules to be followed when constructing a pick id:

Embedded Spaces

·	If the entire pick id string contains any embedded spaces, the entire string must be enclosed in double quotes

·	Commas or whitespace preceding the special '[' character which identifies each pick code may be used to separate multiple actions within the string.

·	AOI keys may have embedded spaces (i.e. "[I]station 123"), but Windows .HLP topic names (these are called 'context strings' if you are familiar with the creation of Windows .HLP files) may not have embedded spaces (this is a WinHelp application restriction).  The context strings may contain the '_' underscore character.  The following is invalid: "[H]station 123", however, SurView will accept it and convert it to "station_123" before invoking the WinHelp application.

·	Case is not significant for key lookup for either AOI, .HLP or .DBF files.

Order

·	The simple id must always appear as the first item in the string: all other actions must begin with a special code enclosed in square parentheses, i.e. [H]

Filenames and File Locations

·	Picture files are assumed to be in the same directory as the .BOB file which references them.  If a filename extension is not supplied, SurView first tries to find a .BMP file, then a .DIB file.  No other picture file type is supported.

·	External .AOI, .HLP and .DBF files are implicitly referenced by the .BOB file which contains the pick id.  If the referenced filename (without the extension) is different than the name of the .BOB file, each of the [I], [H] & [D] expressions may specify the name of the file by appending a '@' character and the filename to the expression.  For example, if GEOLOGY.BOB contains the following pick id segments:

Example	External File to be Referenced
[i]P12	GEOLOGY.AOI
[h]granite	GEOLOGY.HLP
[d]stn=XYZ-3	GEOLOGY.DBF
[i]P12@other	OTHER.AOI
[h]granite@other	OTHER.HLP
[d]stn=XYZ-3@other	OTHER.DBF
Note that regardless of whether the filenames are coded with the pick id or whether they are implicitly derived from the .BOB filename, all of the files are assumed to be in the same directory as the .BOB file which references them.  However, Windows does provide a useful feature to assist it in finding Windows .HLP files: if the GEOLOGY.HLP file is not in the same directory as GEOLOGY.BOB, you can make an entry in the [FILES] section of the Windows WINHELP.INI file to specify the directory in which it can be found, i.e.:

WINHELP.INI:

[FILES]

geology.hlp=c:\myhelp\geo

4. DBF Files

The examples shown above in the introduction ("What is a Pick Id?") illustrate the 3 possibly methods that can be used to refer to a record in a DBF file.  A point, polyline or polygon feature can be associated with:

a specific physical record	"[d]#123"
a set of 1 or more records which match a key value	"[d]stn=XYZ-3"
one record which matches the key value	"[d]stn==XYZ-3"
If '=' is used in the expression, SurView will search the entire DBF file looking for all records which satisfy the criterion: it could be one, or it could be several - there is no way of knowing until the entire file has been read.  However, if '==' is used, SurView searches the DBF file and stops when it finds the first record.  This could be the only record or the first record of several, but it is intended to be used when there is only one record, i.e. to prevent SurView from searching the entire DBF file each time.

See Section 8.5.1.2 for information on the DBF record display.

5. Choosing Polygon/Point Identifiers for .AOI/.HLP Keys

The choice of polygon and/or point identifiers depends on the requirements of the application data set and the nature of the data.  For simplicity, the following discussion focuses on polygons, but it applies equally well to points.

Note that the identifier is independent of the polygon style.  The style determines the appearance (colour, pattern) of the polygon: the identifier is only used to find information when the polygon is 'picked'.

There are several possible situations, as illustrated by the following 3 examples:

(a) Each polygon has unique information:

XXX.AOB File

#BeginPolygon granite [I]granite-XYZ

...

#EndPolygon

#BeginPolygon granite [I]granite-ABC

...

#EndPolygon

#BeginPolygon granite [I]granite-AAA

...

#EndPolygon

XXX.AOI File

#granite-XYZ

  This is the unique description of the XYZ granite formation...

#granite-ABC

  This is the unique description of the ABC granite formation...

#granite-AAA

  This is the unique description of the AAA granite formation...

(b) Several polygons share the same information:

XXX.AOB File

#BeginPolygon granite [I]granite

...

#EndPolygon

#BeginPolygon granite [I]granite

...

#EndPolygon

#BeginPolygon granite [I]granite

...

#EndPolygon

XXX.AOI File

#granite

Granite is a plutonic rock composed of quartz, potash, feldspar,...

(c) Some unique information per polygon, but also shared information:

XXX.AOB File:

#BeginPolygon granite [I]granite-XYZ

...

#EndPolygon

#BeginPolygon granite [I]granite-ABC

...

#EndPolygon

#BeginPolygon granite [I]granite-AAA

...

#EndPolygon

XXX.AOI File

#granite-XYZ

  This is the unique description of the XYZ granite formation...

  Granite is a plutonic rock composed of quartz, potash, feldspar,...

#granite-ABC

  This is the unique description of the ABC granite formation

  Granite is a plutonic rock composed of quartz, potash, feldspar,...

#granite-AAA

  This is the unique description of the AAA granite formation.

  Granite is a plutonic rock composed of quartz, potash, feldspar,...

As you can see from example (c), the .AOI file could have a significant amount of duplicate information in the file.  This may not be a problem if the shared information is small, but if a paragraph of 50 lines is repeated 100 times, perhaps it may make the AOI file unnecessarily large.

The .AOI file is a flat ASCII text file, with a single identifier for each block of text: SurView has no hierarchical text search capability, i.e. there is no general facility to 'pick' polygon 'granite-XYZ' to see the specific description of the polygon and then view related information, such as a general description of 'granite'.  You must evaluate each set of data to determine the best way to manage this information, based on your needs.  A good starting point would be to decide which set of information is more important: the information which is unique to each specific polygon or the information which is common to all polygons in a group.

An alternative is to use 2 AOI text files, one containing the individual polygon descriptions and the other containing the text material which is shared by several polygons.  Using Example (c) again:

XXX.AOB File:

#BeginPolygon granite "[I]granite-XYZ [I]granite@common"

...

#EndPolygon

#BeginPolygon granite "[I]granite-ABC [i]granite@common"

...

#EndPolygon

#BeginPolygon granite "[I]granite-AAA [i]granite@common"

...

#EndPolygon

XXX.AOI File

#granite-XYZ

  This is the unique description of the XYZ granite formation...

#granite-ABC

  This is the unique description of the ABC granite formation

#granite-AAA

  This is the unique description of the AAA granite formation.

COMMON.AOI

#granite

  Granite is a plutonic rock composed of quartz, potash, feldspar,...

Since there are 2 choices or actions contained in each pick id, each time a polygon is picked, SurView will display a menu giving you a choice of items to be viewed.  For example, if the first polygon is picked the choices will be:

·	display text for 'granite-XYZ' from XXX.AOI

·	display text for 'granite' from COMMON.AOI

6. The Advantages of Using Windows .HLP Files for Keyed Text

AOI text files have a flat structure which limits their usefulness in many situations.  On the other hand, Windows .HLP files provide a more powerful and compact (they are compressed) method of storing the information to be displayed for picked features.  .HLP files have hypertext capability: when a polygon is picked, SurView invokes WinHelp to jump directly to the information for that specific polygon.  At that point, the user is free to browse the topic or the remainder of the WinHelp .HLP file, which may have hypertext jumps to other related sections, popup definitions or any of the other features of .HLP files.  Using the example, above, each of the unique granite-XYZ, ABC & AAA topics might also have a hypertext reference to 'granite', perhaps as a popup 'definition' item.  The text for this popup topic would appear only once in the .HLP file.

The creation of WinHelp .HLP files is beyond the scope of this document, but it is not difficult.  You will need to use an application that can create a .RTF (Rich Text Format) file, which is then compiled by the Microsoft Help Compiler (HC*.EXE) to produce the .HLP file.  Most good word processors can 'Save As' a .RTF file.  Microsoft Word for Windows is a recommended word processor for creating .RTF files.


ASCII Symbol (ASY) File
D.5 ASCII Symbol (ASY) File

ASY/BSY files are a special case of AOB/BOB files and are used to define special 'external' symbols for use in other AOB files.  ASY files (which use the same syntax as AOB files) are compiled by SurView to create binary BSY files.

The #PointStyle keyword in an AOB file (see Appendix D.4.2) refers to these external symbols (in addition to the few built-in 'square', 'circle'  etc. symbols) by BSY filename and symbol name.

How to Create an ASY File	ASY File Format


How to Create an ASY File
D.5.1 How to Create an ASY File

ASY symbol files are relatively small ASCII files of (x,y) co-ordinates which can easily be created with a text editor.  Most symbols can be created in a few minutes by entering (x,y) co-ordinates read from a piece of graph paper on which the symbol has been sketched.

When the ASY file has been created, it is compiled with SurView's AOB/ALC/ASY Compiler tool (see Section 8.7.1) to create a corresponding BSY file.  The BSY file should then be moved to SurView's 'home' directory (where SURVIEW.EXE resides) so SurView can find it.  When the symbol is referenced by a AOB/BOB file, SurView searches for the BSY file first in the same directory as the BOB file and then in SurView's 'home' directory.


ASY File Format
D.5.2 ASY File Format

The following discussion of the format of ASY files assumes that you are completely familar with the syntax and format of AOB files (see Section D.4.2).

ASY files use exactly the same syntax as AOB files, with the following exceptions:

1.	The #Projection keyword is not allowed in ASY files.  It is meaningless: all (x,y) co-ordinates are relative to the symbol's unit size.

2.	Pick identifiers (for #BeginPolygon, #Point & #RotPoint) are read (if present) and must have the correct syntax as for a .AOB file, but are ignored and have no meaning in a .ASY/.BSY file.

3.	Each symbol must begin with the following statement:

#BeginSymbol symbol-name

where 'symbol-name' is a 1-10 character name of your choice.  As always, case is not significant and if the symbol name contains more than one 'word', it must be enclosed within double quotes, i.e. "gold mine".   All symbol names must be unique within each ASY file and the compiler tool will ensure that they are unique.

#PointStyle statements in AOB files will refer to external symbols (as opposed to the internal 'circle', 'square' etc symbols) as 'filename:symbol-name', where 'filename' is the name of the .ASY/.BSY file (without the extension) and 'symbol-name' is as it appears in the #BeginSymbol statement.

All statements which follow a #BeginSymbol statement, up to the next #BeginSymbol statment (or end of file) are considered to be part of the definition of the symbol.

Tip:	use comments (lines starting with '!') liberally in the ASY file to assist in editing the symbol definition later, after viewing it (i.e. when used in a AOB file).

4.	#PointStyle statements in ASY files may refer only to SurView's  internal symbols (circle, square, triangle, plus, 5-star, arrow-tip, arrow-tail, circle-plus, circle-dot).  They may not refer to external symbols (in the same file or other files) using the filename:symbol-name syntax.

5.	Line & fill colours for #PolyStyle, #PointStyle and #TextStyle accept the usual colour names, i.e. "red", "RGB(10,100,20)", "CMY(200,45,90)", including "none" for fill colours.  These colours are used in the ASY file when you want fixed or 'hardcoded' colours for the symbol or parts of the symbol. See Appendix F for a complete description of the colour names.

However, in addition to the standard colour names, the keyword 'deferred' is also an acceptable colour name for line, fill & text colours.  When the external user-defined symbol is referenced in a #PointStyle statement in a .AOB file, the line & fill colours for the symbol replace corresponding occurrences of 'deferred' in polygon and point styles for the symbol definition.  The symbol's line colour replaces 'deferred'  in text styles.

6.	All of the dimensions (text height, rectangle & ellipse sizes, symbol sizes) and all of the co-ordinates in .ASY files are assumed to be dimensionless and are usually in the range [-0.5,+0.5] so that the symbol will have a size of 1.  This unit-sized symbol is then scaled at plot time by the size of the symbol specified in the #PointStyle statement in a .AOB file.  This AOB symbol size can be either 'mm' (positive value) or 'metres' (negative value), but the sizes must always be positive in .ASY symbol files.

The (0,0) point of the symbol is plotted at the (x,y) location of the data point in the AOB file, as specified in the #Point or #RotPoint statement (or within a #BeginPoint or #BeginRotPoint block).

Tip:	you can insert #Transform statements wherever you wish to change the scale of the (x,y) co-ordinates.  For example, if you have (x,y) co-ordinates in the range [0,100], you can scale them to [-0.5,+0.5] using the following:

#Transform   0.01   0.01   -0.5  -0.5

Don't forget to turn the transform off with a neutral transform statement:

#Transform   1  1  0  0

if the next symbol in the ASY file does not require such scaling.

7.	#Text/#Text2 statements in an ASY file may contain special characters to indicate points at which special values should be inserted into the string.  This provides a method of labelling the symbol with values supplied in the AOB file:

Special Character	Meaning
'\v'	insert the value of the symbol as it appears in the #Point or #RotPoint statement.
'\a'	insert the angle of rotation of the symbol as specified in either the #PointStyle or #RotPoint statement
'\z'	insert the azimuthal angle of rotation of the symbol as specified in either the #PointStyle or #RotPoint statement. By definition, azimuth = 90 - 'rotation angle': Rotation Angle Azimuth 0 90 90 0 -90 180 135 315
For example, the text string may be:

"rotation angle=\a, azimuth=\z & value=\v"

and when the symbol is drawn, the actual label might appear as:

"rotation angle=60, azimuth=30, value=2.562"

7.	Symbol Rotation

If the .ASY symbol is invoked in the AOB file with #RotPoint or #Point/#PointStyle (with a non-zero rotation angle), then the entire symbol (all polygons & text items) will be rotated by the indicated angle.  For example, if the ASY symbol contains text drawn at a 45 degree angle and if that symbol is rotated an additional 45 degrees (i.e. with #RotPoint), then the text will be drawn at an aggregate rotation angle of 90 degrees.

In some cases, it is desirable to rotate the entire symbol (i.e. with #RotPoint), but not the text labels that appear in the ASY definition. Perhaps you want the label to always be horizontal, regardless of the symbol rotation.  In that case, use a '!' prefix on the #TextStyle in the ASY file to suppress rotation of those text items.

Example:

The 2 data points shown below were drawn using this AOB fragment:

#BeginStyleTable

  #PointStyle xxx test:fancy   0 0 1 0 0 0

  #PointStyle yyy test:thing   0 0 1 0 0 0

#EndStyleTable

#Point      xxx x y 1

#RotPoint yyy x y 1 45

which refers to the two symbols defined in TEST.BSY.

The TEST.ASY symbol definition file is:

#Title "these are my symbols"

#BeginStyleTable

   !these styles have fixed colours

   #PolyStyle  blackfill 1 solid black black

   #PolyStyle  redline   1 solid red   none

   !these styles take all or some of their colours from the .AOB file

   #PolyStyle  outline   1 solid DEFERRED none

   #PolyStyle  fill      1 solid black    DEFERRED

   #PointStyle widget    triangle 180 DEFERRED blue  0  0.2  0  0  0

   !these are used to label the symbol

   #TextStyle  angle     black    0.1 0

   #TextStyle  value     DEFERRED 0.1 0

#EndStyleTable

#BeginSymbol fancy

!black rectangle (shadow)

#Rectangle blackfill 0.03 -0.03  1 0.5  0

!rectangle in the symbol colour

#Rectangle fill      0     0     1 0.5  0

!unfilled ellipse in the centre

#Ellipse   outline   0     0     1 0.5  0 360 0

!diagonal lines on the rectangle

#BeginPolygon redline

   -0.5,+0.25

   +0.5,-0.25

#EndPolygon

#BeginPolygon redline

   +0.5,+0.25

   -0.5,-0.25

#EndPolygon

!label the symbol with the size

#Text value 0 0.26 1 "value=\v"

#BeginSymbol thing

!draw a vertical arrow

#BeginPolygon outline

  0 -0.5

  0 +0.5

#EndPolygon

#BeginPolygon outline

 -0.05 0.35

  0    0.5

 +0.05 0.35

#EndPolygon

!draw a triangle in the centre

#Point widget 0 0 1

!label the rotation angle at the bottom

#Text angle 0 -0.55 7 "angle=\a"


ASCII Object Information (AOI) File
D.6 ASCII Object Information (AOI) File

AOI files are ASCII text files used to contain blocks of text, each of which is keyed to a polygon or polyline (#BeginPolygon/#EndPolygon) or point (#Point or #BeginPoint) in an AOB/BOB file.  When a polygon, line or point (which has an optional identifier in the AOB file) is 'picked' (see Section 8.5.1) and the string contains a [I] code, the text block is read from a corresponding AOI file and is displayed for viewing (see Section 8.5.1.1).

Note that if the polygon or point identifier string contains a "[H]" code (Windows Help 'context string'), SurView does not look for a .AOI text file, instead it looks for a Windows .HLP file and launches the WinHelp application.  The remainder of the identifier string (after the [H] prefix), is used as the 'Context String' of the help topic to be displayed.

This idea of associating a block of text with a polygon, line or point for picking and viewing was developed primarily for the purpose of creating interactive index maps of survey areas.  Each survey is drawn as a polygon and when 'picked', a complete description of the survey can be viewed.

Appendix D.4.3 contains a complete description of the pick id for points, polylines and polygons and how they are used.

How to Create an AOI File	AOI File Format


How to Create an AOI File
D.6.1 How to Create an AOI File

Since AOI files are plain ASCII text files, you may create them with a text editor.  However, since the keys in the AOI text file must match the identifier of the corresponding polygon in the AOB file, it is probable that most AOB/AOI file pairs will be created by other applications which extract the polygon co-ordinates and other descriptive information from a database.


AOI File Format
D.6.2 AOI File Format

AOI Filename

SurView always looks for the AOI file in the same directory as the corresponding AOB or BOB file and it must have the AOI filename extension.  When the AOB file is compiled, the AOI file must reside in the same directory as the AOB file.  When the final BOB file is viewed, the AOI file must reside in the same directory as the BOB file.  Note that SurView does not compile this text file, nor does it remember it's name: the AOI filename and location are always derived dynamically from the corresponding AOB or BOB file.

AOI File Syntax

The syntax of this text file is very simple:

...

#Pident1

!

!

text...

text...

!

!

#Pident2

text...

text...

...

Polygon/Point Identifier or 'Key'

Each block of text which describes a polygon begins with a line containing the polygon identifier (to match that supplied with the [I] code in the #BeginPolygon or #Point pick id in the AOB file - see Appendix D.4 for the syntax).  The identifier in the .AOI file must be prefixed with a '#' character as the first non-whitespace character on the line  As for #BeginPolygon and #Point, if the identifier is more than one 'word', it must be enclosed in double quotes.  Following the line containing the identifier, are any number of lines of text, formatted in any manner.  Comment lines (lines which begin with '!') may be inserted anywhere in the file - they are ignored.  This allows you to insert information in the file for your own reference, but which SurView does not display when the polygon is picked.  Blank lines are treated as valid lines of text and are displayed.

AOI/AOB File Verification During AOB Compilation

As SurView compiles the AOB file and reads the (optional) #BeginPolygon or #Point identifier string containing a [I] code, it finds & searches the corresponding AOI file for the identifier in order to verify it both the existence of the AOI file and the presence of the key inside it.  If there are any polygons or points in the AOB file for which no description exists in the AOI file, an error is listed in an error file (same location as the AOB/AOI file, and same name but with a .ERR extension).  When the compilation is complete and the BOB file has been created, SurView will inform you if any errors were encountered and direct you to the .ERR file.   These compile errors are non-fatal: later, when viewing the BOB file, you will receive an "Information Not Available" message if you pick one of the polygons for which there was no description when it was compiled.

The above verification process slows the compilation process appreciably, particularly if the AOI file is large, since SurView searches the AOI file for the polygon identifier each time a new #BeginPolygon or #Point is encountered.  For this reason, SurView asks you if you want to do this verification when it compiles the AOB file (when it encounters the first [i] reference).  If this slowness is intolerable and you are willing to forgo the verification, you can simply say 'no'.

Note that there is no verfication of [H] (WinHelp 'context string') references in .AOB files, because SurView can not read .HLP files.

Editing the AOI Text File

You may not rename the AOI file without renaming the BOB file, since SurView looks for the AOI file based on the BOB filename.  However, you may edit the AOI file after compiling the AOB file if you wish.  SurView does not 'remember' any details of the contents of the file.  Each time you pick a polygon, it opens the file and searches for the information.  The order of the text blocks does not have to be in the same order as the #BeginPolygon/#EndPolygon blocks or #Points in the AOB file.

Note that the identifier MUST be unique (not for picking the polygon: SurView does that graphically), so that the correct text can be found, since SurView stops searching when it finds the first polygon identifier that matches that of the picked polygon.  This may not always be what is desired.  For example, if a block of information is shared by several polygons or points, then all of those polygons or points should have the same identifier.


Database Descriptor Files: ZFILES.DBF & ZLINKS.DBF
D.7 Database Descriptor Files: ZFILES.DBF & ZLINKS.DBF

The syntax of an AOB file (see Section D.4) provides a method of attaching a pick identifier to line, point or polygon features, along with a list of actions to be performed when the feature is 'picked' (see Section 8.5.1).  One of these actions is the display of one or more records from DBF database files.

The initial pick displays information from a single DBF file, which is adequate for many simple sets of data (for example geochemistry).  However, if there is a relational database, consisting of several individual 'tables'  of information which is attached to the features, a mechanism is required to 'teach' SurView how to read those tables and how they are related or linked to each other.  Two simple files (ZFILES.DBF & ZLINKS.DBF) are used for this purpose.  Their names are fixed and they and all of the DBF files (tables) that comprise the database must reside in the same directory.  They must also reside in the same directory as the BOB file to which they are all logically attached.

ZFILES.DBF contains the following information for each DBF file (table) in the database:

- the DBF filename

- a description of the file (i.e. the contents)

- the name of another DBF file which contains brief descriptions of each field (optional)

ZLINKS.DBF contains the following information for each pair of linked files (tables):

- the name of the first DBF file

- the field in the first file which contains the key to the second DBF file

- the name of the second DBF file

- the field in the second file in which the key from the first file will be found

- a flag to indicate whether SurView should find the first or all records which match

The names of the 3+4 fields in these 2 files are reserved and must be present for these features to work properly.

Both of these files may contain other fields, but they are ignored.

How to Create a ZFILES.DBF & ZLINKS.DBF	Format of ZFILES.DBF & ZLINKS.DBF


How to Create ZFILES.DBF & ZLINKS.DBF
D.7.1 How to Create ZFILES.DBF & ZLINKS.DBF

ZFILES.DBF & ZLINKS.DBF are standard dBase III/IV .DBF files.  You can create them with almost any database or spreadsheet application.  In a spreadsheet, put the field names at the top of the columns in row 1 and put the data for each record in the rows below, starting in row 2.  Then 'Save As' a .DBF file.

The descriptions of the files, fields can be extracted from most well-documented databases: usually the printed documentation has complete descriptions of the tables.


Format of ZFILES.DBF & ZLINKS.DBF
D.7.2 Format of ZFILES.DBF & ZLINKS.DBF

In the following discussion, reserved fieldnames appear in uppercase letters in a boldface font, i.e. FIELDFILE.  Filenames (tables) are assumed to have a .DBF filename extension and are all assumed to reside in the same directory.

1. ZFILES.DBF

This file contains the names of all of the files or tables in the database system.  When a line, point or polygon is picked and a record is displayed from a DBF file, SurView uses the information contained in ZFILES.DBF to display a description of the file and brief descriptions of each of the fields in the record.

Field	Type & Width	Contents
*FILENAME	C (character), any width	the name of a DBF file (table)
*DESCRIPT	C (character), any width	a description, i.e. "Commodities" (may also be blank if there is no description)
*FIELDFILE	C (character), any width	the name of another DBF file which contains descriptions of the fields of the DBF filename (see item 3 below).  This field may be left blank if there is no file containing field descriptions.
(other fields)	(anything)	all other fields in ZFILES.DBF are ignored: you can use them for anything you wish

* reserved field name

Example (as it might appear in a spreadsheet):

FILENAME	DESCRIPT	FIELDFILE
mindep	mineral deposits	xmindep
commods	commodities	xcommods
refs	references to published papers	xrefs
depname	deposit name	xdepname
commdesc	detailed commodity description

2. ZLINKS.DBF

This file contains the names of the individual DBF files and the field names which link the files together.  In most cases, where the database tables have been well-designed, the FROMFIELD and the TOFIELD will be the same - they are provided here as two separate items to handle the odd case where the fieldname is different in another file, even though the content is the same (perhaps the first file contains the English field name and the second file contains the same field name, but in another language).

Each record in ZLINKS.DBF corresponds to a pair of files.  Each file may be linked to 1 or more other files.

Field	Type & Width	Contents
*FROMFILE	C (character), any width	the name of a DBF file which is linked to a second file (TOFILE)
*FROMFIELD	C (character), any width	the field in the first file which contains the key to be found in field TOFIELD in the second file TOFILE
*TOFILE	C (character), any width	the name of the second DBF file which is the target of the link from the first file (FROMFILE)
*TOFIELD	C (character), any width	the field in the second DBF file in which the key from the FROMFIELD of the first DBF file (FROMFILE) will be found
*MULTIPLE	L (logical), any width (usually 1)	yes='Y', 'y', 'T', 't' or '1' no='N', 'n', 'F', 'f' or '0' If 'yes', SurView searches the entire .DBF file to find all records which match.  If 'no', SurView stops when it finds the first record in the file wihch matches.  If you know there is only 1 record in the 'TOFILE' which will match, specifying 'no' here will speed up searches.  This field is optional - the default is 'yes', i.e. SurView will search the entire file.  This feature corresponds to the '=' & '==' operators described in Section 8.7.7 & Appendix D.4.3

* reserved field name

Example (as it might appear in a spreadsheet):

FROMFILE	FROMFIELD	TOFILE	TOFIELD
mindep	depid	commods	depid
mindep	depid	refs	depid
mindep	depid	depname	name
commods	comtype	commdesc	comtype
When a record is displayed from the MINDEP file, corresponding records can be displayed from files COMMODS (commodities), REFS (references) and DEPNAME (deposit name). When a record is displayed from COMMODS, corresponding records can be displayed from COMMDESC (commodity descriptions).

In the first 2 cases, the 'depid' (deposit id) field is the key which links the MINDEP file to the COMMODS & REFS file.  But in the third case, the person designing the DEPNAME file made a mistake perhaps and used 'name', rather than 'depid': however, the link can still be defined.  When the COMMODS file is displayed, the 'comtype' field can be matched up to the 'comtype' field in the COMMDESC field to show a more detailed description of the commodity.  Finally, when records are displayed from any of the REFS, DEPNAME or COMMDESC files, there is no other information which can be displayed, since these files are not linked to any other file.

3. 'FieldFile' (from ZFILES.DBF)

For a complete database set, there will be one 'field description file' for every file or table in the database.   However, none of them are required.  The files have no specific filename syntax - SurView uses the ZFILES.DBF file to lookup the names of the files.  When SurView displays a record from a file, it looks for the corresponding file whose name is contained in the FIELDFILE field of ZFILES.DBF.  If the file exists, SurView will display the field descriptions.

Field	Type & Width	Contents
*FIELDNAME	C (character), any width	the name of the field (i.e. "mindep"
*DESCRIPT	C (character), any width	the description of the field (i.e. "the unique mineral deposit id")

* reserved field name

Example (as it might appear in a spreadsheet):

FIELDNAME	DESCRIPT
depid	unique mineral deposit id: 2 letter year prefix, followed by a 5- digit number
rockcl	rock classification: intrusive, sediment, volcanic or other
commgrp	commodity group: M=metals, MB=base metals, MP=platinum metals, MR=rare earth elements, N=nonmetals, NG=gemstones, S=structural materials, SS=building stones, F=fuels
...	...


Grid Specification File
D.8 Grid Specification (GRX) File

GRX files are ASCII files of grid specifications, including the actual name of the grid file or group of 3 files (for composite images).  They have the same format as the Windows *.INI files and in fact are maintained by Windows functions.

The model used to describe the structure of a grid file is quite comprehensive, but simple.  It assumes that the majority of grid files are characterized by the following:

·	the grid file may or may not have a header

·	the grid file may contain several variables, in a band-interleaved structure

·	the origin is at one of 4 possible corners

·	the data is stored in rows or columns

·	the data is 1-byte (image), 2-byte (16-bit integer) or 4-byte (32-bit integer or floating point)

·	the integer & byte data values can be signed or unsigned

·	the grid file does not contain any other formatting or control information (i.e. record delimiters or padding)

SurView does not have any capabilities to create binary grid files and relies on external applications to create these files, whether single grid files or files for composite images.

Note that grid files created with "Microsoft FORTRAN 'unformatted' I/O" use a completely non-conforming (i.e. proprietary) record structure and can not be displayed by SurView.

How to Create a GRX File	GRX File Format


How to Create a GRX File
D.8.1 How to Create a GRX File

You may create GRX files using any ASCII plain-text editor.  Keep in mind that you may have several GRX files for a single grid file, each with a different combination of palette and levels files.  This allows you to select one of several 'packaged' views of a grid file in SurView.  In particular, this could be useful to match the no. of colours or the palette values to the capabilities of the monitor or printer.


GRX File Format
D.8.2 GRX File Format

There are several sections, each of which begins with a section name enclosed in square braces.  These sections may appear in any order.  Within each section, the information is organized by keywords and can be in any order: each line contains information in the form:

keyword=value

where 'value' is a set of numeric and/or text values.

All keywords are case insensitive and are mandatory unless indicated otherwise (optional keywords are marked with * and are so indicated in the text).  If there are several values, they can be separated by spaces, tabs or commas.  Text strings can be enclosed in "" quotes if you wish, but are ignored (and removed).

The '@' Prefix, '@=' Keyword and '[@]' Section

  1. '@' Prefix

If the first character of 'value' is '@', the remainder of the value is interpreted as a filename or pathname in which the value will be found (in the same section and for the same keyword).  This allows information which is common to a family of grid files to reside in a single file.  For example:

[gridfile]

GridSize=@grids.inf

means that the  actual values of (nx,ny) will be found in the [gridfile] section for keyword 'GridSize' in file GRIDS.INF.

  2. '@=' Keyword

The '@=' keyword in any section tells SurView to look in the indicated file (under the same section) for any keywords which are not found in the current section.  For example:

[gridfile]

@=grids.inf

This method is more concise than using 'keyword=@filename' for each keyword in the section.

  3. '[@]' Section & '@=' Keyword

This sets up a global reference file for all unresolved section/keyword ccombinations.  The '@=' keyword in the [@] section tells SurView to look in that file for any section/keyword combinations which are not found in the entire .GRX file.

GRX Keyword Summary & Example

Parameters	Example
*[@] *@= filename [gridfile] *@= filename FileName= filename Composite= m,f1,f2,f3 *Band= band,nband GridStore= o,m,s,t,h GridSize= nx,ny CellSize= dx,dy Projection= pp Origin= e,n Undefined= u *Transform= scale,offset *Range= min,max [view] *subset=   xmin,xmax,ymin,ymax [description] *@= filename *Title= title *Title2= alternate title Variable= pname Units= uname *CompositeLabels=n1,n2,n3 [display] *@= filename Palette= palettefilename *Levels= levelfilename	[@] @=grids.idx [gridfile] @=filename FileName=ura.gri Composite=cmy,u.ima,k.ima,th.ima Band=3,7 GridStore=LL, col, 4, F, 0 GridSize=460, 388 CellSize=50,50 Projection=proj=utm,ellps=clrk66,zone=20 Origin=243475, 4987475 Undefined=-12345 Transform=0.05,1e6 Range=-1.1432, 3.7543 [view] subset=250e3,260e3,499e4,500e4 [description] @=filename Title="Cape Spencer, N.B., 21H/4,5" Title2=bonjour monsieur Variable=equivalent Uranium (eU) Units=ppm CompositeLabels=U,K,Th [display] @=filename Palette=radio100.rgb Levels=ura100.lvl

* (optional)

Notes:

A. [@] section & @= keyword

The '[@]' section and the '@' keyword (in any section) are both completely optional.  See above discussion for more detail.

B. [GRIDFILE] section

  1. FILENAME or COMPOSITE

These two keywords are mutually exclusive: use one or the other, but not both.

FILENAME

If FILENAME is used, the .GRX file refers to a single binary grid file whose filename or pathname is supplied as the value of the FILENAME keyword.

COMPOSITE

If COMPOSITE is used, the .GRX file contains specifications for creating a composite image according to the specified colour model.  The syntax is:

COMPOSITE=model,f1,f2,f3

The colour 'model' is 1 of:

Colour Model	Interpret the contents of the Image Files as...	Draw the Composite Legend Using...
RGB	(R,G,B) colour values	(R,G,B) at the apexes
CMY	(C,M,Y) colour values	(C,M,Y) at the apexes
-RGB	(R,G,B) colour values	(C,M,Y) at the apexes
-CMY	(C,M,Y) colour values	(R,G,B) at the apexes

The remaining 3 parameters (f1,f2 & f3) are the names of the 3 binary grid files to be assigned to each of the (R,G,B) or (C,M,Y) colours (in that order). The use of the -RGB keyword is useful if the image files contain (R,G,B) equivalent values of (C,M,Y) colours so that the grid legend should be drawn with (C,M,Y) at the apexes.

Another name for 'composite image' is 'ternary image', implying 3 binary grid files, one for each colour component.  However, the term 'composite' image is used here because 3 files are not required: if there is no file for a particular component, specify the filename as 'NONE' and the corresponding (R,G,B) or (C,M,Y) component will be set to 0, effectively turning that colour 'off', i.e.:

Composite=rgb,xxx.ima,none,yyy.ima

The data element size and type (see parameter 's' & 't' in GRIDSTORE below) for the 3 binary grid files used for a composite image is usually 1,U (unsigned bytes).  This data element is not required, however it is assumed that each of the 3 binary grid files has the exact same internal structure (but may be different BANDs, see below) and that the values have already been scaled to [0,255], regardless of whether those values are expressed as bytes, integers or floating-point values.  Creation of these [0,255] scaled image files must be done by external applications.

Note that it is not appropriate to create a ternary radioelement map by scaling the K, eU & eTh grid files to [0,255] and then using them with COMPOSITE.  For further information, see "A Modified Ternary Radioelement Mapping Technique and its Application to the South Coast of Newfoundland", by J. Broome, J.M.Carson, J.A.Grant and K.L.Ford, Geological Survey of Canada, Paper 87-14, 1987.

For either keyword, the filename(s) supplied may be a simple filename or a complete pathname: if only a filename is supplied, SurView assumes that the file is located in the same directory as the GRX file.

  2. BAND

This is an optional keyword: if it is not present, it is assumed that the grid file only contains a single variable (band).  Otherwise, it is used to select the 'band' to be displayed from an interleaved grid file containing 'nband' bands.  Note that if the grid file has a header, it is NOT repeated for each band: there is only a single header.

If COMPOSITE is used to specify 1-3 binary grid files for a composite image, those files may be separate files or bands within the same or different band-interleaved file.  Therefore, if BAND is used in conjunction with COMPOSITE, it requires 3 pairs of band,nband values, instead of a single pair.  If one of the composite filenames is 'NONE' (see above), 2 dummy values (any value, i.e. both 0) are still required for that 'file'.

Examples:

(a) simple filename, not band interleaved

FILENAME=pot.gri

(BAND=1,1)	(implied)

(b) simple filename, band 3 of 7 (K,eU,eTh,Exp,...)

FILENAME=radiomet.gri

BAND=3,7	(i.e. 'eTh')

(c) composite image, no file is band interleaved

COMPOSITE=cmy,ura.ima,pot.ima,tho.ima

(BAND=1,1	1,1	1,1)	(implied)

(d) composite image, all components from same band-interleaved file

COMPOSITE=cmy,radiomet.ima,radiomet.ima,radiomet.ima

BAND=2,7	1,7	3,7	(i.e. eU, K, eTh)

(e) composite image, 2 components only

COMPOSITE=cmy,radiomet.ima,none,radiomet.ima

BAND=2,7	0,0	3,7	(i.e. U & eTh only)

  3. GRIDSTORE

SurView supports 8 different grid storage modes (origin at any corner, rows or columns).   It also recognizes 7 different data types: the data can be 8-bit (signed or unsigned), 16-bit integer (signed or unsigned), 32-bit integer (signed or unsigned) or floating point.

The GRIDSTORE parameters are:

o	origin location code (LL=Lower Left, LR=Lower Right, UR=Upper Right, UL=Upper Left)

m	data storage mode (COL=columns, ROW=rows)

s	the data element size (1, 2 or 4 bytes)

t	the data type (U=unsigned, S=signed, F=float)

h	the length (in bytes) of the grid file header (so SurView can skip it)

There are 7 combinations of data element size (s) and type (t):

s	t	Description	Min Value	Max Value
1	U	unsigned 8-bit	0	+ 255
1	S	signed 8-bit	- 128	+ 127
2	U	unsigned 16-bit integer	0	+ 65 535
2	S	signed 16-bit integer	- 32 768	+ 32 767
4	U	unsigned 32-bit integer	0	+4 294 967 295
4	S	signed 32-bit integer	-2 147 483 648	+2 147 483 647
4	F	floating-point	8.43e-37	3.37e+38

Examples:

(a)	Our (Geological Survey of Canada, Airborne Geophysics Section, radiometric data) grid files are described by:

GridStore=LL, col, 4, F, 0

The origin is at the lower left corner, the grid is arranged as columns of 4-byte floating-point values.  The file is 'pure' and has no header information.

(b)	GeoSoft grid files can be described by:

GridStore=LL, row, 2, S, 512

The origin is at the lower left corner, the grid is arranged as rows of 2-byte (16-bit) signed integers and the grid file has a 512-byte header (see GeoSoft documentation for header format).  In addition, the grid file is padded (for historical reasons I'm told), so that SurView will warn you that the file is larger than expected.  This warning can be ignored for GeoSoft grid files (provided you decoded the header correctly to obtain the no. of rows & columns).

(c)	Surfer grid files (binary) can be described by:

GridStore=LL, row, 4, F, 56

The origin is at the lower left corner, the grid is arranged as rows of 4-byte floating-point values and the grid file has a 56-byte header containing the following:

struct {

char id[4];	//"DSBB" identifier

short ncol,nrow;	//no. of columns & rows

double xmin,xmax;

double ymin,ymax;

double zmin,zmax;

}

(d)	GeoPak grid files can not be read by SurView because they are created using Microsoft FORTRAN's proprietary 'unformatted' record structure.  This is unfortunate.

  4. GRIDSIZE

nx & ny are the no. of cells in the X (easting) and Y (northing) direction, respectively.

Note that SurView expects the size of the grid file to be:

h  +  (nx  X  ny  X  s)	bytes

where 's' is the grid data element size (from GRIDSTORE above) and 'h' is the length of the grid file header (from GRIDSTORE above).  If the actual size of the grid file does not match the expected size, SurView signals a warning when you attempt to add the GRX file to the File Display List.  You may continue if you know that the grid file contains padding at the end of the file which can be ignored (as is the case for GeoSoft grid files).

  5. CELLSIZE

dx & dy are the X & Y sizes of the grid cells (in metres)

  6.  PROJECTION

pp is the list of projection parameters which define the grid projection.  See Appendix E for further details.  SurView does not support grid files with geographic (longitude, latitude) co-ordinates, so #Projection keywords #LongLat... & #LatLong... are not allowed in GRX files.

  7. ORIGIN

(e,n) is the (easting,northing) of the origin (as indicated in GRIDSTORE)

  8. UNDEFINED

This is the value representing 'undefined' data values in the grid file.  Grid cells containing this value are not drawn at all.  There is no 'colour' for 'undefined' values - they simply do not exist.

  9. *TRANSFORM

This keyword is optional and is used to specify the SCALE & OFFSET operands of a linear transform which is applied to the data values read from the file before displaying:

displayed value=value from file X SCALE + OFFSET

If this keyword is not supplied, the default values are SCALE=1 & OFFSET=0.

This feature has several purposes:

·	If the original data was scaled before writing to the file, this transform enables the original data to be recovered.  For example, the original floating-point data may have been converted to 8-bit data (see GRIDSTORE above) for compactness.

·	It allows the data to be manipulated for special display requirements.  For example, the data could be transformed to suit an existing data levels file (see LEVELS below).

 10. *RANGE

This keyword is optional and is used to specify the [min,max] range of data values within the grid file.  If this keyword is not supplied, SurView will scan the grid file to obtain these values the first time the grid file is accessed.  It then stores the values in the GRX file:  you may edit these values.  They are only used if the data levels are not specified with LEVELS=filename in the [display] section: the [min,max] range is divided up into N-1 intervals, where N is the number of colours defined in the palette file.

The RANGE always refers to the range of data values in the grid file after the TRANSFORM has been applied.  If SurView determines the RANGE by scanning the grid file, it applies the TRANSFORM (if supplied) to the data before checking for [min,max].

If COMPOSITE is used, this keyword is ignored (SurView will warn you) and SurView will not attempt to scan the grid file for the range.  The range is not used for composite images: SurView assumes that the file already contains values scaled to [0,255].

C. [VIEW] section

  1. *SUBSET

This keyword is optional.  It specifies the min/max X & Y limits of the grid that you wish to view.  These parameters are read-only, i.e. SurView reads the values from the .GRX file, but does not update them if you zoom/pan on the grid and then remove it from the File Display List.  Note that this 'view' of the grid may only be in effect if the grid is viewed by itself: in the presence of other files in the File Display List, the overall view takes into account the areas covered by the other files.

For several files in a set, perhaps the command-line/FDL option:

-view=xmin:xmax:ymin:ymax

is a better choice (see Section 2.3.3).

D. [DESCRIPTION] section

  1. *TITLE, *TITLE2

These keywords are optional.  The title is used for the main window caption if the GRX file is the first file in the File Display List and there is no SLD file present.  You can prevent SurView from using it as a caption by putting a ';' character as the first character of the title, but the title can still be seen when the Info button is clicked in the File Display List dialog box.  Title2 is also optional and allows an alternate language (i.e. french) title to be specified. It is only used if the Options | Use Alternate Language Where Available option is enabled.

  2. VARIABLE (PARAMETER) & UNITS

These keywords supply the name of the variable and the units, which are used only to describe the contents of the data file. PARAMETER is the old form of the VARIABLE keyword - both are accepted, but VARIABLE is preferred.

  3. COMPOSITELABELS

This keyword is optional and it is only recognized if the COMPOSITE keyword is used in the [GRIDFILE] section.  It is used to specify the grid legend labels (triangle vertices or bar endpoints) for the 3 variables of a composite image (see Section 8.3.7).  As for the COMPOSITE keyword, if there is no file or label, simply use 'none'.  If any of the 3 labels is more than one 'word', enclose the entire label in double quotes.  Separate the 3 labels with spaces or a comma.  If COMPOSITELABELS does not appear, SurView uses the filenames from the COMPOSITE keyword in the [GRIDFILE] section.

For example, if the composite image is:

[GRIDFILE]

COMPOSITE=cmy,radiomet.ima,radiomet.ima,radiomet.ima

BAND=2,7	1,7	3,7

then the variable names would be specified as:

[DESCRIPTION]

COMPOSITELABELS=U, K, Th

and the triangle will be labelled with "U", "K" & "Th".  If COMPOSITELABELS does not appear, the triangle will be labelled with much less informative titles: "radiomet (band 2 of 7)", "radiomet (band 1 of 7)" & "radiomet (band 3 of 7)".

E. [DISPLAY] section

  1. PALETTE

This is the filename or pathname of the ASCII file containing the RGB or CMY palette definition.  If only a simple filename is supplied, then SurView assumes that the palette file is to be found in the directory in which SurView resides.  This allows a standard set of palette files to be maintained in one location (in SurView's home directory), without requiring copies in each of the survey directories.

Each line contains an (R,G,B) or (C,M,Y) triplet, where each of R, G & B or C, M & Y is a number in the range [0,255].  SurView counts the number of colours it reads from the file: there is an [arbitrary] limit of 256 colours.  See Appendix D.9 for further information on RGB/CMY palette files.

Files with the CMY extension must contain (C,M,Y) colours: all other files are assumed to contain (R,G,B) colours.  It is suggested that .RGB be used as the filename extension for a palette file. Furthermore, if the filename contains the no. of colours within the file, it will be easier to select from a list.  Some examples of palette filenames are:

rad100.rgb	vlf39.rgb	rad89.cmy

If COMPOSITE is used instead of FILENAME, the PALETTE keyword is ignored (SurView will warn you).  Palettes are not used for composite images.

  2. *LEVELS

This is the filename or pathname of the ASCII file containing the data levels used for the grid file data display.  If only a simple filename is supplied, the file is assumed to be located in the same directory as the GRX file.  This keyword is optional: if it is missing or if the value is missing or "", then N-1 linearly-spaced levels are computed based on the RANGE [min,max] and the number of colours N in the palette file.

See Appendix D.10 for further information on LVL data levels files.

It is suggested that .LVL be used as the filename extension for data level files.  As above, it is most useful if the no. of colours also appears in the filename.  Some examples of data level filenames are:

pot100.lvl	vtf39.lvl

If COMPOSITE is used instead of FILENAME, the LEVELS keyword is ignored (SurView will warn you).  Levels are not used for composite images since the grid files are assumed to be scaled to [0,255] already.


Grid Palette (RGB/CMY) File
D.9 Grid/ASX Palette (RGB/CMY) File

Grid Specification (GRX) files must specify the name of an RGB or CMY palette file to be used to display the grid file.  These are ASCII files that contain (r,g,b) or (c,m,y) colour definitions.  The RGB/CMY palette file determines the no. of colours to be used to display the gridded data.  The LVL data levels file is used to convert the data values to the palette colours.

The RGB/CMY files are also used with the COLOURTABLE keyword in the lookup tables used for ASX theme files.

How to Create an RGB/CMY File	RGB/CMY File Format


How to Create an RGB/CMY File
D.9.1 How to Create an RGB/CMY File

RGB/CMY palette files may be created with any ASCII text editor (or word processor that can save the file as 'plain ASCII text').


RGB/CMY File Format
D.9.2 RGB/CMY File Format

Each line of the ASCII RGB/CMY file contains 3 integer values, separated by either spaces, tabs or commas.  In other words, the file contains 3 columns of numbers.  Each integer must be in the [0,255] range.  The 3 values represent the components of a 24-bit colour definition (i.e. 256 X 256 X 256 = 224).

If the palette filename extension is CMY, the 3 values are interpreted to be cyan, magenta and yellow components of the colour.  All other filenames (including .RGB files) are assumed to contain red, green and blue values.  RGB & CMY palette definitions are complementary, i.e.:

R + C   =   G + M    =   B  + Y   =   255

Note that SurView uses only RGB palettes internally: when it reads a CMY file, it subtracts each (cyan,magenta,yellow) value from 255 to obtain the equivalent (red,green,blue).  The CMY files are only supported as a convenience.

The no. of colours is counted by SurView as it reads the file.  There is an arbitrary limit of 256 colours for any one palette file.

There must be only one (r,g,b) or (c,m,y) triplet on each line of the file.  All information to the right of the 3 values is ignored and may be used for inserting comments.  In addition, comment lines may be inserted anywhere in the file: the first non-whitespace character on the line must be ! (exclamation mark) to indicate that it is a comment.  Blank lines may be inserted anywhere as well.

Example:

!this is a palette for 5 colours

100,20,200

20  100  20

100,100,100	!this is a medium gray

0     0    0	!black

50,150,250


Grid Data Levels (LVL) File
D.10 Grid Data Levels (LVL) File

Grid Specification (GRX) files can specify an optional file of data levels which are to be used to convert grid data levels to display colours.  If no level file is specified, the [min,max] range is divided into N-1 evenly-spaced data levels.  If the current RGB/CMY palette contains N colours, then the levels file must contain only N-1 data levels.

How to Create an LVL File	LVL File Format


How to Create an LVL File
D.10.1 How to Create an LVL File

LVL files, like RGB/CMY palette files may be created with any ASCII text editor (or a word processor that can save the file as plain ASCII text).


LVL File Format
D.10.2 LVL File Format

Each data level value in the file is in the same units as the grid file it represents.  For example, if the grid file contains "ppm" values, then the corresponding levels file also contains values in "ppm".

There are two acceptable LVL file formats:

Format 1

Each line contains a single data level value.  All information to the right of the value is ignored and may be used for inserting comments.  In addition, comment lines may be inserted anywhere in the file: the first non-whitespace character on the line must be ! (exclamation mark) to indicate that it is a comment.  Blank lines may be inserted anywhere as well.

Example:

!these are the data levels for a 5-colour palette

2.4	!colour 1 of 5: all values less than 2.4

3.7	!colour 2 of 5: [2.4,3.7]

5	!colour 3 of 5: [3.7,5]

8	!colour 4 of 5: [5,8]

!colour 5 of 5: all values greater than 8

Format 2

Each line may contain 0 or more data levels. Comment lines must appear before the start of the data and must begin with ! (as above).  No comments are allowed to the right of the data values.  Blank lines may appear anywhere in the file.  This file format is suitable for creating data levels files that can be printed with a minimum of paper.

Example:

!these are the data levels for a 200-colour palette

!these values were obtained from ...

!notice that all of the comments are at the top of the file

 2.5 5 7.5 10 12.5 15 17.5 20 22.5 25 27.5 30 32.5 35 37.5 40 42.5 45 27.5 50

...

202.5 205 207.5 210 212.5 215 217.5 220 ...


Arc/Info Shape Files (ASX)
D.11 Arc/Info Shape Files (ASX)

Introduction

In the spring of 1995, Environmental Systems Research Institute, Inc (ESRI) released Version 7 of their Arc/Info Geographic Information System (GIS) and Version 2 of the companion ArcView viewing application.  Concurrently, ESRI created a new 'portable' file format for GIS point, line & polygon primitives called a 'Shape' file.  The files are created by Arc/Info and can be viewed by ArcView II.  Although the format isn't perfect, it is well documented and it has the weight of a large corporation like ESRI behind it, so it will probably be around for a while.  A 'white paper' describing the file format is available directly from ESRI.

The 'Shape' files can contain polylines (arcs), polygons and points.  The polygons are completely assembled and are topologically correct, i.e. they contain lake/island topology.  The Arc/Info 7 ARCSHAPE command creates 3 binary files from a single 'coverage':

File Type	Description
SHP	the 'shape file' containing the (x,y) data for the points, lines or polygons
SHS	Same as .SHP, but single precision (.SHP is double precision). SHS files are proprietary to SurView and are only for internal use. No other application can display them.
SHX	an index file for the .SHP file.  SurView doesn't use this file, so it can be discarded if the shape files are to be used with SurView only.
DBF	a DBF containing the database attributes associated with each feature in the .SHP file.  The DBF file will contain any attributes which are present in the attribute files within Arc/Info.  There is a fixed set of attributes used by Arc/Info (length, area, perimeter, user id, internal id etc), plus any other attributes added by the user that might be related either to the display of the features (colours, styles, etc) or to the data which is attached to the features (rock type, fault type, age, formation etc).

Surview Files & Shape Files Compared

Note that there is a clear separation of the geometry (SHP), the data attributes (DBF) and the display attributes (must be supplied by the viewing application).  Compare this with SurView's BOB, BLC & SLD files which are less flexible because they contain everything - the co-ordinates, the data classifications (pre-defined and fixed) and the display attributes (colours), but which are easy to use because they can be viewed directly without specifying 'how' each time the file is used.

SurView .BOB files contain single-precision floating-point co-ordinates which is quite sufficient for most applications. .SHP files contain double-precision floating-point values. Therefore, a .SHP file is twice the size of an equivalent .BOB file and requires twice as much time to read.  Accordingly, SurView also supports a .SHS file (single-precision .SHP file) designed only for internal use. SHS files are proprietary to SurView: no other application knows how to create them or read them, including Arc/Info and ArcView.

Viewing Shape Files

In order to encapsulate a 'view' of the shape file, complete with display attributes, SurView uses an ASX file to contain all of the related information.  This also provides a mechanism for holding the information which is missing from the SHP files (i.e. cartographic projection, description/title etc).  The ASX file is similar to the GRX file that SurView uses to contain all of the information required to display a flat raster image file.

.SHP Files of Point  Data are Not Supported

SurView only supports .SHP files containing polylines (arcs) or polygons: .SHP files of point data are not supported. The rationale for this is as follows:

For line/polygon files, the .SHP file contains all of the information required to draw the 'shape' (i.e. the (x,y) co-ordinates for drawing the line or polygon) and the attributes are stored in the .DBF file which is usually much smaller than the .SHP file.  A reasonable picture can be obtained with very little effort just by drawing all of the lines in black. However, for point data, the .SHP file only contains the (x,y) of each data point and the rest of the attributes are contained in the .DBF file. There is no information in either the .SHP or .DBF file that tells SurView what symbol to draw or how to draw it (colours, styles etc).  Each application that uses the .SHP point files must provide a complete mechanism for specifying all of these attributes.

SurView's tool for importing point data from DBF files (see Section 8.7.7) to create BOB files is a good tool, providing full support for using a single symbol for all points or for assigning a symbol to each point, based on other attributes in the .DBF file. It provides a mechanism for 'user' symbols as well as a proportional scaling algorithm for 'dot' maps. It includes some simple tools for statistical analysis (assuming the points represent geochemistry data). Therefore I decided that this was sufficient and it was not worthwhile re-working all of those existing facilities just to support a .SHP file of points.

How to Create an ASX File	ASX File Format

ASX Theme File Format


How to Create an ASX File
D.11.1 How to Create an ASX File

ASX files are simple ASCII files and may be created with any ASCII plain-text editor.

As for GRX files, you may have several ASX files for a single SHP file, each with a different combination of palette and display attributes.  This allows you to keep several 'views' of the same file with little overhead.  For example, if the SHP file contains geology, the BYAGE.ASX file could be a view which draws the polygons, coloured by different ages, as they appear in the DBF file.  Another BYFORM.ASX could be a different view of the same SHP file, but with the polygons coloured according to the geological formation, another data attribute in the DBF file.  The two ASX files are the same, except that each one points to a different table of colours in a 'theme' file.


ASX File Format
D.11.2 ASX File Format

The ASX file provides a mechanism to encapsulate Arc/Info Shape (SHP & SHS) files, a set of display attributes and other descriptive information into a single 'derived' file type which can be selected for viewing without requiring additional information to be supplied.

Note that SurView only supports line (arc) and polygon .SHP/.SHS files, the rationale for which is described in Appendix D.11.1.

There are several sections, each of which begins with a section name enclosed in square braces.  These sections may appear in any order.  Within each section, the information is organized by keywords and can be in any order: each line contains information in the form:

keyword=value

where 'value' is a set of numeric and/or text values.

All keywords are case insensitive.  Several keywords are optional and have default values.  If there are several values, they can be separated by spaces, tabs or commas.  Text strings can be enclosed in "" quotes if you wish, but are ignored (and removed).

Displaying a .SHP/.SHS File

There are two ways to specify the line, fill and/or pattern colours and styles for a .SHP/.SHS file:

(a)	with a predefined 'theme', using the attributes attached to the line or polygon to look up the line/fill/pattern colours and line/pattern styles from a theme table (see Appendix D.11.3). This is most useful for geology, where each polygon can be drawn with a different colour/style.

(b)	using a fixed colour, line style or pattern for all lines or polygons in the .SHP file. This is most useful for files containing rivers, lakes, roads, boundaries etc, which can all be drawn with the same colour and style.

SurView does not have proper database support to allow it to 'relate' fields between several tables in order to lookup the key value for each feature. Therefore, SurView requires all of the key attributes to be in the single .DBF file that is associated with the .SHP file. This may require you to 'join' several tables in Arc/Info before creating the .SHP files with the ARCSHAPE command.

ASX Keyword Summary & Example

Parameters	Example
[ShapeFile] FileName= filename Projection= pp Interpolate= di [Description] *Title= title *Title2= alternate language title [Auxiliary] *pickaction= @field # [Display] Attributes= filename Line= colourname,linestylename or @field,themes.dbf or none Fill= colourname or @field,theme.dbf or none Pattern= symbolname,pattern or @field,theme.dbf or none	[shapefile] filename= geology.shp projection=proj=utm,ellps=clrk66,zone=20 interpolate= 0.2 [description] title= Geology of Canada title2= Géologie du Canada [auxiliary] pickaction= @pickstuff [display] attributes= geology.dbf line= red,solid or @ftype,themes.ebf fill= rgb(100,20,100) or @age,themes.dbf pattern= black,#X or @rocktype,themes.dbf
A. [SHAPEFILE] section

  1. FILENAME

This is the name of the binary .SHP or .SHS 'shape' file. The .SHP files can be created with the Arc/Info ARCSHAPE command.  The filename supplied may be a simple filename or a complete pathname: if only a filename is supplied, SurView assumes that the file is located in the same directory as the ASX file.

SHP files can contain only a single feature type, i.e. points, polylines or polygons.  The shape 'type' is embedded in the header of the file, so SurView will know what the file contains and how to plot it.  However, you must supply attribute directives in the [DISPLAY] section of the ASX file which are appropriate to the type of feature in the SHP file and therefore YOU must know what type of features are inside the SHP file.

SHS files are proprietary single-precision versions of the normal double-precision .SHP files created by Arc/Info & ArcView.  SHS files are half the size of .SHP files and can be read and displayed by SurView much faster than .SHP files (more like .BOB files). The Airborne Geophysics Section uses .SHS files for internal use - they can NOT be read or created by Arc/Info or ArcView. The only way that SurView can detect the .SHS file type is with the use of the .SHS filename extension.

  2.  PROJECTION

This keyword accepts a list of projection parameters which define the grid projection.  See Appendix E for further details.  Arc/Info SHP 'shape' normally contain only projected co-ordinates.

SHP/SHS files can also contain geographic (longitude,latitude) co-ordinates, particularly for .SHS files. In this case, only the #LongLatDegrees keyword is allowed in ASX files.  The Interpolate= entry is not required for geographic co-ordinates, but is useful for drawing curved lines between geographic 'corners' of an area.

  3.  INTERPOLATE

This keyword is only applicable if Projection=#LongLatDegrees is used, otherwise it is ignored. The value of the keyword is in decimal degrees, i.e. a value of 0.2 will interpolate co-ordinates every 0.2 degrees in both longitude & latitude 'directions'.

Interpolate= is not mandatory, but is useful for drawing 'curved' lines between geographic 'corners'. If the polygons contain geographic co-ordinates for lakes, then the interpolation is probably not required. But if the polygons contain (long,lat) for 'corners' of areas (for example survey or map sheet boundaries), it is necessary to interpolate co-ordinates between the vertices and project them so that the polygon lines will be curved instead of straight.

B. [DESCRIPTION] section

  1. TITLE, TITLE2

These keywords are optional.  The title is used for the main window caption if the ASX file is the first file in the File Display List and there is no SLD file present.  You can prevent SurView from using it as a caption by putting a ';' character as the first character of the title, but the title can still be seen when the Info button is clicked in the File Display List dialog box. Title2 is also optional and allows an alternate language (i.e. french) title to be specified. It is only used if the Options | Use Alternate Language Where Available option is enabled.

C. [AUXILIARY] section

  1. PICKACTION

This keyword is optional.  It allows 1 or more 'actions' to be associated with 'picking' features from the .SHP/.SHS file.  If this keyword is not used, none of the objects in the .SHP file can be 'picked'.  If this keyword is used, the name of the .DBF file containing the pick actions must be specified with the Attributes= keyword in the [DISPLAY] section. The '@' prefix indicates that the value of this keyword is a field in the Attributes= DBF file.  The indicated field contains a string containing 1 or more pick actions using exactly the same syntax as the 'pick string' for the #BeginPolygon keyword in .BOB files (see Section D.4.3).  If the 'pick action' string is blank, the feature can not be picked.

Example:

If the XXX.ASX file (for XXX.SHP) contains the following:

[auxiliary]

pickaction=@pickstuff

, the XXX.DBF file contains a field called 'pickstuff' which contains the 'pick action' string associated with each feature. For example, it might be:

[d]idpoly==123[p]rocks[h]granite

which indicates that 3 actions are possible:

- display the .DBF record for which 'idpoly' is 3

- display the 'rocks.bmp' picture

- display help topic 'granite' in Windows help file XXX.HLP

Special Case '#'

If you only want to display the .DBF record that corresponds to the 'picked' polyline/polygon record in the SHP file, you can use the single value '#', i.e.:

[auxiliary]

pickaction=#

This means you don't have to make a [d]id=364 or [d]#123 entry (see Section D.4.3 for syntax) in every record of the .DBF file.  You only need to use the @field method if you want to have a choice of items to display or act upon when the polygon is clicked or if the pick 'action' does not include showing the .DBF record.

D. [DISPLAY] section

Reserved names

Some forms of the keywords require a colour name, line style and/or hatch style. The colour names (or RGB/CMY triplet) and line styles are the same as used by AOB files. The 6 hatch style names are unique to ASX files:

#-	------------	horizontal stripes

#|	||||||||||||||||	vertical stripes

#\	\\\\\\\\\\\\	diagonal stripes

#/	////////////	diagonal stripes

#+	++++++	grid

#X	XXXXXXX	diagonal grid

These reserved hatch style names may seem a bit odd, but they are easy to remember.  See Appendix F for a more complete description of all of the reserved colour names, line styles and hatch styles.

  1. ATTRIBUTES

This is the name of the DBF file which contains the attributes attached to each feature (record) in the SHP file.  There are no assumptions made on the content of this file - it may contain any number of fields, each of which can contain any type of data.  However, in order to be useful, the DBF file must contain fields which describe the entity (geological unit, age, formation etc) which can be used in combination with a predefined 'theme' (see Appendix D.11.3) to lookup colours and styles for drawing the line or polygon.

The type and number of attributes depende on the type of features in the shape file (polyline/arc or polygon) and the manner in which they are to be presented.

The DBF file of attributes specified with Attributes= does not need to be the same DBF file as created by the Arc/Info ARCSHAPE command (along with the SHP & SHX files).  You can use any spreadsheet or database application (which can read & write DBF files) to create a new DBF file containing the display attributes.  But it must have exactly the same number of records as the original DBF file (i.e. one DBF record for each entity in the SHP file) and they must be in EXACTLY THE SAME ORDER as the original DBF file in order to match with the order and number of entities in the SHP file.  When SurView draws the SHP file entities, it opens up the SHP file and the Attributes= DBF file and reads one record from each file from beginning to end.  There is no lookup or search involved to find the correct record of attributes.

Note:	the Attributes= entry is not required if none of the other entries in the [DISPLAY] section contain references to fields in a DBF file (with the '@' prefix).  For example if Line=blue, an Attribute= DBF file is not required for the colour, but if Line=@fltype,theme.dbf, then this is a reference to the 'fltype' field in a DBF file so the filename must be specified with the Attribute= keyword.

  2. LINE

This keyword is mandatory for .SHP files of polylines (arcs), but is optional for .SHP files of polygons. It is used to indicate the colour and line style used to draw the lines for arcs (polylines) or the outlines for polygons.  There are 3 forms:

Value	Example	Description
colour,style	red,solid	Draw all lines in the SHP file with the indicated colour and style.  The colour can be an RGB or CMY triplet or a reserved colour name. The line style is a reserved name.  These reserved colour and line style names are the same as used by AOB files. See Appendix F for a complete description. A fixed colour and style is usually used for a .SHP file containing rivers or roads.
@field,filename	@ftype,themes.dbf	'fltype' ('fault type') is a field in the .DBF file that is associated with the .SHP file. It contains codes for the types of faults found in the .SHP file. 'fltype' is also a field in the 'themes.dbf' file which contains a table of all of the possible fault types and their colours (see Appendix D.11.3).
NONE	NONE	The special value 'none' specifies that the line has no colour, which in effect, suppresses the drawing of the line. This value is not permitted for a .SHP file containing only lines, but is a perfectly reasonable value to use for a polygon .SHP file, if you don't want to draw the polygon outlines.

The default line colours are:

for polyline:	<no default> (required for SHP files containing arcs)

for polygon:	NONE (the polygon outlines are not plotted)

  3. FILL

This value is ignored for a .SHP file containing only polylines (arcs) and is optional for a .SHP file of polygons.  It is used to indicate the colour and pattern to use when filling a polygon.  There are 3 forms:

Value	Example	Description
colour	RGB(100,200,123)	Fill all polygons in the SHP file with the indicated colour.  A fixed colour is usually used for a .SHP file containing lakes.
@field,filename	@age,themes.dbf	'age' ('geological age') is a field in the .DBF file that is associated with the .SHP file. It contains codes for the geological ages of the polygons found in the .SHP file. 'age' is also a field in the 'themes.dbf' file which contains a table of all of the possible ages and their colours (see Appendix D.11.3).
NONE	NONE	The special colour 'none' specifies that the polygon is drawn without any fill colour. This might be used if you have a polygon file of geology, but you only want to draw the lines. It may also indicate that you do not want a background colour for a pattern (specified with a Pattern= keyword).

The default fill colours are:

for polyline:	n/a

for polygon:	none

  4. PATTERN

This value is ignored for a .SHP file containing only polylines (arcs) and is optional for a .SHP file of polygons.  It is used to indicate the colour used to draw a pattern when filling a polygon.  The values have 3 possible values:

Value	Example	Description
colour,style	red, #X	Fill all polygons in the SHP file with the indicated pattern and colour. A fixed colour might be used in combination with a fixed Fill= colour for a specific fill/hatch pattern, perhaps for drawing regions of interest or study..
@field,filename	@unit,themes.dbf	'unit' ('geological unit') is a field in the .DBF file that is associated with the .SHP file. It contains codes for the geological unit of the polygons found in the .SHP file. 'unit' is also a field in the 'themes.dbf' file which contains a table of all of the possible units and their colours (see Appendix D.11.3).
NONE	NONE	The special colour 'none' specifies that the interior of the polygon is drawn without any fill pattern.

The default fill colours are:

for polyline:	n/a

for polygon:	none

Examples of ASX Files

    (a) SHP Files Containing Polylines (Arcs)

1. draw all rivers in solid blue lines (no attribute file required)

[display]

line=blue,solid

2. draw fault lines using colour & style from a lookup (theme) table

[display]

attributes=faults.dbf

line=@fltype,theme.dbf

    (b) SHP Files Containing Polygons

1. draw all lakes cyan with blue outlines (no attribute required)

[display]

line=blue,solid

fill=cyan

pattern=none

2. draw only the lines from a geology file (no attribute file required)

[display]

line=black,dash

fill=none

pattern=none

3. same as above, but fill the polygons using colours from a lookup table

[display]

attributes=geology.dbf

line=black,dash

fill=@age,theme.dbf	(see Appendix D.11.3)

pattern=none

4. draw all lakes cyan, with black outlines & blue XXX hatch fill

[display]

line=black,solid

fill=cyan

pattern=blue,#X

6. draw geology, using the 'formation' theme from themes.dbf & black stripes

[display]

attributes=geology.dbf

line=none

fill=@formation,themes.dbf	(see Appendix D.11.3)

pattern=black,#-


ASX Theme File Format
D.11.3 ASX Theme File Format

Theme Files for ASX Files (Arc/Info Shape Files)

Overview

A theme file is a .DBF file that you create (using a database or spreadsheet application), containing 1 or more lookup tables for lines (colour & style), polygons (fill colour or pattern colour & style).  These tables are contain lookup items which correspond to data values in the .DBF attribute file that accompanies each .SHP/.SHS file.  The theme file also contains 1 or 2 titles to be used for a legend, which SurView draws in a floating window.

For example, you might call the file THEMES.DBF.  Note that the filename extension does not have to end with .DBF (but it must be a dBase file), so you can also call it GEO.THM (or some other suffix that seems reasonable) without conflicting with the primary GEO.DBF file. This will allow you to have a 'family' of files:

GEO.SHP	the 'shape' file exported from Arc/Info

GEO.DBF	the primary .DBF file associated with GEO.SHP

GEO.THM	the themes for viewing GEO.SHP

Use of Theme Files

Refer to a specific theme in the theme .DBF file by supplying the 'Key' and the .DBF filename in the .ASX file:

[display]

line=none

fill=@age,themes.dbf

pattern=none

When the ASX file is selected, SurView reads the entire themes file, building a list of all of the themes and verifying the following:

- there must be at least 1 theme

- there must be a TITLE for each theme

- there must be at least 1 item for each theme

- all colours must be present and valid

- every KEY field must also be a field in the .DBF file associated with the .SHP file

While viewing the .SHP/.SHS file, any of the themes in the .DBF file can be selected from a menu, allowing the same .SHP file to be viewed using several pre-defined themes.  SurView can also display a legend for the current selected theme (see Section 8.3.8).

Structure of Theme Files

All theme tables must have five columns (fields):

Column	Description
KEY	corresponds to a field in the .DBF file associated with the .SHP/.SHS file
ITEM	lookup value or keyword (see next table)
DESC	description of the ITEM or keyword value
COLOUR	line, fill or pattern colour
STYLE	line or pattern style

In addition, the DESC2 & COLOUR2 columns (fields) are optional (see below for details):

Optional Column	Description
DESC2	alternate description of the ITEM or keyword value (usually another language)
COLOUR2	alternate line, fill or pattern colour (usually for printing)

The ITEM column can contain the following reserved keywords:

Keyword for ITEM Column	Requirements	Description
TYPE	mandatory	LINE, FILL or PATTERN
TITLE	mandatory	a title for the top of the legend
BTITLE	(optional)	a title for the bottom of the legend
COLOURTABLE	(optional: only required if the COLOUR column contains colour numbers)	the name of a .RGB/.CMY colour table
PATTERNTABLE	(optional: only required if the theme TYPE is PATTERN and the STYLE column contains user-defined pattern names)	the name of a file of user-defined patterns
<anything else>		the value to be used to look up the drawing colours & styles

A Simple Example: Each of 3 Theme Types

The use of the columns and keywords for each of the 3 theme types (LINE, FILL & PATTERN) is shown in this example:

KEY	ITEM	DESC	COLOUR	STYLE
fltype	type	line
fltype	title	Faults	black
fltype	btitle	British Columbia	red
fltype	nr	Normal	red	solid
fltype	ot	Overthrust	green	dash
fltype	dy	Dyke	blue	solid
fltype	ss-s	strike-slip (sinistral)	black	dot
...	...	...	...	...
unit	type	fill
unit	title	Lithological Unit	black
unit	colourtable	geo.rgb
unit	DPGt	DPGt	123
unit	EOE	EOE	12
unit	EJm	EJm	96
...	...	...	...
tectonic:h	type	pattern
tectonic:h	title	Tectonic Belt	red
tectonic:h	Cache	Cache Creek Terrane	rgb(10,10,10)	#X
tectonic:h	Cassiar	Cassiar Terrane	rgb(100,200,100)	#+
tectonic:h	Quesnel	Quesnel Terrane	rgb(200,40,150)	#\
...	...	...	...	...
tectonic	type	pattern
tectonic	title	Tectonic Belt	red
tectonic	patterntable	geology.pat
tectonic	Cache	Cache Creek Terrane	rgb(10,10,10)	bricks
tectonic	Cassiar	Cassiar Terrane	rgb(100,200,100)	dots
tectonic	Quesnel	Quesnel Terrane	rgb(200,40,150)	!p43
...	...	...	...	...
1. Line Theme (fltype)

SurView uses the 'fltype' field in the .DBF file to look up the line colour & style from this table.

2. Fill Theme (unit)

SurView uses the 'unit' field in the .DBF file to look up the polygon fill colour from this table. The colours appear as colour numbers, so SurView looks up the RGB values from the 'geo.rgb' table specified with the COLOURTABLE keyword.

3a. Pattern theme (tectonic:h)

SurView uses the 'tectonic' field in the .DBF file to look up the polygon colour & hatch style from this table. The patterns are all reserved, i.e. #X, #+ & #\.

3b. Pattern Theme (tectonic)

SurView uses the 'tectonic' field in the .DBF file to look up the polygon colour & pattern from this table. The patterns are not reserved hatch style names, so SurView looks up the bit pattern from the 'geology.pat' file specified with the PATTERNTABLE keyword.

The COLOURTABLE & PATTERNTABLE file formats are described below.

A Working Example

Now consider a GEO.SHP file of geological polygons, which has an associated GEO.DBF file.  The GEO.DBF file might look like:

IDPOLY	AGE	UNIT	TECTONIC	...
1	cen	DPGt	Cache	...
2	mes	EOE	Cassiar	...
3	cen	EJm	Cassiar	...
4	pal	EOE	Quesnel	...
5	pal	DPGt	Cache	...
...	...	...	...	...

and the GEO.THM 'theme' file might look like:

KEY	ITEM	DESC	COLOUR	STYLE
age	type	fill
age	title	Geological Age	black
age	btitle	British Columbia	red
age	cen	Cenozoic	rgb(10,120,30)
age	mes	Mesozoic	rgb(100,90,200)
age	pal	Paleozoic	rgb(200,0,40)
age	pro	Proterozoic	rgb(150,150,150)
...	...	...	...
unit	type	fill
unit	title	Lithological Unit	black
unit	colourtable	geo.rgb
unit	DPGt	DPGt	123
unit	EOE	EOE	12
unit	EJm	EJm	96
...	...	...	...
tectonic	type	fill
tectonic	title	Tectonic Belt	red
tectonic	Cache	Cache Creek Terrane	rgb(10,10,10)
tectonic	Cassiar	Cassiar Terrane	rgb(100,200,100)
tectonic	Quesnel	Quesnel Terrane	rgb(200,40,150)
...	...	...	...
This table contains 3 themes for the fill colours for the geological polygons. The ASX file might specify one of them:

[display]

attributes=geo.dbf

line=none

fill=@unit,geo.thm

pattern=none

When the ASX file is selected, the .SHP/.SHS file will be drawn as filled polygons based on the rock unit.  In SurView, the user can select the 'Edit' menu item and bring up a dialog box which lists all of the available line, fill and pattern themes from the file (3 fill themes in this case). Any of the other themes can be selected to display the same file with a different view.

Restrictions & Rules

1.	You can have as many fields in the 'themes' .DBF file as you wish: the KEY, ITEM, DESC,  COLOUR & STYLE fields are all mandatory and the others are ignored. Note that the STYLE field is not used for 'Fill' themes, but it must be present in the file.

2.	You must have at least 1 theme in the file, but you can have as many as you wish

3.	The field names in the KEY column must also be present in the .DBF file associated with the .SHP file (for example, 'age' appears in the THEME.DBF file and in the GEO.DBF file).  If you want to have 2 'age' themes, you can use the following form:

age:name

where the field name is separated from the identifier name by a ':' (mandatory).

For example, you could have 2 themes:

age:fill	fill colours based on 'age'

age:hatch	hatch patterns based on 'age'

both of which use the 'age' field in the database to look up the drawing attributes. Then you can have 2 .ASX files, each of which displays a different view of the file (solid fill or hatch pattern fill):

AGEFILL.ASX

[display]

attributes=geology.dbf

line=none

fill=age:fill,themes.dbf

pattern=none

AGEHATCH.ASX

[display]

attributes=geology.dbf

line=none

fill=none

pattern=age:hatch,themes.dbf

4.	You must have an entry called 'TITLE' in the ITEM column. This is the title which appears at the top of the legend.  Optionally, you can also have a 'BTITLE' entry in the ITEM column - this is the title for the bottom of the legend.

5.	Colours may be specified as names (RED, GREEN, BLUE, etc) or as RGB(r,g,b) or CMY(c,m,y) triplets.  See Appendix F for a complete description of the colour names.

Keys vs Descriptions

Generally, the ITEM column will contain a short code or key name for the feature and the DESC column will contain a more complete description, however the contents of the ITEM & DESC columns can be identical (as for the 'unit' theme in the example above).  In the legend configuration dialog box, either the 'short name' (from the ITEM column) or the 'long name' (from the DESC column) can be selected for labelling the legend boxes.

Alternate DESC2 Description

A second DESC2 column is an optional item. If you have DESC descriptions in an alternate language (i.e. french), you can put them in this column. Although all of the descriptions must be non-blank for DESC, any or all of the DESC2 column can be blank. These strings are only displayed (in the legend) if the Options | Use Alternate Language Where Available option is enabled. If DESC2 was not supplied or if the DESC2 string is empty, the DESC string is displayed instead. That's what "where available" means.

In addition to the alternate language values for the ITEM descriptions, the DESC2 column also contains alternate language versions of the 2 titles (TITLE and BTITLE).

Alternate COLOUR2 Colour Table

A second COLOUR2 column is optional: it can contain exactly the same values as the COLOUR column. Note that this option is not intended to be used as another 'theme', only as an alternate set of colours for the same theme: the colours in COLOUR2 should correspond to the same 'theme' or classification as in COLOUR column.  The COLOUR2 table was designed to allow a second set of colours (which are more appropriate for printing) to be selected prior to printing. This is often required because RGB(r,g,b) values that look ok on the screen, often do not have the same colour when used to print.

The alternate COLOUR2 table is selected with the Options | Use Alternate ASX Colour Table Where Available. This menu selection is only enabled if at least one ASX file refers to a theme in a DBF file which contains a COLOUR2 column.

If one theme in a DBF file has an alternate COLOUR2 table, it is not required that all themes in the DBF file also have colour entries in the COLOUR2 column. If the Options | Use Alternate ASX Colour Table Where Available option is enabled, and the COLOUR2 column for the current theme has a blank entry, the corresponding colour from the COLOUR table is used.

Initial Legend Display

By default, the legend file is displayed when the ASX file is added to the File Display List. You can suppress this behaviour with the 'hide' option, i.e.:

[display]

fill=@age,themes.dbf,hide

or you can suppress the legend display entirely with the 'none' keyword. The 'none' option is useful if you need to use a lookup table, but a legend wouldn't really show anything useful.

COLOURTABLE Format

If the COLOUR column contains colour numbers (as opposed to names or RGB/CMY triplets), then the COLOURTABLE keyword is required and the DESC column must contain a valid filename. Otherwise, the COLOURTABLE entry is not required.  SurView will look for the colour table in the same directory as the .ASX file. If it does not find it, it will look in the ...\SURVIEW directory (where SURVIEW.EXE is located).

Each line of the file contains an (R,G,B) or (C,M,Y) triplet, where each of R, G & B or C, M & Y is a number in the range [0,255].  If the filename extension is .CMY, each triplet is assumed to be (c,m,y) values, otherwise the values are interpreted as (r,g,b) (it is suggested, but not required, that .RGB be used for files containing (r,g,b) values.  SurView counts the number of colours it reads from the file: there is an [arbitrary] limit of 256 colours. This file is identical to the palette file used for grid GRX files.  See Appendix D.9 for further information on RGB/CMY palette files.

PATTERNTABLE Format

This keyword is only required for a PATTERN theme that contains user-defined pattern names in the STYLE column (as opposed to reserved hatch style names).  The DESC column must contain a valid filename. SurView will look for the pattern table in the same directory as the .ASX file. If it does not find it, it will look in the ...\SURVIEW directory (where SURVIEW.EXE is located). There is no restrictions on filename extensions.

The user-defined pattern file is an ASCII file that contains as many 8 X 8 patterns as you wish. The file looks like:

!this is an 'up' arrow

#BeginPattern uparrow

...X....

..XXX...

.X.X.X..

X..X..X.

...X....

...X....

........

........

#EndPattern

!this is a bubble

#BeginPattern bubbles

.XXX....

X...X...

X...X...

X...X...

.XXX....

........

........

........

#EndPattern

!this is a brick pattern

#BeginPattern bricks

xxxxxxxx

....x...

....x...

....x...

xxxxxxxx

x.......

x.......

x.......

#EndPattern

...

Rules

1.	Each pattern must begin with #BeginPattern and end with #EndPattern. The pattern name (or number) must appear after the #BeginPattern keyword.

2.	Each pattern must have EXACTLY 8 rows and each row must contain EXACTLY 8 characters

3.	A '.' or '0' character represents a 'hole' and any other character represents a pattern dot. Spaces may NOT appear in the pattern.

4.	Blank lines may appear anywhere in the file

5.	Lines beginning with '!' are treated as comments and are ignored

When SurView encounters the PATTERNTABLE keyword in the 'theme' file, it reads the entire file, building a table of all of the patterns. Continuing on and reading the rest of the theme, as it reads each pattern name, it looks up the name in the table to verify it.

SurView gives you twice as many patterns as you have in the PATTERNTABLE file. The pattern name is entered in the STYLE column of a PATTERN theme table. To request the inverse pattern, use the pattern name with a '!' prefix. With the above example of 3 patterns, the valid pattern names that can appear in the STYLE column are:

uparrow

bubbles

bricks

!uparrow	(inverse of 'uparrow')

!bubbles	(inverse of 'bubbles')

!bricks	(inverse of 'bricks')


File Display List (FDL) File
D.12 File Display List (FDL ) File

SurView uses a File Display List for the main map display - it is simply an ordered list of files to be drawn.  The File Display List may be managed interactively with the File | File Display List

map menu selection and/or it may be read from an FDL file.

An FDL file is simply an ordered list of SLD, BOB, BLC, GRX and ASX data files to be displayed by SurView.  You may use FDL files in 3 different ways:

·	as an argument (1 or more) in SurView's command-line (specified using Program Manager's File | Properties function)

·	FDL files can be selected using the general purpose file selector activated by the main map menu selection: File | File Display List

·	FDL files can reference other FDL files (i.e. they can be 'nested')

Note that the File Display List may contain only one SLD file and/or one GRX file: this is a SurView restriction.  In addition, it usually contains one BLC file: this is a practical limitation (too difficult to use the information from two contour files).

How to Create an FDL File	FDL File Format


How to Create an FDL File
D.12.1 How to Create an FDL File

You may use any plain-text ASCII editor to create FDL files.  A simple way to list create a list of files is to redirect the DOS 'dir' command:

c:\> dir/b *.ASX > xxx.fdl

Keep in mind that you can have several FDL files, each with a different combination of files to be displayed.  This provides a convenient way to encapsulate sets of files.  For example, you may wish to use the same set of background files (lakes, rivers, text labels, geology etc) with each grid (GRX) file.  Create an FDL file (i.e. BACK.FDL) containing the names of these background files.  You can then select one of several GRX files and then select the BACK.FDL file.

Don't forget that you can use these FDL files as command-line arguments to SurView (using File | Properties in Program Manager).


FDL File Format
D.12.2 FDL File Format

Each line of the FDL file must contain only one filename or pathname or option.  For filenames, the full pathname (drive & directory) is optional.  If not supplied, they are copied from the pathname of the original selected FDL file. You may use relative pathnames, i.e.  ..\..\XXX.ASX.  All filenames must have a filename extension, so SurView can identify the file type.

Each line read from the FDL file is processed exactly the same as if it was supplied as a command-line argument, whether it is a filename or an option.  Therefore, any of the command-line options (see Section 2.3.3) can also appear in the FDL file, provided each option appears on a separate line.

Blank lines are allowed and are ignored.  Use '!' to begin lines used as comments, which are then ignored.

Special Case: ASX Files

For ASX files only, you may over-ride the following ASX display attributes:

[DISPLAY]

LINE=...

FILL=...

PATTERN=...

by putting 1 or more or them on the same line of the FDL file that contains the ASX filename.  Use the exact same syntax, but prefix each of the 3 keywords with a '-'.  Do not use any spaces within each expression; separate the attribute expressions with spaces, i.e.:

XXX.ASX  -LINE=none  -FILL=red

You're probably wondering why this is useful... Suppose you have several .SHP files which comprise a much larger area. If you select only a single SHP file, you might want to draw the polygon outlines with black lines:

XXX.ASX

...

[display]

line=black,solid

...

But if you select all of the SHP files, the scale changes to show a much larger area and the black lines tend to obliterate the fill colours. So you might gather all of these ASX files into a single FDL file to display them all without the black lines:

XXX.ASX -line=none

YYY.ASX -line=none

ZZZ.ASX -line=none

...

Alternate Language & File Choice

If two filenames appear on the same line, separated only by a single '|' (vertical bar), SurView will use the second file if the 'alternate language' option (-altlang) is enabled, otherwise, it will use the first file. For example:

english.bob|francais.bob

    ^

Don't use any embedded spaces in the filename(s).

More Examples:

  REDLK.FDL

w:\redlk\redlk.sld

back.fdl

  XXX.FDL

!these are options and this is a comment

-ct=B

-view=200e3:400e3:5100e3:5150e3

!these are files

geology.asx -line=none

lakes.bob

rivers.bob

!english or french title

title_e.bob|title_f.bob


Stacked Profile (STP) Specifications File
D.13 Stacked Profile (STP) Specifications File

While viewing the stacked profiles for a particular flight line, you can choose File | Print Stacked Profiles to print the stacked profile section.  However, this is not particularly convenient to print the stacked profile sections for all of the flight lines in the survey and it does not allow the flight line to be partitioned into sections corresponding to each map sheet in a multi-sheet survey.

The STP file is an ASCII file of map sheet names and record numbers for the intersection of the flight lines with the geographic (longitude,latitude) map sheet boundaries.  It is used to print a set of stacked profiles with minimal interaction.

STP files are created by SurView's intersecting tool (see Section 8.7.4), which intersects the (longitude,latitude) co-ordinates of the flight lines with the (longitude,latitude) boundaries of the map sheets.  The intersection point is specified by flight line record number, i.e. [1,n].  In special  cases (I can't imagine what), the files can also be created by hand using any plain-text ASCII editor, provided that the line numbers/names and their lengths are known.

To print the set of stacked profiles, the file is selected using Profiles | Print Set of Stacked Profiles from the main map menu.  After the file has been read and verified, the print setup procedure is invoked to allow the scale to be set (using the longest flight line segment read from the STP file), before printing.  Subsequently, the stacked profile sections are printed one after another.

A single STP file can contain the intersection information for all of the flight lines in a survey and all of the map sheets covered by the survey.  However, it is suggested that a separate STP file be created for each map sheet, so that the stacked profiles are plotted in groups which correspond to the publications.  Furthermore, it makes it easier to re-plot a group in the event of a printer or system malfunction.

How to Create an STP File	STP File Format


How to Create an STP File
D.13.1 How to Create an STP File

Use SurView's built-in intersection tool to create STP files (see Section 8.7.4).  You are required to provide the map sheet name (for the title when printed) and the longitude and latitude of the map sheet boundaries.  The tool then intersects the flight lines in the current SLD file to produce the STP file.


STP File Format
D.13.2 STP File Format

The STP file is an ASCII file of map sheet names, flight line numbers and record numbers for the intersection of the flight lines with the geographic (longitude,latitude) map sheet boundaries.  It is used to print 'sets' of stacked profile sections for specific map sheet boundaries.

For each of 1 or more map sections, there is a header which specifies the map sheet name (used for the second title at the top of the stacked profile section).  In addition, there may be comments which describe the map sheet (such as  the geographic bounding co-ordinates).

Following the map sheet header are several lines of flight line intersection information.  Each line read from the file contains the following:

·	The flight line cardinal number within the SLD file.  Note that this is not the flight line name/number (i.e. 1072) that is used to identify the flight line.  This number is in the range [1,N] where N is the total number of flight lines in the SLD file.

·	The flight line grid number.  This number is not used to plot the data and serves only to identify flight lines which are in the same group and which are to be plotted together in a profile.  See #line_GridLine in the description of the LXF file for further details (Section D.2.2).  A set of flight lines which share the same grid number must be grouped together in the STP file.

·	start & end record number.  These are the record numbers for the points at which the flight line crosses the map sheet boundary.  They are in the range [1,M] where M is the no. of records in the flight line.  The start record is always less than or equal to the end record, i.e. the direction of the flight line is not reflected in these two numbers.

Comments may be added to the right of these 4 numbers and are ignored.

The end of each map sheet section and the beginning of the next map sheet section is marked by a set of 4 -1 values for the cardinal number, grid line number & start & end record.

All values can be separated by spaces, tabs or commas.  Comments may be inserted anywhere in the file, as long as the first character is '!'.  Comments also may be added on the right side of the data values (the '!' is not required, but can be added if you wish).  Text items such as the map sheet name and line names only need to be enclosed in ' or " quotes if they are more than one 'word'.

Example:

!header for first map section

'63K: Swampy Lake, Manitoba'

!100 0 0	102 0 0	!min/max longitude

! 54 0 0	  	55   0 0	!min/max latitude

1	23	1	200	!line '23'

18	23	1	123	!line ''23b'

19	23	18	96	!line '23c'

24	102	123	400	!line 'ABC102'

26	102	12	105	!line 'ABC102-4.4'

3	3	1	198	!line '3'

-1	-1	-1	-1	!end of this map section

!header for second map section

'63J: Bottomless Mudhole, Manitoba'

!102 0 0	104 0 0

!54 0 0	55 0 0

1	23	201	267	!line '23' (again)

24	102	1	122	!line 'ABC102' (again)

-1	-1	-1	-1	!end of this map section

Notes:

1.	The first profile section consists of pieces of line numbers 1, 18 & 19 which are all part of grid line 23

2.	The second profile section consists of pieces of line numbers 24 & 26 which are all part of grid line 102.

3.	The third profile section consists of only a single piece of line number 3

4.	The fourth profile section (second map), consists of a piece of line number 1.  In fact it is the rest of line '23' as it crosses from map sheet 63K into map sheet 63J: records 1-200 appear on map sheet 63K and records 201-267 appear on map sheet 63J.

5.	The fifth profile section consists of another piece of line number 24 which is part of grid line 102.


Exported Line Data (XLD) File
D.14 Exported Line Data (XLD ) File

Survey Line Data (SLD) file data for the current stacked profile section being viewed may be exported to an ASCII file, suitable for importing into most spreadsheets (i.e. comma and "" delimited values).  SurView provides this feature in the File | Export Stacked Profile Data menu selection of a stacked profile window.

The data in the stacked profile display (from 1 or more flight line 'parts') is plotted from left to right in 'forward' geographic order, i.e. from west to east for an east-west or diagonal survey and from south to north for a north-south survey.  This is not necessarily the same as the flight direction, as flight lines are often flown in alternate directions.  However, when the data values are exported, they are written out in chronological order, i.e. with record numbers in column 1 increasing.  If the stacked profile section is composed of more than 1 flight line, there is no attempt to order the individual flight lines.  Each line has a header in the exported data file, but the order of the lines is the same as they appear in the SLD file (which is usually in the chronological order flown).

Export of the entire SLD data set is outside the scope of SurView and is better handled externally by a program which reads and reformats the SLD file.

How to Create an XLD File	XLD File Format


How to Create an XLD File
D.14.1 How to Create an XLD File

First choose a flight line for which you wish to view stacked profile data.  Only the data which is visible in the display window for the stacked profile will be exported.  You can export a subset of the data by using the Zoom/Pan feature (menu item View | Zoom) and/or by disabling the plotting of any of the variables (menu item Edit | Stacked Profile Data | Colours, Lines, Scales).

When you have selected the data to be exported, choose File | Export Stacked Profile Data from the menu. You will be prompted to enter the name of the output file.  SurView creates the initial (default) filename using the name of the SLD file and the flight line name.  You may use this or specify another filename.  You will be warned if the file already exists and will have the opportunity to choose another name or over-write the existing file.

SurView then proceeds to write out the data to the output file, returning you to the stacked profile view when finished.


XLD File Format
D.14.2 XLD File Format

SurView creates these files when directed to export stacked profile data from the stacked profile display.  They are in a format which is suitable for importing directly into most spreadsheet applications, i.e. as comma and "" delimited values in columns.

The suggested (initial) name of the export file is derived from the first few characters of the SLD filename and the flight line name.  The suffix is XLD.  Of course, you may over-ride this filename and enter your own name (including filename extension) if you wish.  You will be warned if the output file already exists and will have the opportunity to choose another file or over-write the existing file.

The exported data file contains the following:

·	several lines of survey description

·	a row showing the variable name at the top of each column

·	a row of values of 'undefined' used for each variable (column)

·	column 1 shows the record number (ident is "REC").  The record number is always relative to the first record of the flight line as it was flown, regardless of whether or not the SLD file contains the entire flight line or just a segment (see keyword #line_StartRecord in the LXF file description in Appendix D.2.2).   This record number is suitable for using as the spreadsheet X-axis series, although it does not necessarily imply a constant spacing between the data points)

·	next follows n columns of data, one for each variable.  The order of the variable columns is the same order as the order from top to bottom in the stacked profile display (which in turn is the same as the order of the variables in the SLD file).

·	the last 2 columns contain the X & Y co-ordinates (easting & northing).  The variable identifiers are E (Easting) and  N (Northing) respectively.

Example

"Exported Survey Line Data from bouch.sld"

"Bouchette, Quebec, 1992"

"Source: Geological Survey of Canada"

"Flown By: Geological Survey of Canada"

"Sample Time: 1000 (ms)"

"Line Spacing: 1000 (m)"

"Flight Azimuth: 90 (degrees)"

"Projection: proj=utm,ellps=clrk66,zone=18"

"Note: data values within each flight line are in order of acquisition"

"-------------------------------------------------------------------------------"

"REC", "Height", "eTh/K", "eU/K", "eU/eTh", "eTh", "eU", "K", "Exp.Rate", "Mag TF", "E", "N"

-1, -12345, -12345, -12345, -12345, -12345, -12345, -12345, -12345, -12345, -12345, -12345, -12345, -12345

Line 13, type=normal, direction=forward

31, 123.66, 2.63477, 0.355992, 0.118922, 1.61583, 0.271663, 0.775216, 1.83739, 56984, 419746, 5.105e+06

32, 125.83, 2.63477, 0.355992, 0.118922, 2.13204, 1.13197, 1.10306, 3.02853, 56998, 419801, 5.105e+06

...

802, 127.249, 1.70317, 0.706142, 0.430132, 1.47824, 0.709639, 1.06981, 2.51184, 56794, 465068, 5.10494e+06

803, 132.641, 1.70317, 0.706142, 0.430132, 0.912662, 0.898792, 0.998558, 2.3475, 56707, 465130, 5.10494e+06


SurView Configuration File (SURVIEW.CFG)
D.15 SurView Configuration File (SURVIEW.CFG)

SurView maintains only one configuration file: SURVIEW.CFG.  It contains default colours and line styles for background & general purpose items.  Other display attributes which are specific to a particular data file are stored in that data file.

SurView does not require SURVIEW.CFG - it uses default values if it does not exist.  It is only created if the general display attributes are modified and the user responds with 'yes' when prompted with:

   "General Drawing Attributes Have Changed.  Save changes (SURVIEW.CFG) ?"

Note that SURVIEW.CFG is maintained in the ...\windows directory rather than in SurView's 'home' directory to allow each user on a network to have their own SURVIEW.CFG file.  This could not be guaranteed if the file was maintained in SurView's home directory.

How to Create a SURVIEW.CFG File	SURVIEW.CFG File Format


How to Create a SURVIEW.CFG File
D.15.1 How to Create a SURVIEW.CFG File

SurView will only create/modify the SURVIEW.CFG file when you exit SurView:

· if you change any of the general drawing attributes (accessed from Edit | Other)

and

· if you respond with "yes', when asked if these attributes should be saved

SurView will only create/modify the SURVIEW.CFG file when you exit SurView:


SURVIEW.CFG File Format
D.15.2 SURVIEW.CFG File Format

SURVIEW.CFG is a binary file - it's format is subject to change by SurView.  It contains the following information:

  1. display monitor calibration factors

These are the settings accessed from the main map view's system menu.

  2. display attributes for background items for colour tables A, B & C

These are the items that are visible in the display attributes dialog boxes accessed from the Edit | Other menu items for both the main map view and the stacked profile view.  They include:

·	background colours (map & stacked profile views)

·	reference grid line colours & styles and yes/no plot flag

·	zoom and pan cursor line colours & styles (map & stacked profile views)

·	stacked profile line styles & colours and text colours for axes, labels, numbers and titles


Cartographic Projections
Appendix E: Cartographic Projections

SurView has limited, but adequate, cartographic projection capabilities.

The projection information for ASCII LXF, AOB & ALC files (which are compiled to create binary SLD, BOB &  BLC files) and the ASCII GRX grid descriptor file is supplied with the '#Projection' keyword in all cases (Projection in GRX files).  The value for that keyword is a character string (case is not significant) containing either a single keyword:

#LongLatDMS	(or the older #LongLat)

#LatLongDMS	(or the older #Latlong)

#LongLatDegrees

#LatLongDegrees

or a list of the names and values of the parameters which are appropriate to the projection:

proj=name, p1=p, p2=p, p3=p, ...

where 'name' is the name of projection and p1, p2, p3, ... are parameters which describe the projection.  The 'p' values of these parameters depend on the projection.  Embedded whitespace is ignored, but each pair of values must be separated by a comma.

West is Positive!

SurView uses the convention that West is positive.  Projection central meridians and/or Lambert parallels may have the N, S, W or E suffix to designate quadrant or the sign can be used.  A positive central meridian (or W suffix) is assumed to be West of Greenwich: a negative value (or E suffix) implies East Longitude.  A negative value of latitude is used for the southern hemisphere.

Restrictions on use of Geographic Projections in ASCII Files

If the projection is #LongLatDMS (#LongLat) or  #LatLongDMS (#LatLong), the (x,y) co-ordinates must be in the form:

d m s   d m s

where each (d,m,s) triplet represents (degrees, minutes, seconds) for each of longitude and latitude.  Positive longitudes are used for the Western hemisphere.  If a negative sign is required to specify the hemisphere, the sign may appear on any or all of the 3 values.

If the projection is #LongLatDegrees or #LatLongDegrees, the (x,y) co-ordinates must be in the form:

dd  dd

where each dd value is a arbitrary precision floating-point value ('decimal' degrees).  Whole numbers do not require decimal points or trailing 0 digits.

In all cases,  (longitude,latitude) order is assumed for #LongLat... and (latitude,longitude) order is assumed for #LatLong...

File Type	#LongLatDMS (#LongLat) or #LatLongDMS (#LatLong) or #LongLatDegrees or #LatLongDegrees Allowed?	Explanation
GRX	no	grid files are never geographic
AOB/ALC	yes	polygons and text may have geographic or projected co-ordinates
LXF	yes	only #LongLatDegrees, since the order of (x,y) in LXF files is always (longitude,latitude) and the values are always floating-point (not D,M,S)

SurView recognizes the following keywords in the projection string specification:

Keyword	Values	Description
proj	utm tmerc lcc vandg aeqd	Universal Transverse Mercator (cylindrical) Transverse Mercator (cylindrical) Lambert Conformal Conic (conic) van der Grinten 1 (spherical) Azimuthal Equidistant (polar only, i.e. lat_0  must be 90N or 90S!)
ellps	clrk66 intl	Clarke 1866 ellipsoid International (Hayford 1909)
zone	[1,60]	UTM zone number (only valid for proj=utm)
x_0	easting (m)	False easting A false easting of 500e3 m is implied with proj=utm.
y_0	northing (m)	False northing.  A false northing of y_0=1e7 m is often used in the southern hemisphere.
lon_0	[-180,+180]	Longitude of central meridian.  Note: west longitude is positive: you may append W or E or use a - or + sign prefix.
lat_0	[-90,+90]	Latitude of origin.  Default is 0 (equator).  You may append W or E or use a - or + sign prefix.
lat_1	[-90,90]	Lambert south parallel (only for proj=lcc).  Northern hemisphere is positive: you may append N or S or use a - or + sign prefix.
lat_2	[-90,90]	Lambert north parallel (only for proj=lcc).  Northern hemisphere is positive: you may append N or S or use a - or + sign prefix.

The following table summarizes the usage of the parameters with each projection 'proj':

proj	ellps	x_0	y_0	lon_0	lat_0	lat_1	lat_2	zone
stm	M	X	X	M	X	X	X	X
tmerc	M	(optional)	(optional)	M	(optional)	X	X	X
utm	M	(optional)	(optional)	X	X	X	X	M
lcc	M	(optional)	(optional)	M	(optional)	M	M	X
vdg1	M	X	X	M	X	X	X	X
aeqd	M	X	X	M	M	X	X	X

M=mandatory	X=invalid

Examples

UTM:	proj=utm, ellps=clrk66, zone=18

Transverse Mercator:	proj=tmerc, ellps=clrk66, x0=5e5, lon_0=85W

Lambert Conformal:	proj=lcc, ellps=clrk66, lat_1=40N, lat_2=50N, lon_0=85W

van der Grinten 1:	proj=vandg,ellps=clrk66,lon_0=10E

Azimuthal Equidistant:	proj=aeqd,ellps=clrk66,lon_0=100W,lat_0=90S

Restrictions on Different Projections in the File Display List

Each time a file is added to the File Display List, SurView follows these rules:

1.	the first non-geographic file controls the projection: all subsequent geographic files must have the same projection.

2.	if all files are geographic, SurView uses a default projection (proj=utm) with a UTM zone computed from the average of the longitude range of all of the files.  If the range of longitudes is great, SurView uses a Lambert projection (proj=lcc).

After the display has been drawn, you can see the description of the projection in use by geographic files by selecting File | File Display List from the main map window menu and using the File Info button to view file information for a geographic file in the File Display List.

If you want to display a geographic file with a specific projection (other than the default), simply create a small .AOB file containing only the #Projection keyword with the required parameters.  Compile it to create a .BOB file (SurView will warn you that the file is 'empty') and select that .BOB file (i.e. add it to the File Display List) before any geographic files are selected.  All subsequent geographic (longitude,latitude) files will then use that projection.


Colours for AOB, ASY & ASX Files
Appendix F: Reserved Colour, Symbol and Line Style Names for AOB, ASY & ASX Files

Case is not significant for any of these reserved names.

1.	Colour Names

These reserved colour names can be used for line & fill colours for keywords in AOB & ASY files:

#PolyStyle

#TextStyle

#PointStyle

and for these entries in ASX files:

Line=

Fill=

Pattern=

and for the COLOUR column of a LINE, FILL or PATTERN theme (Appendix D.11.3) used with an ASX file:

Light Colours	Dark Colours
White	Black
LGray (or LGrey)	dGray (or dGrey)
Red	dRed
Green	dGreen
Blue	dBlue
Cyan	dCyan
Magenta	dMagenta
Yellow	dYellow
For AOB/ASY files, you may also use the reserved word 'none' for the fill colour (implying the item is not to be filled with any colour).

For ASX files, you may use the reserved word 'none' in a similar fashion for the Line=, Fill= and Pattern= colours to explicitly declare that the line, fill or pattern is not to be drawn.

In addition, colours may be expressed in the following alternate forms:

(a) RGB(r,g,b)

where r=g=b=[,0255] are the red, green & blue components

(b) CMY(c,m,y)

where c=m=y=[0,255] are the cyan, magenta & yellow components

(c) RGB%rgb

where r=g=b=[0,9], each digit of which represents 10% of the corresponding colour component. For example:

RGB%0	0% red, 0% green,0% blue	(=black)

RGB%999	90% red, 90% green, 90% blue	(=light grey)

RGB%234	20% red, 30% green, 40% blue

The 'rgb' integer must be in the range [0,999]. The equivalent [0,255] value for each colour component is computed by scaling each % value linearly to [0,255].

(d) CMY%cmy

where c=m=y=[0,9], each digit of which represents 10% of the corresponding colour component. For example:

CMY%0	0% cyan, 0% magenta,0% yellow	(=white)

CMY%999	90% cyan, 90% magenta, 90% yellow	(=dark grey)

CMY%234	20% cyan, 30% magenta, 40% yellow

The 'cmy' integer must be in the range [0,999]. The equivalent [0,255] value for each colour component is computed by scaling each % value linearly to [0,255].

The relationship between the RGB and CMY colour schemes is complementary:

R + C   =   G + M    =   B  + Y   =   255

For convenience, you may also use any of the 6 possible permutations of the 3 RGB or CMY letters in any of the formats:

RGB(r,g,b)	CMY(c,m,y)

RBG(r,b,g)	CYM(c,y,m)

GRB(g,r,b)	MCY(m,c,y)

GBR(g,b,r)	MYC(m,y,c)

BRG(b,r,g)	YCM(y,c,m)

BGR(b,g,r)	YMC(y,m,c)

Similarly for the RGB%rgb and CMY%cmy formats.

2.	Symbol Names

These reserved symbol names can be used for the #PointStyle keyword in AOB & ASY  files:

Symbol	Description
Circle	an open or filled circle
Square	an open or filled square
Triangle	an open or filled isosceles triangle
Plus	a '+' sign (no fill colour)
5-Star	the classic 5-point star (open or filled)
Arrow-Tip	an arrow with the 'tip' at the indicated point
Arrow-Tail	same as Arrow-Tip, but with the 'tail' at the point
Circle-Plus	same as Circle, but with a '+' sign in the middle (like Plus')
Circle-Dot	same as Circle, but with a 'dot' in the middle
3.	Line Style Names

The following reserved line style names can be used for:

- the #PolyStyle keyword in AOB and ASY files

- the Line= entry in ASX files

- the STYLE column of a LINE theme (Appendix D.11.3) used with an ASX file

Line Style Name

Solid

Dash

Dot

Dash-Dot

Dash-Dot-Dot

4.	Hatch Style Names

The following reserved hatch style names are used for the STYLE column of a PATTERN theme (Appendix D.11.3) used with an ASX file. Each keyword is 2 characters long: a '#' prefix and a single character. The names may seem a bit odd, but they are easy to remember because they are 'visual'

Reserved Hatch Style Name	Description	Picture
#- (a '-' minus character)	horizontal stripes
#| (a '|' vertical bar)	vertical stripes
#/ (a '/' forward slash)	diagonal stripes
#\ (a '\' back slash)	diagonal stripes
#+ (a '+' plus sign)	grid
#X (an 'X' or 'x' )	diagonal grid