[gdal-dev] GeoTIFF: connection between CRS WKT and GeoKeys

Eric Robeck erobeck at gmail.com
Wed Oct 13 09:35:10 PDT 2021


I have a question about which GeoTIFF tags should be used for storing CRS
information. I have two GeoTIFFs: one original and the same file saved as a
COG. Then I created gdalinfo and listgeo reports for each and compared them
for changes.

*gdalinfo*: Aside from the difference in the PROJCRS citation ("WGS 84 /
UTM zone 6N" vs. "WGS_84_UTM_zone_6N"), the only change is the COG and LZW
predictor.

*listgeo*: a large number of GeoTags were never populated by the original
GeoTIFF creators. Other ASCII citation values were replaced by the Esri
conversion tool.

A number of the listgeo-reported GeoKeys in the COG (e.g.
GeogGeodeticDatumGeoKey, GeogAngularUnitSizeGeoKey, GeogEllipsoidGeoKey,
etc.) are missing from the custom-made original GeoTIFF. The extra CRS tags
were added upon conversion to COG. Those parameters are fundamental
components of the CRS and are reported in the gdalinfo WKT as
DATUM/ELLIPSOID, ANGLEUNIT, etc.

However, the WKT reported by gdalinfo is identical in both cases. So it had
access to the full WKT components even when the corresponding GeoKeys were
missing in the GeoTIFF.

My questions are:

   1. If the GeoKeys storing that information are missing from the GeoTIFF,
   where does GDAL retrieve them from? Does it refer to the PROJ library to
   retrieve the EPSG values for the EPSG codes in ProjectedCSTypeGeoKey,
   VerticalCSTypeGeoKey, etc.?
   2. Some software, following guidance in DGIWG-108 and DGIWG-250, did not
   assign a VerticalDatumGeoKey. Prior to release of GeoTIFF 1.1, the
   "unknown" value caused problems with vertical projection in some software,
   like QT Modeler. Does GDAL now fill in or assume the missing key based on
   the VerticalCSTypeGeoKey?

Thanks in advance!

Regards,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211013/2a2603a0/attachment.html>


More information about the gdal-dev mailing list