<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I’m not sure whether this is a bug or some issue with how I’m doing things (like maybe my WKT is bogus), but when I try to define a compound projection for a GeoTIFF with a local projection, the vertical projection information does not get saved to the GeoTIFF and I get an error reported from PROJ. I am trying to upgrade the version of GDAL I’m using and I think this used to work in GDAL version 2.x but no longer works in GDAL 3.x/PROJ 7.x. What I’m trying to do is to update the projection of a GeoTIFF from a local projection with horizontal units only to a compound projection with both horizontal and vertical units. When I close the GDAL dataset, It seems like PROJ is trying to look for an ellipsoid node for the spatial reference object but I don’t have one since I’m using a local projection. Then when I reopen the dataset, nothing seems to have been saved. I’m running GDAL 3.4.2. Here’s an example of what I’m trying to do:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------begin-------------------<o:p></o:p></p><p class=MsoNormal>python<o:p></o:p></p><p class=MsoNormal>>>> from osgeo import gdal<o:p></o:p></p><p class=MsoNormal>>>> gd = gdal.Open("C:\\temp\\grid_meter_exported.tif", gdal.GA_Update)<o:p></o:p></p><p class=MsoNormal>>>> gd<o:p></o:p></p><p class=MsoNormal><osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000001B6BC578630> ><o:p></o:p></p><p class=MsoNormal>>>> gd.GetProjectionRef()<o:p></o:p></p><p class=MsoNormal>'LOCAL_CS["None",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]'<o:p></o:p></p><p class=MsoNormal>>>> gd.SetProjection('COMPD_CS["None",LOCAL_CS["None",LOCAL_DATUM["None",32767],UNIT["Foot_US",0.304800609601219],AXIS["None",OTHER]],VERT_CS["Local Meter",VERT_DATUM["Local",2005],UNIT["Meter",1,AUTHORITY["EPSG","9001"]],AXIS["Gravity-related height",UP]]]')<o:p></o:p></p><p class=MsoNormal>0<o:p></o:p></p><p class=MsoNormal>>>> gd.GetProjection()<o:p></o:p></p><p class=MsoNormal>'COMPD_CS["None",LOCAL_CS["None",LOCAL_DATUM["None",32767],UNIT["Foot_US",0.304800609601219],AXIS["None",OTHER]],VERT_CS["Local Meter",VERT_DATUM["Local",2005],UNIT["Meter",1,AUTHORITY["EPSG","9001"]],AXIS["Gravity-related height",UP]]]'<o:p></o:p></p><p class=MsoNormal>>>> gd = None<o:p></o:p></p><p class=MsoNormal><span style='color:red'>ERROR 1: PROJ: proj_get_ellipsoid: CRS has no geodetic CRS<o:p></o:p></span></p><p class=MsoNormal><span style='color:red'>ERROR 1: PROJ: proj_get_ellipsoid: Object is not a CRS or GeodeticReferenceFrame<o:p></o:p></span></p><p class=MsoNormal><span style='color:red'>ERROR 1: PROJ: proj_get_ellipsoid: CRS has no geodetic CRS<o:p></o:p></span></p><p class=MsoNormal><span style='color:red'>ERROR 1: PROJ: proj_get_ellipsoid: Object is not a CRS or GeodeticReferenceFrame<o:p></o:p></span></p><p class=MsoNormal><span style='color:red'>ERROR 1: PROJ: proj_crs_get_geodetic_crs: CRS has no geodetic CRS<o:p></o:p></span></p><p class=MsoNormal>>>> gd = gdal.Open("C:\\temp\\grid_meter_exported.tif", gdal.GA_Update)<o:p></o:p></p><p class=MsoNormal>>>> gd<o:p></o:p></p><p class=MsoNormal><osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x000001B6BC578720> ><o:p></o:p></p><p class=MsoNormal>>>> gd.GetProjectionRef()<o:p></o:p></p><p class=MsoNormal>'LOCAL_CS["None",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]'<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>-------------------end-------------------<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The dataset I’m working with can be downloaded here:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="https://www.dropbox.com/s/2jn7vkcl690e90r/grid_meter_exported.tif?dl=1">https://www.dropbox.com/s/2jn7vkcl690e90r/grid_meter_exported.tif?dl=1</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’d appreciate any guidance.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Chris<o:p></o:p></p></div></body></html>