0

When I use gdalinfo to list information about a geotiff image and the current path is a USB flash drive, It is ok and correctly shows information. But when I copy data from flash memory to HDD and use gdalinfo at new path, it shows this error:

ERROR 4: 'dataxxxxx.tif' not recognised as a supported file format.

What could be causing this problem? OS is CentOS 7.

  • Quite impossible to say. Error means that file exists (otherwise you would see ERROR 4: foo.tif: No such file or directory) but somehow it is no more a valid image file. I bet that you can't open the copied image with image viewers either. – user30184 May 16 '17 at 7:50
1

Check your file with file and identify.

Sample outputs:

# file image.tif 
image.tif: TIFF image data, little-endian, direntries=17, height=712, bps=218, compression=none, PhotometricIntepretation=RGB, width=758

and :

# identify image.tif 
image.tif TIFF 758x712 758x712+0+0 8-bit sRGB 1.621MB 0.010u 0:00.009

If both failed to identify your tif, then your file should be corrupted. You can then open it with an hexadecimal editor to check.

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.