[Proj] CTable2 Format

Frank Warmerdam warmerdam at pobox.com
Tue Nov 22 19:14:48 EST 2011


Folks,

In PROJ.4 trunk I have modified pj_init.c and nad2bin.c to produce
and consume a new datum shift format - "ctable2" format.  This is
a variation of the existing ctable format with a magic string prefix
in the header, all fields are in little endian byte order, and with
predictable offsets to the header fields.  This is to avoid the platform
specficness of files produced by nad2bin.

Incidentally nad2bin can now also produce NTv2 format files.
I was going to just switch to them, but because NTv2 carries
along error values for every grid entry it is twice as large as the
corresponding ctable format grid shift files even though I just
had to use zero for the error estimates.  Given that these files
might be pushed around quite a bit I didn't feel right about the
extra size.

I'd do not have easy access to a big endian test system right
now, but I'd like to confirm the byte order handling.  If someone
wants to try things on a big endian system (like Solaris on Sparc)
do the following steps:

1) build PROJ.4 from SVN trunk.
2) download and unzip the grid shift files in proj/nad:
    http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
3) do "make check" and confirm things pass.
4) download http://home.gdal.org/tmp/conus into the
    proj/nad directory and run "make check" again.

Hopefully I'm on my way to a proj 4.8 release soon!

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the Proj mailing list