<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Javier,</p>
<p>yes, your analysis is fully correct , and your enhanced pipeline
too. However that would suck a bit to have to implement it like
that as doing and undoing the vgridshift is inefficient. The ideal
solution would use some storage space as we discussed a few months
ago but couldn't reach a conclusion how to implement that. For 3D
operations only like that, we could use the v_4 component as the
temporary storage using push +v_3 / axisswap order=3,4 / pop +v_3
trickery<br>
</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 02/05/2025 à 21:10, Javier Jimenez
Shaw via PROJ a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKsT9tX8+M5Ni7ePU5NHWu01a5mNEJaYYJB3fCL2FVADOA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>This is a question to understand what should be more
correct, not a request to change anything in PROJ. The
numerical difference is very small.</div>
<div><br>
</div>
<div>The 3D transformation from EPSG:4258 to EPSG:4150+5729 has
two components: a grid file for the geoid model of LHN95
height, interpolated in ETRS89, and the Helmert transformation
from ETRS89 (EPSG:4258) to CH1903+ (EPSG:4150).</div>
<div>The input of the Helmert transformation should be
ellipsoidal heights, but in this pipeline they are orthometric
heights. Right?</div>
<div>Technically that would change also the horizontal output
because of the change in elevation in the input of the Helmert
(again, the difference is very small. 1 or 2 mm. I just want
to understand it).</div>
<div><br>
</div>
<div><span style="font-family:monospace">PROJ_NETWORK=ON
projinfo EPSG:4258 EPSG:4150+5729 -o proj --3d</span></div>
<div><br>
</div>
<div><span style="font-family:monospace">+proj=pipeline<br>
+step +proj=axisswap +order=2,1<br>
+step +proj=unitconvert +xy_in=deg +xy_out=rad<br>
+step +inv +proj=vgridshift
+grids=ch_swisstopo_chgeo2004_ETRS89_LHN95.tif<br>
+multiplier=1<br>
+step +proj=push +v_3<br>
+step +proj=cart +ellps=GRS80<br>
+step +inv +proj=helmert +x=674.374 +y=15.056 +z=405.346<br>
+step +inv +proj=cart +ellps=bessel<br>
+step +proj=pop +v_3<br>
+step +proj=unitconvert +xy_in=rad +xy_out=deg<br>
+step +proj=axisswap +order=2,1<br>
</span></div>
<div><br>
</div>
<div><br>
</div>
<div>Would this be more correct? (undoing the vgridshift before
calling Helmert, but after "push <a class="gmail_plusreply"
id="plusReplyChip-0" moz-do-not-send="true">+v_3"</a>)</div>
<div><br>
</div>
<div>
<div><span style="font-family:monospace">+proj=pipeline<br>
+step +proj=axisswap +order=2,1<br>
+step +proj=unitconvert +xy_in=deg +xy_out=rad<br>
+step +inv +proj=vgridshift
+grids=ch_swisstopo_chgeo2004_ETRS89_LHN95.tif<br>
+multiplier=1<br>
+step +proj=push +v_3<br>
+step +proj=vgridshift
+grids=ch_swisstopo_chgeo2004_ETRS89_LHN95.tif<br>
+multiplier=1<br>
+step +proj=cart +ellps=GRS80<br>
+step +inv +proj=helmert +x=674.374 +y=15.056 +z=405.346<br>
+step +inv +proj=cart +ellps=bessel<br>
+step +proj=pop +v_3<br>
+step +proj=unitconvert +xy_in=rad +xy_out=deg<br>
+step +proj=axisswap +order=2,1</span><br>
</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<div>Javier.</div>
<div><br>
</div>
<div>PS to get output in meters use EPSG:2056, that uses the
Swiss projection. I removed it to simplify the pipelines.</div>
<div>Just replace the last two lines of the pipeline with</div>
<div><span style="font-family:monospace">+step +proj=somerc
+lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1
+x_0=2600000 +y_0=1200000 +ellps=bessel</span></div>
<br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>