# [Proj] Calculating +towgs84 values from source / dest .xyz file

Mark Johnson mj10777 at googlemail.com
Tue Sep 26 09:08:39 EST 2017

```José Gonçalves:: thank you for your answer, especially about which method
PROJ.4 uses (Position Vector).
Unfortunately this solution does not bring the expected result.

The original problem was the the DHDN bessel setting
(+towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7)
does not bring usable results for heights.
A manully worked
out +towgs84=598.1,73.7,418.2,0.201,0.049430,-2.455,0.2685935, gets near to
the expected result.

----
At present, the helmert3d program bring this for:
epsg:25833: 389918.0121759 5819698.8688798 34.790000000
to
epsg:3068: 23183.320000000 21047.418000000 34.790000000

reading helmert parameters...
0.999819 -0.019023 0.000000
0.019023 0.999819 -0.000000
-0.000000 0.000000 1.000000
-256025.393133 -5806493.649478 -1.442778
1.000254
+towgs84=-256025.3931332280,-5806493.6494778264,-1.4427781980,-0.0526548512,-0.0275339109,-3923.8255017867,253.6560894575
...done

dx[-256025.393133],dy[-5806493.649478],dz[-1.442778]
rx[0.052123]=-r23[0.000000252700] * 3600 * 180 / M_PI[3.141593]
ry[0.028526]= r13[0.000000138300] * 3600 * 180 / M_PI[3.141593];
rz[3923.825511]=-r12[0.019023242900] * 3600 *180 / M_PI[3.141593]
m[253.656100]=(scal[1.000254]-1) * 1000000]

starting transformation...
xout[23183.319992]=
tx(-256025.393133)+m(1.000254) *(x[389918.012176]*r11(0.999819) +
y[5819698.868880]*r12(-0.019023) + z[34.790000]*r13(0.000000))
yout[21047.418119]=
ty(-5806493.649478)+m(1.000254) *(x[389918.012176]*r21(0.019023) +
y[5819698.868880]*r22(0.999819) + z[34.790000]*r23(-0.000000))
zout[34.790125]=
tz(-1.442778)+m(1.000254) *(x[389918.012176]*r31(-0.000000) +
y[5819698.868880]*r32(0.000000) + z[34.790000]*r33(1.000000))

...done

with an exact result.

But when trying to use the +towgs84 value with cs2cs:

echo "389918.0121759 5819698.8688798 34.7900000"  | cs2cs -f "%.9f"
+init=epsg:25833 +to  +proj=cass +lat_0=52.41864827777778
+lon_0=13.62720366666667  +x_0=40000 +y_0=10000 +ellps=bessel
+datum=potsdam
+towgs84=+towgs84=-256025.3931332280,-5806493.6494778264,-1.4427781980,-0.0526548512,-0.0275339109,-3923.8255017867,253.6560894575
+units=m +no_defs
4383595.094518717 -889411.002599155 2829803.867439098

the result is completely off.
So something is still not correct.

Mark Johnson, Berlin Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20170926/88e5c1d4/attachment.htm
```

More information about the Proj mailing list