[Image-SIG] PIL and GeoTiffs (QuickBird)

Joel Lawhead jlawhead@nvisionsolutions.com
Tue, 19 Nov 2002 13:08:01 -0600


Hi,
I use PIL to work with satellite images often. But I recently tried to
open a DigitalGlobe Quickbird image (www.digitalglobe.com) and got the
following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\Python22\PIL\Image.py", line 1504, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file

Supposedly Digital Globe distributes their images as GeoTiffs and ERDAS
Imagine confirms this when I open the image I'm trying to open with
Python. So the file isn't corrupt. I've also had the same result with
other quickbird images I've tried since.

I also tried forcing Python to use TiffImagePlugin with the following:

>>> import Image
>>> import TiffImagePlugin
>>> Image._initialized = 1

I still get the same error.

I've started looking through TiffImagePlugin.py to see if I can
troubleshoot but before I get to deep into this I wanted to see if
anybody knows if this is a simple issue of the tags being different
between standard and Geo tiff format or if there's a bigger problem.

If I or someone who is deeper into this package than I can hack a simple
filter to get at the geotiff image data through PIL that would be great.
I don't care about the tags in the geotiff. All I want is the capability
to resample the image to a small jpeg thumbnail.

Of course there are workarounds to get the job done. I have ERDAS, ENVI,
and ArcGIS or I could use another library capable of dealing with this
image but I'd really like to be able to do this in Python and PIL for
many different reasons.

Any input?

Thanks,
Joel



Joel Lawhead, Web Application Developer
NVision Solutions Inc, www.nvisionsolutions.com
Phone: 228-688-2212, Fax: 228-688-3843
E-mail: jlawhead@nvisionsolutions.com