I3 Import Template File

The .i3 template file is an ASCII file that describes the contents and format of the file to be imported into a Geosoft database and the database channels in which the data will be placed. The template file is useful to re-import data using the same settings, or to import new data with the same formatting.

The template file may contain any number of comment lines that proceed the start of the template parameter settings. The template parameter settings follow a single line "[IMPORT ARCHIVE]". Following are a data file example and a sample template to import the data from the data file.

Example of a data file:

Sample of a template (.i3) file:

Template File Format

A self-documented template file named "imparc.i3" , which can be used to create your own templates and as a reference for the contents and structure of a template, can be found in the Geosoft folder (C:\Program Files\Geosoft\Desktop Applications \etc). Following are descriptions of the template file parameters. The "LINENUMBER", "FLIGHT", and "DATE" parameters are used to create lines in the database. The "DATA" and "CHAN" parameters are used to identify the data and the channel in which data will be placed.

FILEHEADER - the number of lines to skip at the start of the file.

RECORDFORM - type, delimiter/soft,hard,esc,quote

Type may be one of:

FIXED

FIXED format files require data to be organized in constant fixed character locations on each data record. Delimiters are ignored

FREE

FREE format files require that data fields are delimited by one or more of the delimiter characters specified by the 'delimiter' string. If a delimiter string is not specified, space and tab delimiters are assumed.

COMMA

Comma delimited files (CSV files).

DELIM

Special delimited files that use a Soft/Hard/Esc/Quote delimiters strategy as follows:

  1. Any one character following an escape delimiter is treated as a normal character.
  2. Any characters inside a quote string are treated as normal characters.
  3. Any number of Soft delimiters in sequence without a hard delimiter are treated as one hard delimited.
  4. Any number of soft delimiters can precede or follow a hard delimiter and are ignored.

EXAMPLE:

Soft = [ ] Hard = [,] Escape = [\] Quote = ["] 

[this is a , , the "test," of , \,\" my file,]  

Results in:

[this] [is] [a] [] [the] ["test,"] [of] [\,\"] [my] [file] [] 

SKIPSTRING "string" - Skip lines starting with "string". Usually used to skip comment lines as in the following example:

SKIPSTRING "/"

Works only in FREE, COMMA or DELIM format files (see RECORDFORM).

LINENUMBER - start,length,read_format,scale,base

The location, size and format of the line number in a data record. See "Parameters" below. If a line already exists in the database, the version number will be incremented until a unique line is created.

If a line number column is not specified, all data is assumed to be on the same line, which can be specified as a parameter to the IMPARC GX.

FLIGHT - start,length,read_format,scale,base

For airborne data, this is the location, size and format of the flight number in a data record. See "Parameters" below. If a flight number column is not specified, flight 0 is assumed. A flight number can also be specified as a parameter of the IMPARC GX.

DATE - start,length,read_format,scale

The location, size and format of the survey date in a data record. See " Parameters" below. If a date is not specified, the current date is used unless a date has been specified as a parameter of the IMPARC GX.

If a date is not specified, the current date is used unless a date has been specified as a parameter of the IMPARC GX.

DATA - start,length,read_format,scale,base,dummy

(optional) location, size and format of a data channel to be imported. See "Parameters" below. The DATA and CHAN parameter lines must always appear as a pair and must be specified for each data column to be imported into an Oasis montaj™ database channel.

CHAN - name,type,channel_format,width,decimals,registry

(required immediately after each DATA line) the channel name and channel characteristics for the preceding DATA. If the channel already exists in the database, the channel characteristics are ignored. See "Channel Parameters" below.

Parameters Required by Each "LINENUMBER", "FLIGHT", "DATE" or "DATA" Line:

Start

For FIXED format files (see RECORDFORMAT), this is the byte offset of the data item relative to the start of each line. The first byte is at offset 0.

For FREE format files, this is the column offset from the start of the line. The first column is at offset 0.

For array data to be placed in an Array Channel (see "name" in the "channel" definition line), data is assumed to begin at "start" and occupy consecutive values in the data line. For fixed format data, all array items must have the same "length".

Length

the size of the item in bytes.

Read_format

NORMAL
normally formatted number ("213", "-1.62") or a literal ASCII string.

EXP
Exponentially formatted number (-1.62e+00)

TIME
time "HH:MM:SS.ss"

TIME_1
time "HH.MMSSss"

TIME_2
time "HHMMSS"

DATE
"YYYY/MM/DD"
"YYYY MM DD"
"YYYYMMDD"
"YY/MM/DD"
"YY MM DD"
"YYMMDD"

DATE_1
"DD/MM/YYYY"
"DD MM YYYY"
"DDMMYYYY"
"DD/MM/YY"
"DD MM YY"
"DDMMYY"

DATE_2
"MM/DD/YYYY"
"MM DD YYYY"
"MMDDYYYY"
"MM/DD/YY"
"MM DD YY"
"MMDDYY"

DATE_3
"YYMM DD"

Y2K note: Dates that use a 2-digit year are assumed to be 19xx if xx is >= 50, 20xx if xx < 50. This conforms to: "DISC PD2000 1:1998 Year 2000 Conformity Requirements" (www.bsi.org.uk/disc/year2000/2000.html).

GEO
geographic "DEG.MM.SS.ss"

HEX
hex integer

scale

a multiplying factor that is applied to the in-coming numeric data before it is placed in a database channel. The default is 1.

base

a base value that is added to the data after applying the scale. The default is 0.

dummy

the value in the data that is used to indicate missing or dummy values.

 

Channel Parameters Required by Each "CHAN" Line:

name

The name of a database channel in which to place the data. If the channel does not already exist, it will be created using the parameters that follow. Names may not begin with any of the "0123456789+-*/%|" characters.

type

the channel data type:

BYTE
signed one-byte data.

SHORT
signed 16-bit integer.

USHORT
unsigned 16-bit integer.

LONG
signed 32-bit integer.

FLOAT
32-bit floating point number.

DOUBLE
64-bit floating point number.

ASCII
text of size "width".

chan_format

format used to display channel elements:

NORMAL
normally formatted number ("213", "-1.62").

EXP
exponentially formatted number (-1.62e+00)

TIME
time "HH:MM:SS.ss"

DATE
date "YYYY/MM/DD"

GEO
geographic "DEG.MM.SS.ssss"

Width

Width of the channel display field.

Decimals

Number of decimals to display.

Registry

Semi-colon delimited list of channel registry entries, (i.e. label="As ha";units=ppm;class=assay;). If only one token is present, it is assumed to be UNITS=token for compatibility with older i3 files.