1. Introduction
LOCCONV will import seismic location data from text files and output Lynx LOC files. Seismic location data is usually transferred as some sort of ASCII file containing a number of coordinate records per seismic line. Each record usualy contains the line name, shotpoint number, XY coordinate and/or lat/lon coordinate. The format of these files varies enormously. This utility allows you to specify how to convert these files.
LOCCONV can also read 'standard' UKOOA and SEG-P1 location files in EBCDIC format.
LOCCONV can either be run as a stand-alone utility, or from the File-Import from Text File menu of LOCPREP
2. Running LOCCONV
Open an existing configuration using the File-Open Configuration menu, or select an import file by entering its name in the
Import Filename edit box. Alternatively you can drag a configuration or
import file from an Explorer window.
Click the Preview button to display the first part of your specified import file.
Click the Next button, and enter the number of header (non-data) records the file contains,and
whether the fields in the import file are delimited by character (CSV-type file) or position (UKOOA-type file).
For nearly all import files, you will also
need to ensure that you have set Customise Columns to YES. On the next
page, set the columns which define each of the fields in the file: Line Name,
Shotpoint, Latitude, Longitude, Northing and Easting, and click Preview
to highlight your defined columns in the preview window. On the next page,
specify the conversions to apply (if any) on the shotpoint and lat/lon fields.
Then click the Output button to create a LOC file.
2.1 Command-line options
LOCCONV can be started with a command-line similar to the following:
LOCCONV [-pCONFIGFILE] [-oLOCFILE]
where:
CONFIGFILE is the full path of an optional configuration file with an LCV extension. This file can be created using the Save Configurationmenu. If no parameter file is specified, then LOCCONV will look for the file DEFAULT.LCV in your current 'favourite' folder (the first existing folder in your LAUNCHER-maintained list).
LOCFILE is the full path of the output LOC file to create. This flag is used when LOCCONV is run from LOCPREP to create a new temporary LOC file. If this flag is not specified, you will be prompted for the name of the LOC file to output.
3. Menus and Controls
3.1 Main Menu
- File
- New Configuration
Create a blank new configuration. If a DEFAULT.LCV file exists in your current 'favourite' folder (the first existing folder in your LAUNCHER-maintained list) then the default parameters will be read from here, otherwise, system defaults will be read from LOCCONV.INI - Open Configuration
Open an existing configuration - Save Configuration
Save the current configuration - Save Configuration
As
Save the current configuration with a new file name
- New Configuration
Preview button - this will display the import file in LOCCONV's preview window, allowing you to determine how to customise the import of this file.
Back button - display the previous parameter page.
Next button - display the next parameter page.
Output button - create the output LOC file. If LOCCONV is running as a standalone utility, you will be prompted to enter the output LOC file name. If LOCCONV is running from LOCPREP, then a new LOC file will be created in your USER SCRATCH folder and automatically displayed by LOCPREP (see Command-line optionsabove).
4. Location File Import
LOCCONV presents a number of pages of parameters which determine how the import file is customised for conversion into LOC format.
4.1 Text File Delimiters
The first page defines the type of the input file.
Import Filename - browse for the file to import, or drag and drop the file from an Explorer window
Line Delimiters - select from:
- Auto-detect (default) - LOCCONV should usually be able to determine the type of line delimiters in the file, unless the lines are very long, or use a non-standard fixed length.
- MS-DOS (CRLF) - ASCII lines delimited by carriage-return and line-feed characters (hex 0D 0A), standard for text files on DOS and Windows.
- UNIX (LF) - ASCII lines delimited by line-feed character (hex 0A), standard for text files on UNIX systems.
- MAC (CR) - ASCII lines delimited by carriage-return character (hex 0D), standard for text files on MACs.
- No delimiters (fixed-length records) - Each record follows immediately after the previous one. A true UKOOA file (or a Lynx LOC file) has no delimiters - that is why you cannot edit it in a normal text editor.
- Custom delimiter - each record is delimited by a custom byte sequence. Not yet implemented.
Record Length (bytes) - enabled if Line Delimiters (above) is set to No delimiters. Enter the length of the records in the input file. In this context, a "record" contains the location data for a single shotpoint. For many files this value will be 80 bytes. If in doubt, dump the file before running LOCCONV and count the number of bytes between consecutive line name fields.
Convert EBCDIC to ASCII - enabled if Line Delimiters (above) is set to No delimiters. Standard UKOOA files are written in EBCDIC. If the file in the preview window appears garbled, it may need translating from EBCDIC.
Custom Delimiter (hex values) - enabled if Line Delimiters (above) is set to Custom delimiter. Not implemented.
Preview Load (bytes). the number of bytes to load from the import file into the preview window. Defualt value is 100000 bytes.
Skip Input Records - you can use this parameter and the number of records to output to split large files. If the number of records to skip is set to greater than zero, the preview window will be reloaded accordingly.
Number of Records to Output - set this to a very large number to output all records from a file.
4.2 Column Definitions
The next page defines the number of header records, field delimiters and input record identifiers.
Number of Header Records - enter the number of non-data records at the start of the file to be transferred from the import file to the output LOC file. LOCCONV will always add additional headers to the output LOC file detailing the name of the import file and the date/time of conversion. If you click the Preview button after setting this value, the header records will be highlighted in grey.
Fields delimited by - select from:
- Position - fields are arranged in columns, as in standard UKOOA.
- Character (CSV) - fields are separated by a specified character, usually a comma.
Input Records have ID - answer YES if the first byte of each record in the input file has a UKOOA i.d. byte, usually S,G,Q or A.
Input Record ID character - enabled if Input Record ID character is YES. Enter the character that identifies each data record. Records which do not match this character will not be output.
Field delimiting character - enabled if Fields delimited by Character (CSV). Enter the character which separates fields on each line - usually a comma or a semi-colon.
Customise Columns - answer YES if the columns in the input file do not conform exactly to the UKOOA standard. You will be prompted to supply column information in the next page.
4.3 Customise Columns
This page defines the actual columns occupied by the data in the import file. For example, if the Shotpoints are between columns 10 to 21 in the input file, these numbers should be entered in the Shotpoint row of the table. To suppress an input field, type a zero in column 1 or column 2 in the table. The corresponding output field will be zeroed for all records in the file.
For fields delimited by position, use the preview window to determine the start and end columns. Current line and column of the cursor in the preview window is displayed in the status bar.
For fields delimited by character (CSV files), the preview window will display the fields in columns. Enter the column number for each field present in the import file, or zero if the field is not present.
Line Name
SP Number
Latitude
Longitude
Easting (X)
Northing (Y)
Datum (not used)
Day (not used)
Time (not used)
4.4 Custom Field Conversions
This page defines conversions applied to specific fields to transform them into values acceptable in a Lynx LOC file.
- Standard - for normal shotpoints in integer or floating point format
- Algerian - allows translation of fractional shotpoints where the shotpoint intervals are subdivided into 12 using suffixes from the first 12 letters of the alphabet. For example, a sequence of shotpoints might be 1A, 1B, 1C ..........1L, 2A, 2B etc. The fractional shotpoints are translated into numeric twelths as floating point numbers. In this example above, the output LOC file will contain shotpoints 1.0, 1.08333, 1.16667, 1.25.........1.91667, 2.0, 2.018333 etc.
- DDMMSS - degrees minutes seconds in standard UKOOA format
- DECSECS - decimal seconds
- DECDEGS - decimal degrees
- CUSTOM - custom format - see masks below.
Custom Lat Mask
Custom Lon Mask - enabled for
Custom Lat/Lon type.
A lat/lon mask consists of the characters 'D' 'M' 'S' 'X' and 'H'. Other characters in the mask are ignored.
D specifies degrees, M specifies minutes, S specifies seconds, X specifies decimals and H specifies the hemisphere character.
For example the mask for an input latitude specified as:
32 12 45.246N
would be
DD MM SS.XXXH (note the spaces within the mask)
which would be transformed into the standard UKOOA string
321245.24N
Decimal Latitude Hemisphere - North/South
Decimal Longitude Hemisphere - East/West - these fields are enabled if the Lat/Lon
type is decimal seconds or decimal degrees. When using
decimal degrees or seconds, the sign of the input angles should change as the
Greenwich meridian or equator is crossed. Enter the direction corresponding to
positive angles in these two fields.
Output Record ID character -
specify the character to appear in column 1 of each data record in the output
LOC file. The default is Q.
Other values from the UKOOA specification which could be used are:
- A - antenna position
- G - receiver group
- Q - bin position
- S - centre of source