<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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.E-mailStijl20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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="NL" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">I had postgresql10-postgis2.5 running.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">It didn't have 4979, so I inserted it.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:#2F2F2F">
<span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#669768">-- ERROR: GetProj4StringSPI: Cannot find SRID (4979) in spatial_ref_sys</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:#2F2F2F">
<span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#669768">--
</span><span style="font-size:10.0pt;font-family:Consolas;color:#669768"><a href="https://epsg.io/4979"><span lang="EN-GB">https://epsg.io/4979</span></a></span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:#2F2F2F">
<b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#739ECA">INSERT</span></b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">
</span><b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#739ECA">into</span></b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">spatial_ref_sys</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA"> (</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">srid</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">auth_name</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">auth_srid</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">proj4text</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">srtext</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">)
</span><b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#739ECA">values</span></b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA"> (
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:silver">4979</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#CAC580">'EPSG'</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:silver">4979</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#CAC580">'+proj=longlat +datum=WGS84 +no_defs +type=crs'</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#CAC580">'None'</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">)</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#EECC64">;</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:#2F2F2F">
<b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#739ECA">SELECT</span></b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">
</span><b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#C1AA6C">ST_Transform</span></b><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">(</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#CAC580">'SRID=7405;POINT(545068
258591 8.51)'</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">::</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#9E9E9E">geometry</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">,
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:silver">4979</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA">)</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#EECC64">;</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;color:#AAAAAA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">That rendered me:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New";mso-fareast-language:EN-US">st_transform |<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New";mso-fareast-language:EN-US">---------------------------------------------------------------+<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New";mso-fareast-language:EN-US">POINT Z(0.1215563454880247 52.20645574758174 55.02789907436818)|</span><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">Met vriendelijke groet,<o:p></o:p></p>
<p class="MsoNormal">Wouter Scherphof<o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Van:</b> postgis-users <postgis-users-bounces@lists.osgeo.org>
<b>Namens </b>James Howe<br>
<b>Verzonden:</b> dinsdag 31 januari 2023 12:16<br>
<b>Aan:</b> postgis-users@lists.osgeo.org<br>
<b>Onderwerp:</b> [postgis-users] ST_Transform Z heights between ODN and WSG<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 11.25pt">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">U ontvangt niet vaak e-mail van
<a href="mailto:jmh205@cam.ac.uk">jmh205@cam.ac.uk</a>. <a href="https://aka.ms/LearnAboutSenderIdentification">
Meer informatie over waarom dit belangrijk is</a><o:p></o:p></span></p>
</div>
</td>
<td width="75" style="width:56.25pt;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 3.75pt;align:left">
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I have elevation data in SRID 7405 (Ordinance Survey Great Britain 1936 with Ordinance Datum Newlyn) and I want to convert it to SRID 4979 (World Geodetic System 1984 ensemble).</span>
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Both SRs have three axes defined in their spatial_ref_sys entries.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">However, ST_Transform doesn't change the Z coordinate.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">SELECT ST_Transform('SRID=7405;POINT(545068 258591 8.51)'::geometry, 4979);<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">-> POINT(0.121585415593599 52.206415868084655 8.51)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Am I missing something?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Also asked on SE:
<a href="https://gis.stackexchange.com/q/447648/183667">https://gis.stackexchange.com/q/447648/183667</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Tried with postgres12-postgis3.0 and postgres14-postgis3.2.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">James<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>