Opened 15 years ago
Closed 15 years ago
#3019 closed enhancement (fixed)
Support GeoTIFF with only ProjectedCSTypeGeoKey defined
Reported by: | Even Rouault | Owned by: | Even Rouault |
---|---|---|---|
Priority: | normal | Milestone: | 1.7.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
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 ;-)
Commited in trunk (r17182) and test added (r17183). The test image was produced by hacking gt_wkt_srs.cpp especially for that purpose, but the end result is representative of the original image from the conformance test that triggered that ticket.
listgeo extract :
gdalinfo extract after patch: Coordinate System is: