Uncompressing LZW geotiffs

Frank Warmerdam warmerdam at pobox.com
Tue Apr 17 06:12:22 PDT 2001


Marcelle Caturia wrote:
> 
> Hi All,
> 
> What is an effective method to uncompress LZW-compressed geotiffs without
> stripping the geo-related header info?  Unfortunately, right now the only
> software in my lab which supports LZW-compressed files is Adobe Photoshop.
> When I use Photoshop to open the geotiff and then save it in uncompressed
> format, the geotiff header file seems to get tossed.  I'd like to work with
> the tiff in ERDAS Imagine, but need the projection info.  Is my only
> alternative to create a world file after uncompressing the geotiff?

Marcelle, 

You have a few options. 

 o You could use the listgeo utility to write the full "geo" definition from
   the GeoTIFF file to a text file.  Then use Photoshop to translate the file
   into uncompressed form, and then use the geotifcp utility to turn this
   back into a geotiff file using the geo definition produced by listgeo.  
   The listgeo and geotifcp utilities are part of the libgeotiff toolkit 
   accessable from http://www.remotesensing.org/geotiff/geotiff.html

 o You could build your own libtiff, libgeotiff and geotiffcp executable with
   LZW supported enabled (LZW patches are available from the www.libtiff.org
   web site) if you are a licensed LZW users, or are unconcerned about possible
   prosecution by the patent holder.  For that matter, with an LZW enabled 
   libtiff, you could LZW enable MapServer, though that won't help with 
   Imagine.

Finally, note that the "deflate" (same compression as zip) compression now
supported by libtiff depending on build options is roughly equivelent to 
LZW compression if you are looking for a decent compressor of that sort.  

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 Programmer for Rent



More information about the MapServer-users mailing list