<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body>
<!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
Michal,<div><br></div><div>This may be becuase of an issue with the conda-forge install of pyproj.  The grid shift files do not get installed.</div><div><br></div><div>Please see this thread for details:</div><div><br></div><div><a href="https://github.com/pyproj4/pyproj/discussions/1409" target="_blank" class="enhancr2_8CAB33C9-9ECF-4937-8339-4C4B29874228">NAD27 to NAD83 Conversions · pyproj4 pyproj · Discussion #1409</a> <div><br></div><div id="enhancr2_8CAB33C9-9ECF-4937-8339-4C4B29874228" class="yahoo-link-enhancr-card yahoo-link-enhancr-cardSize-medium yahoo-link-enhancr-cardType-yenhancr yahoo-link-enhancr-cardCategory-object  ymail-preserve-class ymail-preserve-style" style="max-width:400px;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;" contenteditable="false" data-url="https://github.com/pyproj4/pyproj/discussions/1409" data-type="LINK_ENHANCR_ATTACHMENT_TYPE_INLINE" data-category="object" data-embed-url="" data-size="medium">     <a href="https://github.com/pyproj4/pyproj/discussions/1409" style="text-decoration:none !important; color: #000 !important;" class="yahoo-enhancr-cardlink" target="_blank" rel="noreferrer">         <table class="card-wrapper yahoo-ignore-table" cellpadding="0" cellspacing="0" border="0" style="max-width:400px;">             <tbody><tr>             <td width="400">                 <table class="card yahoo-ignore-table" cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width:400px;">                     <tbody><tr>                         <td class="card-primary-image-cell" style="background:#000 url('https://s.yimg.com/lo/api/res/1.2/JqIg34aW9zdOjxMIEmDLdw--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://opengraph.githubassets.com/e2fe6bb805f2653dc5c058322f9a6f400217734e5f952cb6a3b60e446c645859/pyproj4/pyproj/discussions/1409.cf.jpg') no-repeat center center;background-size:cover;height:200px;position:relative;" background="https://s.yimg.com/lo/api/res/1.2/JqIg34aW9zdOjxMIEmDLdw--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://opengraph.githubassets.com/e2fe6bb805f2653dc5c058322f9a6f400217734e5f952cb6a3b60e446c645859/pyproj4/pyproj/discussions/1409.cf.jpg" bgcolor="#000000" valign="top">                              <!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:400px;height:218px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https:&#x2F;&#x2F;s.yimg.com&#x2F;lo&#x2F;api&#x2F;res&#x2F;1.2&#x2F;JqIg34aW9zdOjxMIEmDLdw--~A&#x2F;Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--&#x2F;https:&#x2F;&#x2F;opengraph.githubassets.com&#x2F;e2fe6bb805f2653dc5c058322f9a6f400217734e5f952cb6a3b60e446c645859&#x2F;pyproj4&#x2F;pyproj&#x2F;discussions&#x2F;1409.cf.jpg"/></v:rect><![endif]-->                                               <table class="yahoo-ignore-table" cellpadding="0" cellspacing="0" border="0" valign="top" style="width:100%;">                                 <tbody><tr>                                     <td style="background:transparent url('https://s.yimg.com/nq/storm/assets/enhancrV2/12/overlay-tile.png') repeat left top;height:200px;" background="https://s.yimg.com/nq/storm/assets/enhancrV2/12/overlay-tile.png" bgcolor="transparent" valign="top">                                          <!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:400px;height:218px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/nq/storm/assets/enhancrV2/12/overlay-tile.png"/><v:textbox inset="0,0,20px,0"><![endif]-->                                          <table class="yahoo-ignore-table" height="185" style="width:100%;height:185px;min-height:185px;">                                             <tbody><tr>                                                 <td class="card-richInfo2" style="text-align:left;text-align:left;padding:15px 0 0 15px;vertical-align:top;">                                                                                                      </td>                                                 <td class="card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top;">                                                     <div class="card-share-container"></div>                                                 </td>                                             </tr>                                         </tbody></table>                                          <!--[if gte mso 9]></v:textbox></v:rect><![endif]-->                                     </td>                                 </tr>                             </tbody></table>                         </td>                     </tr>                     <tr>                         <td>                             <table class="card-info yahoo-ignore-table" align="center" cellpadding="0" cellspacing="0" border="0" style="background:#fff;position:relative;z-index:2;width:95%;max-width:380px;border:1px solid #e0e4e9;border-bottom:3px solid #010101;margin-top:-40px;margin-left:auto;margin-right:auto;">                                 <tbody><tr>                                                                   <td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;">                                                                                      <img class="card-object-1 yahoo-ignore-inline-image ymail-preserve-class" src="https://s.yimg.com/nq/storm/assets/enhancrV2/23/logos/github.png" height="32" style="min-width:32px;border:1px solid #e0e4e9;margin-top:3px;">                                                                              </td>                                      <td style="vertical-align:middle;padding:16px 12px;width:99%;">                                         <h2 class="card-title" style="font-size: 16px; line-height:19px; margin:0 0 4px 0;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;">NAD27 to NAD83 Conversions · pyproj4 pyproj · Discussion #1409</h2>                                                                                  <p class="card-description" style="font-size:11px;line-height:15px;color:#999;">In previous versions of pyproj, I was able to convert points between different datums. Specifically, NAD27 to NAD83 with both geographic and Cartesian coordinates. Is there a setting that needs to ...</p>                                     </td>                                      <td style="text-align:right;padding:16px 12px 16px 0;">                                                                              </td>                                 </tr>                             </tbody></table>                         </td>                     </tr>                 </tbody></table>             </td>             </tr>         </tbody></table>     </a> <button class="more" contenteditable="false" data-guid="enhancr2_8CAB33C9-9ECF-4937-8339-4C4B29874228" data-action="moreMenuInlineAttachment" name="showInlineImageMenu" aria-label="More Menu"></button></div><div><br></div><br><br>David<br><div class="yahoo-signature"><br></div><div class="yahoo-signature"><br></div><div class="yahoo-signature"><a style="font-size:12px" href="https://mail.onelink.me/107872968?pid=nativeplacement&c=Global_Acquisition_YMktg_315_Internal_EmailSignature&af_sub1=Acquisition&af_sub2=Global_YMktg&af_sub3=&af_sub4=100000604&af_sub5=EmailSignature__Static_">Sent from Yahoo Mail</a><br></div><br><p class="yahoo-quoted-begin" style="font-size: 15px; color: rgb(123, 106, 246); padding-top: 15px; margin-top: 0px;">On pyproj4 pyproj6, 2024, 6:58 AM, Michal Girmala via gdal-dev <gdal-dev@lists.osgeo.org> wrote:</p><blockquote class="iosymail"><div id="yiv3625194537">

 
 
