1

How to check if a file is a valid raster image? Valid in the sense of not being corrupt, the file record is complete. The GIS corollary to "zip --test somefile.zip" to test if an archive's integrity is intact.

An example of where this would be useful: have just batch processed 500 geotiff files, losslessly compressing and adding overviews, and would like to verify resultant files are not broken before removing originals.

I'm partial to gdal in this context, because it works better on the command line, but Arcgis solutions are welcome too.

  • Belatedly realised I picked a bad example. For comparing "does result have same data as input" the best solution is one which does test for content validity. It wouldn't be safe to delete the original file just because the compressed file can be read without error. Correct solution for the first example is gis.stackexchange.com/questions/111954/… – matt wilkie May 4 '15 at 16:00

Your Answer

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

Browse other questions tagged or ask your own question.