[Geotiff] Re: DEM in a GeoTIFF

Frank Warmerdam warmerdam at pobox.com
Tue Nov 23 10:34:15 EST 2004


Mike says:
 > We're looking to optionally encode DEM data in a GeoTIFF but have not
 > found much in the way of information on this.  Encoding the data
 > itself isn't a problem but encoding the tags correctly is a concern.
 > We also have DEMs where the horizontal and vertical units are
 > different and want to preserve that data.
 >
 > Can anyone point us to example GeoTIFF DEMs or any "standards" for
 > encoding this type of data in a GeoTIFF?

Mike,

As previously discussed there is no particular problem with encoding DEMs
in GeoTIFF other than limited support for >8 bit data types in applications.
However, to carry along the vertical units of the data is not a well
standardized activity.

My suggestion would be to ensure the units of the data are converted to the
same linear units as the projected coordinate system in use to reduce
ambiguity.  However, assuming you don't want to do this I do read the following
in the spec:

   2.5.3.4 Vertical Coordinate Systems

   Many uses of Geotiff will be limited to a two-dimensional, horizontal,
   description of location for which geographic coordinate systems and
   projected coordinate systems are adequate. If a three-dimensional description
   of location is required Geotiff allows this either through the use of a
   geocentric coordinate system or by defining a vertical coordinate system and
   using this together with a geographic or projected coordinate system.

   In general usage, elevations and depths are referenced to a surface at or
   close to the geoid. Through increasing use of satellite positioning systems
   the ellipsoid is increasingly being used as a vertical reference surface.
   The relationship between the geoid and an ellipsoid is in general not well
   known, but is required when coordinate system transformations are to be executed.

The libgeotiff distribution includes a list of old vertical coordinate system
values (in epsg_vertcs.inc) which include stuff like:

  ValuePair(VertCS_Airy_1830_ellipsoid,	5001)

The keys related to the vertical coordinate system in geokeys.inc include:

/* 6.2.4 Vertical CS Keys */

ValuePair(  VerticalCSTypeGeoKey,	4096)  /* Section 6.3.4.1 codes   */
ValuePair(  VerticalCitationGeoKey,	4097)  /* documentation */
ValuePair(  VerticalDatumGeoKey,	4098)  /* Section 6.3.4.2 codes   */
ValuePair(  VerticalUnitsGeoKey,	4099)  /* Section 6.3.1 (.x) codes   */

To be honest, I have never tried to managed the 3rd dimension in any way
in GeoTIFF and even if you were to do it "properly" I suspect few applications
will respect what you have done.  However, looking at the above the easiest
step would seem to be to set VerticalUnitsGeoKey to reflect the units you
are using.  The more sophisticated step would be to also try and describe
what vertical datum you are using (relative to ellipsoid, mean sea level, etc).

If you do produce a file with different vertical units than horizontal units,
I would appreciate a sample I could put on the sample data site.  I am also
interested in adapting GDAL to correctly report the vertical units and to
preserve the vertical units when writing to GeoTIFF if known on the source
file.

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    | Geospatial Programmer for Rent




More information about the Geotiff mailing list