Text File Schemes
Text File Schemes allow you to load data from ASCII files into the Geographic Calculator. There are several types of common text file schemes included with the Calculator: CSV, TSV, SEG, UKO, and SPS. These schemes can be used as they are, or modified to meet the needs of a particular file. The Text File Schemes dialog box allows you to add, edit, and delete custom text file schemes.
More:
How to change an existing text file scheme
How to delete an existing text file scheme
How to import text file schemes
How to export text file schemes
Create a New Text File Scheme
-
In the drop down menu at the top, enter the three letter extension of the file type you are creating a scheme for, click the Add button.
-
Enter a description for the text file scheme (optional). This description will be displayed in the file open and save dialog filters (drop down box).
-
Select the text file type, either Delimited Text or Fixed- Length Fields from the File Type group box. When you make a selection, the appropriate dialog box (described below) will display:
-
For Delimited Text files, select the delimiter and specify the text qualifier from the Field Delimiters group box. The delimiter is the character that separates fields. The text qualifier encloses text strings.
-
For Fixed Length Fields files, enter the number of fields (columns), the width of each field, and the output field alignment (justification).
-
-
Specify header record information from the Header Records group box.
Note: The Geographic Calculator assumes that headers come BEFORE all data.
There are three options:
-
Total Number of Header Records
Use this option to specify the number of header records that appear before the data.
-
Header Records Begin With...
Header records may have a code or tag at the beginning of each line. Use this option to indicate those tags.
Example
Your point file has header records and each line has some tag at the beginning of each line:
<TAG> This is the first header line
<TAG> This is the second header line
<TAG2> This is the third header line
Data
To set up header tags that should be ignored:
Note: Only the first character of the header tag (e.g. < ) needs to be entered. It is good practice to indicate the whole tag to avoid any ambiguities.
-
-
Specify a setting in the Field Names area. The settings determine how the grid columns are named. There are three options:
-
Last Header Records Contain Field Names
The last line of the header may be used to name the grid fields (columns).
Example
<HeaderTag Header Info
<HeaderTag Name, Lat, Long, Ht
Data
Column C1 will be named Name
Column C2 will be named Lat
Column C3 will be named Long
Column C4 will be named Ht
Note: The Calculator will recognize Name as being a header record only if it meets the criteria specified in the Header Records area.
-
First Non-Header Record Contains Field Name
The Calculator will search the point file for header records using all the criteria specified in the settings. At the first occurrence of data that is not considered header information (based on the users criteria), the Calculator will use that data for naming the fields (columns).
Example
The user has specified that all header records begin with <HEADER> and has chosen First Non-Header... to assign the field names.
<HEADER> Header info
<HEADER> Header info
<HEADER> Header info
100, 3000, 3000, 5
101, 3010, 3005, 2.4
102, 2929, 3001, 4.5
etc.
The grid column names will be assigned as follows:
Column 1 = PT#
Column 2 = NORTHING
Column 3 = EASTING
Column 4 = ELEV
-
Specify a setting for the Data Records. This setting specifies when the Calculator should start reading data. There are two options:
-
Data Records Begin With ...
The Calculator searches for Header Records based on the criteria selected in previous dialogs.
The user may explicitly assign a tag or character to indicate data (similar to the way Header Records may be assigned).
Based on the user-specified criteria, anything in the point file other than the following will be ignored:
-
Header records
-
Field names
-
Data
Click Add to add a search string.
Example
The user has specified that there will be 10 lines of header records. He has also specified that Data Records Begin With: <DATA>
The point file has the following contents:
>>>Header Line 8
>>>Header Line 9
>>>Header Line 10
>>>This line of text will be ignored.
>>>So will this.
>>>This too.
3167hheljdf <THIS WILL BE IGNORED> &%#@LKHEU3434
<DATA> First data record. The Calculator will begin reading data on this line.
...
-
-
Data Records Start After the Header
This is the default setting.
The Calculator searches for Header Records based on the criteria selected in previous dialogs. The first instance where the Calculator does not find a Header record or Field name data, it considers the next entry as a data record ( i.e. What is not a Header Record or Field Name is a Data record) .
Example
<HEADER>
<HEADER>
<HEADER>
>>This line will be data
-
How to change an existing text file scheme
-
Select Text File Schemes within the Options Menu.
-
Change any required parameter.
How to delete an existing text file scheme
-
Select Text File Schemes within the Options Menu.
-
Select the scheme from the Unique File Extension list.
-
Press the Delete button.
How to import text file schemes
-
Browse to the xml file containing the Text Schemes you want to import and select Open.
-
If the file contains Text Schemes that already exist, you will be asked whether or not to overwrite your current scheme with the imported version.
-
If a Text Scheme does not already exist, it will simply be imported.
How to export text file schemes
-
Select Options>Export Text Schemes/Seismic Survey Formats.
-
Select the scheme or schemes that you want to export.
-
Browse to the desired location in which to create the file containing the exported text schemes, and enter the desired name.
-
Click Save. This will generate an output xml file containing the selected text schemes.