[Proj] The trouble with grid datum correction files

Gerald I. Evenden geraldi.evenden at gmail.com
Sat Jul 4 08:24:49 PDT 2009


In lazily working my way through the various forms forms of the correction 
grids (NADCON, HPGN, NTv1 and NTv2) a problem much more serious than the sign 
of longitude has appeared: endian of the binary integer and floating point 
data.

At first I thought the problem was solved with big endian data files and, for 
Intel (and clone) users, little endian cpu's.  BUT when I got to NTv1 the 
file data appears to be little endian for the source file that I was referred 
to by Warmerdam.  I bring Frank's name into it because I am not sure the data 
was not regurgitated after it left the Canadian government.

This brings up a *very* serious issue with distributing data in a binary form 
such as in these datum correction files.

In the case of the Canadian documentation, ("NTv2 National Transformation, 
version 2: Developer's Guide" by Junkins and Farley)  a search of the 
document made no mention of file endian status nor, for that matter, the 
characteristics of the floating point values (IEEE?).  I believe the US NGS 
similarly ignores the problem.

I suggest two possible solutions to this problem:

1) revise all documentation for active binary formats in use to clearly 
specify the endian and technical nature of binary number system recorded  and 
ensure that *all* data issues follow these specifications

-- or --

2) issue the data in ASCII form.

I consider the second form the preferable mode; something that can be 
immediately viewed with the simplest software and most easily understood by 
personnel with all levels of computer skills.  Certainly, the size of the 
data files will increase but this can considerably be reduced with any of the 
freely available compression procedures.

If, in the interests of usage efficiency, the data is to be reference as a 
local binary file, this is an issue of the using site and a factor that could 
be facilitated with a suitable to-binary converter procedure supplied by the 
distributor of the data---as a supplement to current user programs supplied.

-- 
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist



More information about the Proj mailing list