<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: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;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:none;
mso-fareast-language:EN-US;}
@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="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">Hi list members,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">The PROJ operations
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">+proj=push</span><span lang="EN-GB" style="font-size:10.0pt"> and
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">+proj=pop</span><span lang="EN-GB" style="font-size:10.0pt"> use "last in, first out" (LIFO) to store and retrieve coordinate values in a stack. It seems that I need "first in, first out"
(FIFO) or other new functionality in PROJ.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><u><span lang="EN-GB" style="font-size:10.0pt">Problem<o:p></o:p></span></u></i></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">The Dutch Caribbean islands use TM-projections based on old datums. We have an exact Helmert transformation per island that transforms the horizontal coordinates to an ITRS realisation at a specific
epoch. For some islands we need a geoid (EGM2008 sampled at 45” is the best we have at the moment) for the height transformation from local levelling heights to ITRS. That works fine for a forward transformation with this PROJ pipeline:
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">cct +proj=pipeline
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=push +v_3
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=tmerc +inv +lat_0=12.180658675 +lon_0=-68.251802281 +k_0=1 +x_0=23209.5600 +y_0=21423.9900 +ellps=intl
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=cart +ellps=intl
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=helmert +x=-366.1939 +y=-115.0688 +z=-776.7039 +rx=20.963080 +ry=16.462749 +rz=-14.276379 +s=-12.80900 +convention=coordinate_frame +exact
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=cart +inv +ellps=GRS80
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=pop +v_3
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=vgridshift +grids=egm2008_0_45.tif +inv
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">However, I do not get exactly the same results for the inverse transformation with
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">-I</span><span lang="EN-GB" style="font-size:10.0pt">, since I apply the geoid on the ITRS coordinates, but then the physical height is used for the Helmert transformation instead of the
correct ellipsoidal height. This gives a small error in the horizontal coordinates in this case, but can easily reach more than 50 metres for other CRSs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><u><span lang="EN-GB" style="font-size:10.0pt">Solution<o:p></o:p></span></u></i></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">The most elegant solution seems to me to use FIFO for operations +proj=push and +proj=pop, so I can use this pipeline:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">cct +proj=pipeline
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=push +v_3
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=tmerc +inv +lat_0=12.180658675 +lon_0=-68.251802281 +k_0=1 +x_0=23209.5600 +y_0=21423.9900 +ellps=intl
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=cart +ellps=intl
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=helmert +x=-366.1939 +y=-115.0688 +z=-776.7039 +rx=20.963080 +ry=16.462749 +rz=-14.276379 +s=-12.80900 +convention=coordinate_frame +exact
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=cart +inv +ellps=GRS80
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=push +v_3<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=pop +v_3
<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=vgridshift +grids=egm2008_0_45.tif +inv
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=pop +v_3 +omit_fwd
<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><u><span lang="EN-GB" style="font-size:10.0pt">Alternative<o:p></o:p></span></u></i></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">Another possible solution is a new PROJ operation e.g.
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">+proj=flip</span><span lang="EN-GB" style="font-size:10.0pt"> to make the values of a coordinate value and the value stored in the stack switch places.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">cct -I +proj=pipeline
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=push +v_3
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=utm +zone=19 +inv +ellps=intl
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=cart +ellps=intl
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=helmert +x=-366.1939 +y=-115.0688 +z=-776.7039 +rx=20.963080 +ry=16.462749 +rz=-14.276379 +s=-12.80900 +convention=coordinate_frame +exact
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=cart +inv +ellps=GRS80
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=flip +v_3
<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=vgridshift +grids=egm96_15.tif +inv
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas">+step +proj=pop +v_3 +omit_fwd
<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt">Regards, Jochem<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt"><o:p> </o:p></span></p>
</div>
<br>
<br>
<font size="2">Disclaimer:<br>
De inhoud van deze e-mail is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n).<br>
Gebruik, openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.<br>
Op al onze producten en diensten zijn onze algemene leveringsvoorwaarden van toepassing<br>
[https://www.kadaster.nl/algemene-leveringsvoorwaarden].<br>
<br>
Disclaimer:<br>
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.<br>
If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.<br>
Our general terms and conditions of delivery apply to all our products and services<br>
[https://www.kadaster.com/general-terms-and-conditions]. <br>
</font>
</body>
</html>