Binary File Type

Defenition of Type


A binary file is very similar to a list file, the only data in the file should be the variable data, no headers and no latitudes, longitudes, depths or times. A sequential list of data values, stored in binary format with no delimiters in between them.

All the dimensional data (latitude and longitude for instance) will have to be entered in another way. This program assumes that all dimensions (latitude, longitude, depth, time) are evenly spaced in the file (if there’s a 2 degree gap between the first two longitudes, there must always be a 2 degree gap between longitudes). So you are required to enter some information about the dimensions and then the program will automatically generate them for you. Entering in the information is explained below.

Entering in MetaData


Below is a picture of the panel for entering the required metadata on a list file:

The first two requirements are common to all file types, a file to be converted and a file to be created. Use the browse button next to these fields to select the desired files.

The next four fields ask for the number of longitudes, latitudes, depths and times. Longitude and latitude are both required dimensions, so you must enter non-zero values for these fields. A file can be successfully converted without depth and time, and if the file you wish to convert doesn’t have one or both of these, then simply enter in ‘0’ for the number of that dimensions. 0s will be automatically entered in by the program for each non-required variable, so you can simply leave those fields untouched.

The next 8 fields ask for a description of the dimensions so it can create them. If your data starts at 90N/0E/-460km depth, you’re start would be 90 for latitude, 0 for longitude, -460 for depth and 0 for time.

The “space” fields ask for the distance (in appropriate units) for each of the dimensions. If there’s always a 4 degree space between latitude (meaning the next latitude after 90 would be 86) then enter -4. Positive and negative are very important, the program adds the space number always. For depth, remember that it defaults to positive being up, so if you’re depth goes from -460 to -520, the space would be -60.

The next field is “Does the latitude changes faster than the longitude” field (with the option of either yes or no). All files are assumed that first the latitude and longitude cycle through, then the depth, then the time, but latitude and longitude can go in any order. If the dimensions go from 90N/0E/-460km to 86N/0E/-460km then the answer would be yes, since the latitude changes before the longitude. If it started at 90N/0E/-460km and went to 90N/2E/-460km then the answer would be no.

The next two fields ask how the binary data is formatted. The first field asks what type of data it is. Byte (for C and C++ users, this is equivalent to “char”), unsigned byte, short, integer, long (this is twice the size of the integer, 64 bits), float, and double. The bits of each type are listed in the drop-down menu, but watch out, except for the unsigned byte option, all of the data values must be signed, if they are unsigned, they will not be properly dealt with by the program. Also note that the float and double variables must be in IEEE 754 format, if you don’t know what that means you probably don’t have to worry about it, this is the standard floating point format.

The second field asks about the “endian-ness” of the data, what the endian byte format is. What this means is what order the bytes are in. Big endian (or as you may know it, MSB) has the “most significant” byte first, or the byte that has the largest impact on the magnitude of the value. Little endian has the bytes in the opposite order (you may know this format as LSB). Java will always create big endian files, C and C++ on the PC will create little endian files, you’ll have to determine which type your file is; if you don’t know the easiest way may be to try both and see which one works (looks right).

The final fields are common to all file types. The “Is positive depth above or below ground” question (with answer choices above and below) simply means that if the file starts 460km below the surface of the Earth, and you entered in “460” as you’re starting point, then positive would be below the surface. This option can also be changed (with extra work) through the attributes panel, but it is common enough to be a general option on the main panel. The attributes panel is explained fully in the user’s guide.

<< User's Guide << File Types