I'm writing a GeoTiff reader for GeoTrellis for Google Summer of Code. I have read in all tags and geokeys and now I'm working with the decoding process.

Currently the Tiff 6.0 spec recommends that baseline readers support the following decompressions:

  • Uncompressed (duh)
  • PackBits
  • Huffman

And the extension recommends the support of:

  • LZW
  • Jpeg (Old spec)

I have implemented all the baseline compression types and LZW but as I understand it the compression type 6 (Jpeg old spec) is deprecated and replaced by compression type 7 (new Jpeg). Except these compression types mentioned Deflate compression (compression type 8) is mentioned in an extension document by Adobe.

As I understand it nobody uses the old Jpeg compression, is there any common other compressions I should support? That isn't bound for a single reader/writer software brand? And I should implement the compression type 7 and 8?

The goal with the reader is to support as many GeoTiffs as possible.

For the interested the reader is written in the Scala programming language.


From the GDAL formats:


You've done JPEG, LZW, PackBits and Deflate for the byte and multi-byte data types. Fax G4 is still a valid monochrome (1-bit) compression that I encounter from time to time.. mostly though space is not a concern so images are 8bit or more; I don't think I've ever seen a G3 TIFF.

Esri has a adopted a more GDAL approach to its images so I think if you accommodate GDAL format it would suit a big chunk of the GIS users. Packages like ENVI, ERDAS and MapInfo which also represent a large portion of GIS users may have their own individual traits but I am not able to comment on them; I hope a user of these packages can give you some information on these.

TIFF is such an enduring spec and many different software packages have their own spin or flavor. If you are truly trying to open any different TIFF don't forget BigTiff and world tiff (.tif & .tfw) as they would have to be handled differently.

Good luck with your project, it sounds awesome!

  • Thank you for your answer! The GDAL JPEG format is compression type 7 right? – Johan S Jun 29 '14 at 11:24
  • I don't know. I've not gone that far into the spec. The best way I'd say is to call GDAL_Translate -of GTIFF -co compress=jpeg and then open it the TIFF file. Source code for GDAL is available from GDAL.org if you want to look into it that way. – Michael Stimson Jun 29 '14 at 21:38
  • Thanks, I'll do that and see exactly what it is. The tiffdump *nix command is very nice for simply looking at the flags. – Johan S Jun 30 '14 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.