Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to install GDAL on a linux machine and tested some sample commands like gdalinfo --version This worked fine, but when I started working with images like .tif I got the following error .

Warning 1: TIFFReadDirectoryCheckOrder:Invalid TIFF directory; tags are not sorted in ascending order
ERROR 1: MissingRequired:TIFF directory is missing required "ImageLength" field
gdalinfo failed - unable to open '1.tif'.

I reinstalled libtiff but I am still getting the same error.

Iam working on CentOS release 5.7 (Final) .Is there any one who worked on this. Any help is appreciated.

share|improve this question
    
What version of GDAL are you using and what exact command and file gave you that error? –  R.K. Feb 15 '12 at 1:37
add comment

2 Answers

Are you installing from source? You might try --with-libtiff=internal and --with-geotiff=internal to have GDAL use its own sources for these libraries rather than depend on system libraries which are likely to be old.

share|improve this answer
    
I tried the one you have suggested wget download.osgeo.org/gdal/gdal-1.9.0.tar.gz tar -zxvf gdal-1.9.0.tar.gz –  user5945 Feb 15 '12 at 16:40
add comment

Just for diagnosis, on my ubuntu linux box I'd do this:

Run

ldd `which gdalinfo`

you'll see that the gdalinfo itself does not dynamically load libtiff4:

ldd `which gdalinfo` | grep -i tif  #shows nothing

What happens if you ran this:

gdalinfo --debug on 1.tif

My output

GDAL: GDALOpen(1.tif, this=0x8d6c70) succeeds as GTiff.
Driver: GTiff/GeoTIFF
...

Often it helps to install libtiff4-dev package as well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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