The BT (Binary Terrain) File Format

The BT format was created as part of the Virtual Terrain Project ( ) which includes an open-source library and software tools for reading and write BT as well as most other known elevation formats (DEM, DTED, etc.)


BT files are expected to have a file extension of .bt

There is a file header of 256 bytes, followed by the elevation grid data.  Header contents:

Byte Offset Length Contents Description
0 10 "binterr1.0" A marker which indicates that this is a BT file
10 4 (int) Columns Width (east-west) dimension of the height grid.
14 4 (int) Rows Height (north-south) dimension of the height grid.
18 4 (int) Data size Bytes per elevation grid point, either 2 or 4.
22 2 (short) UTM flag 1 if the data uses UTM coordinates, otherwise 0.
24 2 (short) UTM zone Indicates the UTM zone (1-30) if the file is in UTM.
26 4 (float) Left extent The extents are specified in the coordinate space specified by the UTM flag/zone fields.  If UTM is false, they are ordinary geographic (latitude-longitude) values.
30 4 (float) Right extent  
34 4 (float) Bottom extent  
38 4 (float) Top extent  
42 2 (short) Floating-point flag If 1, the data consists of floating point values (float), otherwise they are integers.
44-255 212 reserved Bytes of value 0 are used to pad the rest of the header.

The header is following by an array of values, in row-first order, containing the elevation values themselves.  For example, for a floating-point grid of dimensions 20x10, there will a series of 10 floats representing the left-most column, followed by the next column, and so on up to 20.

Elevation values are specified in meters above sea level.  Negative values for undersea elevation are allowed.

Longitude follows the standard convention of positive values east of Greenwich, negative to the west.

All values (header and data) use standard little-endian encoding.

A personal communication with Ben Discoe (Aug 2000) indicated that version 1.1 would be out soon and would include information on the datum.  Version 1.1 completely broke the existing importer.  Rather than use the reserved bytes and allow old readers to try to do something with the new files, the format was redone.  We will not re-implement the new BT format until we find a compelling reason to do so

Version 1.3 of the format

Last revision 8/26/2006