<style><!--

#yiv3625194537 filtered {}
#yiv3625194537 filtered {}
#yiv3625194537 filtered {}

#yiv3625194537 p.yiv3625194537MsoNormal, #yiv3625194537 li.yiv3625194537MsoNormal, #yiv3625194537 div.yiv3625194537MsoNormal
        {margin:0cm;font-size:11.0pt;font-family:"Calibri", sans-serif;}
#yiv3625194537 a:link, #yiv3625194537 span.yiv3625194537MsoHyperlink
        {color:#0563C1;text-decoration:underline;}
#yiv3625194537 span.yiv3625194537EmailStyle19
        {font-family:"Calibri", sans-serif;color:windowtext;}
#yiv3625194537 .yiv3625194537MsoChpDefault
        {font-size:10.0pt;}
#yiv3625194537 filtered {}
#yiv3625194537 div.yiv3625194537WordSection1
        {}
--></style>

<div>
<div class="yiv3625194537WordSection1">
<p class="yiv3625194537MsoNormal">Hello all,</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">I am trying to reproject elevation raster with gdalwarp in python Gdal API using a transformation defined by -ct string
</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">kwargs = {</p> 
<p class="yiv3625194537MsoNormal">        "format": 'GTiff', </p> 
<p class="yiv3625194537MsoNormal">        "resampleAlg": "cubic",</p> 
<p class="yiv3625194537MsoNormal">        "multithread":True </p> 
<p class="yiv3625194537MsoNormal">}</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">kwargs.update({"coordinateOperation":"+proj=pipeline +step +inv +proj=utm +zone=34 +ellps=GRS80 +step +proj=push +v_3 +step +proj=cart +ellps=GRS80 +step +inv +proj=helmert +x=485.021 +y=169.465 +z=483.839 +rx=-7.786342 +ry=-4.397554 +rz=-4.102655
 +s=0 +convention=coordinate_frame +step +inv +proj=cart </p> 
