Grid Exchange .GXF File Description

Surfer imports and exports elevation data in Grid Exchange .GXF file format.

The Grid eXchange File .GXF is an open standard ASCII file format for exchanging gridded data among different software systems. Software that supports the .GXF standard will be able to import properly formatted .GXF files and export grids in .GXF format.

File Format

A GXF file is an ASCII file made up of a number of labeled data objects and comments. Each labeled data object has a label line followed by one or more data lines. A label line is identified by a '#' character in the first column followed immediately by an upper-case label. The data associated with that label are found on one or more lines that follow that label.

Any lines that are not part of a labeled data object are ignored and can be used to place comments with a .GXF file. Programs that read .GXF files ignore such comment lines while searching for the next GXF data object.

All lines in a .GXF file must be less than or equal to 80 characters in length. If the last non-white space character on a line is a '\', the next line is assumed to be a continuation of the current line (except for #GRID data lines). Spaces and tab characters are white space characters. Note that continuation lines are a feature of GXF revision 3, and they should only be required for defining projection parameters that require more than 80 characters. They are not required and cannot be used for writing grid data to the GXF (in the #GRID object). This allows GSF readers written for GXF revision 2 and earlier to read GXF revision 3 files.

Any name or string parameters that are part of a data object and which themselves contain spaces, must be enclosed in double quotes. Parameters on data lines may be separated by a space or comma.

For example, the following file satisfies this format:

This is a very small 4 x 5 point grid.

#POINTS

5

#ROWS

4

These lines are skipped because they are not part of a data object.

#GRID

135.28 122.21 119.64 163.25 199.15

145.38 132.45 120.32 121.42 205.18

140.13 151.48 132.91 119.12 219.67

132.67 150.56 140.45 102.89 218.41

This file contains two comment lines at the beginning, followed by two labeled data objects, another comment, and finally a #GRID data object. The #GRID object is always the last object and indicates the beginning of the gridded data. This example contains the minimum information required to define a grid, and other grid information, such as location, storage, sense, sampling separations, etc, assume default values. The next section documents all data objects defined in this revision. The only required data objects are #POINTS, #ROWS, and #GRID. All other GXF objects will assume default value. However, a recommended minimum set of defined data objects would also include #PTSEPARATION, #RWSEPARATION, #XORIGIN, and #YORIGIN, since these objects serve to define the minimum amount of information needed to locate the grid in an assumed coordinate system.

Loading .GXF Files

Grid Exchange .GXF files can be loaded to create a grid based map (i.e. Home | New Map | Contour) with the Open Grid dialog, or when using the functions in the Grid menu.

Import Options Dialog

No import options dialog is displayed.

Import Automation Options

No import options are available.

References

SEG Gravity and Magnetic Committee, GXF Grid eXchange File, May 2, 2001. http://www.geosoft.com/resources/technotes/pdfs/gxfr3d9_1.pdf

See Also

File Format Chart

Grid Exchange .GXF Export Automation Options

Grid Exchange .GXF Export Options Dialog