<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=utf-8">
<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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;}
span.EmailStyle21
        {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: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" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I would have replied to the original email, but I wasn’t on the mailing list when it came in.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Using a DerivedCRS with a vertical offset and slope transformation seems wrong to me. In ISO 19111 and EPSG, a conversion is an operation that stays in the same datum, and a transformation is an operation that changes the datum. Vertical
 offset and slope is clearly going from one vertical datum to a different datum. Are you saying that your Custom Vertical CRS is still using the EGM2008 geoid datum after a vertical offset and slope operation?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Examples of conversions that stay in the same vertical datum would be a Depth vertical CRS, that has a height-depth reversal conversion, or a Feet vertical datum that has a unit conversion to the metres CRS. In all those cases, the source
 (derived) and target (base) datums are the same:<o:p></o:p></p>
<p class="MsoNormal">NAVD88 Height (ftUS): <a href="https://epsg.org/crs/wkt/id/6360">
https://epsg.org/crs/wkt/id/6360</a><o:p></o:p></p>
<p class="MsoNormal">NAVD88 Depth: <a href="https://epsg.org/crs/wkt/id/6357">https://epsg.org/crs/wkt/id/6357</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Should this not be a BoundCRS that has custom as the source,  EGM2008 height as the target, and the vertical offset as the abridged transformation? Am I right to assume that your Custom Vertical CRS is not using the EGM2008 datum?<o:p></o:p></p>
<p class="MsoNormal">André<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> PROJ <proj-bounces@lists.osgeo.org> <b>On Behalf Of
</b>Even Rouault<br>
<b>Sent:</b> Saturday, July 30, 2022 14:36<br>
<b>To:</b> Javier Jimenez Shaw <j1@jimenezshaw.com>; proj <PROJ@lists.osgeo.org><br>
<b>Subject:</b> Re: [PROJ] Derived Vertical CRS<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div align="center">
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="150" style="width:112.5pt;border:outset #898989 1.0pt">
<tbody>
<tr>
<td style="border:inset #898989 1.0pt;background:#FDFFB2;padding:3.0pt 3.0pt 3.0pt 3.0pt">
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:8.0pt">External Email<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p>Javier,<o:p></o:p></p>
<p>I've addressed this in <a href="https://github.com/OSGeo/PROJ/pull/3270">https://github.com/OSGeo/PROJ/pull/3270</a>.<o:p></o:p></p>
<p>Regarding the WKT issue, I've raised this to the OGC CRS SWG list as the grammar of WKT doesn't allow currently a unitless parameter, even if the EPSG Vertical Offset and Slope method requires it. I'd suggest using something like UNIT["none",1] instead of
 ANGLEUNIT["arc-second",4.8481368111E-06], until that's cleared up<o:p></o:p></p>
<p>Even<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 29/07/2022 à 21:16, Javier Jimenez Shaw a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Hi<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks to Even's PR #3200 "Implement Vertical Offset and slope transformation method", I am trying to use a Derived Vertical CRS using the conversion method "Vertical Offset and Slope" (that will be a perfect combination with "Affine parametric
 transformation" in the horizontal... I hope)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The WKT2 I have created is this<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">VERTCRS["Custom Vertical",<br>
    BASEVERTCRS["EGM2008 height",<br>
        VDATUM["EGM2008 geoid"]],<br>
    DERIVINGCONVERSION["vertical offs. and slope",<br>
        METHOD["Vertical Offset and Slope",<br>
            ID["EPSG",1046]],<br>
        PARAMETER["Ordinate 1 of evaluation point",46.9166666666669,<br>
            ANGLEUNIT["degree",0.0174532925199433],<br>
            ID["EPSG",8617]],<br>
        PARAMETER["Ordinate 2 of evaluation point",8.18333333333361,<br>
            ANGLEUNIT["degree",0.0174532925199433],<br>
            ID["EPSG",8618]],<br>
        PARAMETER["Vertical Offset",-0.245,<br>
            LENGTHUNIT["metre",1],<br>
            ID["EPSG",8603]],<br>
        PARAMETER["Inclination in latitude",-0.21,<br>
            ANGLEUNIT["arc-second",4.8481368111E-06],<br>
            ID["EPSG",8730]],<br>
        PARAMETER["Inclination in longitude",-0.032,<br>
            ANGLEUNIT["arc-second",4.8481368111E-06],<br>
            ID["EPSG",8731]],<br>
        PARAMETER["EPSG code for Horizontal CRS",4326,<br>
            ANGLEUNIT["arc-second",4.8481368111E-06],<br>
            ID["EPSG",1037]]],<br>
    CS[vertical,1],<br>
        AXIS["gravity-related height (H)",up,<br>
            LENGTHUNIT["metre",1]],<br>
    USAGE[<br>
        SCOPE["unknown"],<br>
        AREA["World"],<br>
        BBOX[-90,-180,90,180]]]  </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The first strange thing is that without the unit in the parameter "EPSG code for Horizontal CRS",
<span style="font-family:"Courier New"">projinfo "$(cat derived_vertical.wkt)"</span> shows a warning:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">Warning: Parsing error : syntax error, unexpected ID. Error occurred around:<br>
            ID["EPSG",1037]]],</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When I try to see how the conversion would be with the command<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">projinfo -s EPSG:3855 -t "$(cat derived_vertical.wkt)"</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I get<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">PROJ string:<br>
Error when exporting to PROJ string: Unsupported conversion method: Vertical Offset and Slope</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Using it in a compound crs and using cs2cs does not get the proper transformation neither.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Am I creating the WKT2 string properly to create a derived vertical crs (to be used in a compound) with that conversion method?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">PS. I am using master from today<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">PS2.  <span style="font-family:"Courier New"">projinfo -s EPSG:5728 -t EPSG:5730</span> shows a coordinate operation that uses "Vertical Offset and Slope", with a nice PROJ string<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>PROJ mailing list<o:p></o:p></pre>
<pre><a href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</body>
</html>