<p style="margin-left:36.0pt;text-indent:36.0pt;" class="yiv3625194537MsoNormal">+ellps=bessel +step +proj=pop +v_3 +step +proj=hgridshift +grids=.\\pipeline\\Slovakia_JTSK03_to_JTSK.gsb +step +proj=vgridshift +grids=.\\pipeline\\Slovakia_ETRS89h_to_Baltic1957.gtx +step
 +proj=krovak +lat_0=49.5 +lon_0=24.8333333333333 +alpha=30.2881397527778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel" })
</p> 
<p class="yiv3625194537MsoNormal">kwargs.update({"srcSRS":"EPSG:25834","dstSRS":"EPSG:5514"})</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">warp = gdal.Warp(out_raster,in_raster,**kwargs)</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">The horizontal reprojection works fine but I can´t force the Gdal to use an elevation shift grid file, because my CRS does not have a vertical system defined.
</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">In the Gdal utility, I can easily do this by using -vshift parameter, but I don´t know how to do this with Python API since osgeo.gdal.WarpOptions does not contain this parameter.
</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">Is there a way, how to force vertical transformation?</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal">Thank you.</p> 
<p class="yiv3625194537MsoNormal">  </p> 
<p class="yiv3625194537MsoNormal"><span style="">Best regards,</span></p> 
<p class="yiv3625194537MsoNormal"><b><span style="">Ing. Michal Girmala</span></b><span style=""></span></p> 
<p class="yiv3625194537MsoNormal"><span style="color:black;"> </span></p> 
<p class="yiv3625194537MsoNormal"><span style="color:black;">+421 908 133 793             </span><a rel="nofollow noopener noreferrer" ymailto="mailto:girmala@photomap.sk" target="_blank" href="mailto:girmala@photomap.sk"><span style="">girmala@photomap.sk</span></a><span style="color:black;"></span></p> 
<p class="yiv3625194537MsoNormal"><span style="color:black;">+421 55 685 4396             </span><a rel="nofollow noopener noreferrer" target="_blank" href="https://photomap.photomap.sk/owa/redir.aspx?C=TkX_pwO3Cdy8-2srzfDp5ctFQ587EpI-9faJi0uprt0fCrd688PWCA..&URL=http%3a%2f%2fwww.photomap.sk%2f"><span style="">www.photomap.sk</span></a><span style="color:#0563C1;"></span></p> 
<p class="yiv3625194537MsoNormal"><span style="color:black;">_ _</span></p> 
<p class="yiv3625194537MsoNormal"><span style="color:black;"> </span></p> 
<p class="yiv3625194537MsoNormal"><span style="font-family:Webdings;color:green;">P</span><span style="color:green;"> </span><a rel="nofollow noopener noreferrer" target="_blank" href="https://photomap.photomap.sk/owa/redir.aspx?C=tvo5neA_o2nG-tVUhKJQSd_SbCbRRCf3YD7l8laI8Q4fCrd688PWCA..&URL=http%3a%2f%2fthinkbeforeprinting.org%2f"><span style="color:green;">Pred
 vytlačením tohto mailu prosím zvážte dopad na životné prostredie.</span></a><span style="color:green;"></span></p> 
<p class="yiv3625194537MsoNormal">  </p> 
</div>
</div>

</div>_______________________________________________<br>gdal-dev mailing list<br><a ymailto="mailto:gdal-dev@lists.osgeo.org" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br><blockquote></blockquote></blockquote></div>

</body></html>