[Gdal-dev] Distinguish between georeferenced images and height fields

Frank Warmerdam warmerdam at pobox.com
Sat Jul 14 10:28:25 EDT 2007


Michael84 wrote:
> Hello,
> 
> is there any possibility to distinguish between georeferenced images and
> height fields (both geoTiffs) ?

Michael,

There is no reliable way to distinguish.

But there are a number of clues that a file isn't a height field:
  o more than one sample (band).
  o Data type is not float32 or int16.

But, for instance, gdal generates 16bit elevation geotiffs exactly the
same way it generates 16bit greyscale image geotiffs.  In fact, GDAL doesn't
for the most part know if an image is a height field.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list