92
Appendix 2: Displaying Data Formats
Geosoft GBN (Binary Data File) Format
The following is an example of a Geosoft GBN file format:
A Geosoft Binary Data file (.GBN) contains survey data in a binary
format that can be imported directly into an Oasis montaj™
database.
The format is intended for programmers who wish to design output
data files that can be easily imported into an Oasis montaj
database.
//---------------------------------------------------------------
//
// gbn.fh Geosoft Oasis montaj binary file structure.
//
//---------------------------------------------------------------
//
// An Oasis montaj database is an object oriented data structure
that is too
// complex to create without the use of the Geosoft object
libraries.
// If you would like to access the database directly, this can be
done
// from a GX using GX Developer, which also provides a mechanism
for
// calling Geosoft libraries from your own DLLs.
//
// The Oasis montaj binary file is a simple file structure that is
intended
// to be used by programmers as a convenient way to import data
into
// an Oasis montaj database. The Oasis montaj GBN GX will import
Oasis montaj binary files
// into an Oasis montaj database.
//
// A Oasis montaj binary data file consists of an ASCII comment
header
// followed by an ASCII 26 (hex <1A>), followed by binary data.
//
// Binary data consists of a series of variable length binary
records.
// Each record begins with a single byte value that identifies the
// record type, followed by the record data and data in the case
of
// data records.
//
// Record type are:
//
// <01> simple channel record (GBN_ChanRec)
// <02> line record (GBN_ChanRec)
// <03> data record (GBN_Data)
//
// Version 2 GBN record types (Oasis montaj v4.2 and later):
//
// <04> array channel record (GBN_ArrayChanRec)
// <05> parameter (GBN_Parameter)
//
// The length of each record depends on the record type.
// The length of a data record will be the length of the data
record
// structure plus the length of the data.
//
// IEEE numbers and Intel byte order is required.
//