Program: LOCCONV

Title: Location File Importer

Version: 2.1

Back to:



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

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:

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:

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.

Shotpoint Type - select from:

Lat/Lon Type - select from:

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:



See also:


Copyright © Lynx Information Systems Ltd 2013