Prev Up Next Index
Go backward to 9.4.1 Simple ASCII to Binary Conversion
Go up to 9.4 Creating a Binary Archive
Go forward to 9.4.3 Reconverting to Native Format

9.4.2 Converting to Binary

To convert from an ASCII representation of the numbers in latlon.dat to a binary representation:

  1. Change to the directory that contains the FreeForm ND example files.
  2. Enter the following command:
    newform latlon.dat -o latlon.bin 
    

Because FreeForm ND filenaming conventions have been used, newform will locate and use latlon.fmt for the translation. The newform program creates a new data file (effectively a binary archive) called latlon.bin. The size of the archive file is 2/3 the size of latlon.dat. Additionally, the data do not have to be converted to machine-readable representation by applications.

There are two methods for checking the data in latlon.bin to make sure they converted correctly. You can reformat back to ASCII and view the resulting file, or use readfile to read latlon.bin.


Tom Sgouros and James Gallagher, 2006-02-12

Prev Up Next