Support GeoTIFF with only ProjectedCSTypeGeoKey defined
|Reported by:||Even Rouault||Owned by:||Even Rouault|
In a (not publically available) GeoTIFF conformance test, you can find images with only ProjectedCSTypeGeoKey defined, and GTModelTypeGeoKey missing. According to the cookbook of the GeoTIFF Specification, the natural processing order should be : 1) check that GTModelTypeGeoKey=ModelTypeProjected 2) look at the value of ProjectedCSTypeGeoKey But this does not really seem to be enforced as a hard requirement.
Currently GDAL implements that and in the case of the offending test data, it returns LOCAL_CS["unnamed",UNIT["metre",1,AUTHORITY["EPSG","9001"]]].
FrankW has agreed that before returning LOCAL_CS, checking if ProjectedCSTypeGeoKey is defined and then assuming GTModelTypeGeoKey=ModelTypeProjected would make sense. This shouldn't cause regressions for other cases. Note that this could similarly be extended for the GCS case, but I won't go onto that slippery way until they invent the corresponding offending data ;-)