[gdal-dev] full projection parameters in geotiff
Even Rouault
even.rouault at spatialys.com
Fri Dec 20 08:07:10 PST 2024
Kirk,
Yes if there's an EPSG code for the CRS, GDAL avoids going through
defining all the parameters. That limits the risk of self-contradicting
definitions, and readers being confused by what is authoritative.
The following (untested (TM)) patch should accomplish what you want:
diff --git a/frmts/gtiff/gt_wkt_srs.cpp b/frmts/gtiff/gt_wkt_srs.cpp
index 22eabfcd38..5a089142f8 100644
--- a/frmts/gtiff/gt_wkt_srs.cpp
+++ b/frmts/gtiff/gt_wkt_srs.cpp
@@ -2213,7 +2213,8 @@ int GTIFSetFromOGISDefnEx(GTIF *psGTIF,
OGRSpatialReferenceH hSRS,
GTIFKeySet(psGTIF, ProjectedCSTypeGeoKey, TYPE_SHORT, 1,
nPCS);
}
}
- else if (poSRSCompatibleOfWKT1->IsGeocentric())
+
+ if (poSRSCompatibleOfWKT1->IsGeocentric())
{
GTIFKeySet(psGTIF, GTModelTypeGeoKey, TYPE_SHORT, 1,
ModelTypeGeocentric);
Even
--
http://www.spatialys.com
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.
Mood of the day: "Bien entendu, on peut sauter sur sa chaise comme un cabri en disant : les standards ! les standards ! les standards ! Mais ça n’aboutit à rien et ça ne signifie rien." ~ dixit De Gaulle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241220/6e35c89c/attachment.htm>
More information about the gdal-dev
mailing list