[FWTools] Compressing geoid model?

Mikael Rittri Mikael.Rittri at carmenta.com
Tue Jun 7 08:36:51 EST 2011


Hello,

I have been trying to compress the geoid heights of EGM 2008,
starting from the 5 arc minute resolution that is available 
via GeographicLib, http://geographiclib.sourceforge.net/html/geoid.html

I thought tif would be a nicer format than the pgm format provided by
GeographicLib, and I hoped that tif compression would help. 

However, I have tried these commands:

   gdal_translate -ot UInt16 -co "COMPRESS=NONE" egm2008-5.pgm egm2008-5-uint16-nocompression.tif

   gdal_translate -ot UInt16 -co "COMPRESS=LZW" egm2008-5.pgm egm2008-5-uint16-lzw.tif

   gdal_translate -ot UInt16 -co "COMPRESS=PACKBITS" egm2008-5.pgm egm2008-5-uint16-packbits.tif

and got the following sizes of the tif files:

   egm2008-5-uint16-nocompression.tif	18252 KB
   egm2008-5-uint16-packbits.tif		18377 KB
   egm2008-5-uint16-lzw.tif			23659 KB

where the original file was 

   egm2008-5.pgm					18235 KB

So, PACKBITS makes the result 0.7 percent larger than NONE, 
which is perhaps not a surprise, since run-length encoding
should not be suitable for this kind of data.  
However, LZW makes the result 29.6 percent larger than NONE,
which surprised me.  I would have thought the the geoid data
should be fairly easy to compress (although I know almost 
nothing about how LZW works).  

Am I missing something obvious? Is there some other 
(GDAL-readable) compressed format that would be better
for this kind of data?

Best regards,
Mikael Rittri
Carmenta 
Sweden
http://www.carmenta.com


More information about the FWTools mailing list