Have you ever wondered what is really the file format of an image? Or what are the 4 corners coordinates, or the projection? You can get the answer in a single command line. Say we want to know more about an image name africa.img. Actually the file extension,
.img can not be considered as a trustful indication of the real format inside the image, since you can change it as you like. Extensions are only a file naming convention and have nothing to do with the data really written in the file (and the format is much more HOW is written the data).
The command gdalinfo accepts several parameters, to know them simply type:
and you get a list of optional parameters (which can change in future versions), the only mandatory parameter being the filename (
Usage: gdalinfo [--help-general] [-mm] [-stats] [-nogcp] [-nomd]
[-mdd domain]* datasetname
To get accurate information on the command line, have a look on http://www.gdal.org/gdalinfo.html