Lynx Exploration Archivist Online Help

UKO2SHP

UKOOA to Feature Class Converter

Version: 1.4

Back to:



1. Introduction

UKO2SHP will import seismic location data from a text file, and create a polyline-M ESRI File Geodatabase feature class or shape file.
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.

UKO2SHP can also read 'standard' UKOOA and SEG-P1 location files in EBCDIC format.



2. Running UKO2SHP

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). On the next page, specify the columns which define each of the fields in the file: Line Name, Shotpoint, X and Y, and select the conversions to apply (if any) on the coordinate fields, and click Preview to highlight your defined columns in the preview window. On the next page select an output type and feature class name then click the Output button to create the feature class.


2.1 Command-line options

UKO2SHP can be started with a command-line similar to the following:

UKO2SHP [-pCONFIGFILE]

where:

CONFIGFILE is the full path of a configuration file with an u2s extension. This file can be created using the Save Configurationmenu. If no parameter file is specified, then UKO2SHP will look for the file default.u2s in your current 'favourite' folder (the first existing folder in your LAUNCHER-maintained list).



3. Menus and Controls

3.1 Main Menu

The main menu allows you to load and save configuration files.

Preview button   - this will display the import file in UKO2SHP'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 feature class. If it already exists, it will be overwritten



3.2 Converting UKOOA and text files to feature classes

3.2.1. Set Input Text File

UKO2SHP presents a number of pages of parameters which determine how the import file is customised for conversion into LOC format.

The first page defines the type of the input file.

Input 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 UKO2SHP and count the number of bytes between consecutive line name fields.

Convert EBCDIC to ASCII YES/NO - 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. Default value is 100000 bytes.

Number of Records to Output - set this to a very large number to output all records from a file.

Click Next to move to the following parameter page.


3.2.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 input file. UKO2SHP will skip these records, since feature classes contain no headers.
If you click the Preview button after setting this value, the header records will be highlighted in grey, and the preview window will scroll to the first record to output.

Fields delimited by - select from:

Input Records have ID - YES/NO - select YES if the first byte of each record in the input file has a UKOOA identifier character, 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.

Decimal separator - enter the character used as a decimal separator for shotpoints and coordinates. This is usually a period ('.') or a comma (','). Note that for CSV files, the field delimiter and decimal separator must not be the same character.
For standard UKOOA files, the decimal separator will be a period.
For CSV files, the delimiter and decimal separator may depend on the regional settings (locale) of the workstation on which the file was created: for British or North American locales, the field delimiter will usually be a comma and the decimal separator a period; for European locales the field delimiter will usually be a semi-colon and the decimal separator a comma.

Click Next to move to the following parameter page.


3.2.3. Set Column Positions

This page defines the actual columns occupied by the data. A different set of parameters are displayed depending on whether the columns are delimited by position or character:

Set Column Positions for Positional Input

For input files with fields delimited by position, enter the start and end columns of each field as it appears in the input file. You can use the preview window to determine the start and end columns for each field. The current line and column of the cursor in the preview window is displayed in the status bar.

   

Set Column Positions for CSV Input

For fields delimited by character (CSV files), the preview window will display the fields in columns. Enter the column number for each field as it appears in the input file.

The conversion to a feature class requires that each line in the input file contains the following fields:

UKOOA files may contain both latitude/longitude and projected XY (UTM) coordinates; in these cases you will need to decide which of these to output, as feature classes can only contain one set of coordinates. When UKO2SHP is being run from Lynx Seismap you will be prompted to set the spatial reference info for feature class after it has been created.

This page also allows you to specify how to read the X and Y coordinates:

X Coordinate Type
Y Coordinate Type

Select from:

X Coordinate Mask
Y Coordinate Mask

This option is enabled when the Coordinate Type (above) is set to Custom Mask.
A latitude/longitude mask consists of the characters 'D' 'M' 'S' 'X' 'H' and '-'. All other characters in the mask are ignored.
D specifies degrees
M specifies minutes
S specifies seconds
X specifies decimals
H specifies the hemisphere character
- is a West/South indicator if no hemisphere character is present and the coordinate values are not signed. This mask character need not correspond directly to a character in the input string. Add it to the end of your mask to specify that all latitudes are south, and all longitudes are west.

The following examples demonstrate a number of input formats, and the masks which would be required to convert them into decimal degrees

Input coordinate Mask (note the embedded spaces) UKOOA standard equivalent Decimal equivalent
32 12 45.246N DD MM SS.XXXH 321245.24N 32.21257
115 22 13.45W DDD MM SS.XXH 1152213.45W -115.37040
54 22.50 N
(This coordinate value contains no seconds, it is stored as degrees and decimal minutes)
DD MM.XX H 542230.00N 54.37500
 3 514.56
(This coordinate value is missing a hemisphere indicator, but is known to be a latitude in the southern hemisphere)
DDMMSS.XX- 030514.56S -3.08738

Click Next to move to the final parameter page.


3.2.4. Output to Feature Class

The final parameter page allows you to select the output format and destination. You can output to a shape file, or save as a feature class in an ESRI File Geodatabase.

Use the Preview button to display the coordinate records for output after applying the custom mask or latitude/longitude conversion. You can use this to check whether you have set the correct coordinate type for the X and Y coordinates.

For shape file output, select a directory and enter a file name for the output shape file. If you select a file which already exists, then this file will be overwritten.

For file geodatabase output, select a file geodatabase using the folder tree dialog. You can create a new file geodatabase if you wish - ensure that the file geodatabase folder has extension .gdb, otherwise the browser dialog will not allow you to select it. Then select a feature class name. If you select a feature class which already exists, it will be overwritten. Feature class names must conform to ESRI File Geodatabase naming restrictions - no spaces in names and must start with a letter (not a number). Please note that file geodatabase output is disabled when UKO2SHP is run from an ArcGIS 9 installation of Lynx Seismap, as the File Geodatase API specification is available only for version 10 file geodatabases.

Click the Output button to create your feature class.


See also:


Copyright © Lynx Information Systems Ltd 2013