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.

1
  • 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
    Commented May 16, 2017 at 7:50

1 Answer 1

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 and acknowledge you have read our privacy policy.

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