<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>projinfo is often the answer to such questions. Datum
transformations *are* generally needed. What is generally no
longer required in PROJ 6 era is to use the explict +nadgrids /
+towgs84 terms. PROJ will find which ones are needed, but the user
may still have to arbitrate because there's not always a single
possibility.<br>
</p>
<p>So the most precise transformation uses the BETA2007 grid, or you
have 2 potential Helmert-based transformations depending on the
location<br>
</p>
<p>$ projinfo -s EPSG:4326 -t EPSG:31468 --spatial-test intersects
-o PROJ<br>
Candidate operations found: 3<br>
-------------------------------------<br>
Operation No. 1:<br>
<br>
unknown id, Inverse of DHDN to WGS 84 (4) + 3-degree Gauss-Kruger
zone 4, 1 m, Germany - onshore - states of Baden-Wurtemberg,
Bayern, Berlin, Brandenburg, Bremen, Hamburg, Hessen,
Mecklenburg-Vorpommern, Niedersachsen, Nordrhein-Westfalen,
Rheinland-Pfalz, Saarland, Sachsen, Sachsen-Anhalt,
Schleswig-Holstein, Thuringen.<br>
<br>
PROJ string:<br>
+proj=pipeline<br>
+step +proj=axisswap +order=2,1<br>
+step +proj=unitconvert +xy_in=deg +xy_out=rad<br>
+step +inv +proj=hgridshift +grids=de_adv_BETA2007.tif<br>
+step +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0
+ellps=bessel<br>
+step +proj=axisswap +order=2,1<br>
<br>
-------------------------------------<br>
Operation No. 2:<br>
<br>
unknown id, Inverse of DHDN to WGS 84 (2) + 3-degree Gauss-Kruger
zone 4, 3 m, Germany - states of former West Germany onshore -
Baden-Wurtemberg, Bayern, Bremen, Hamburg, Hessen, Niedersachsen,
Nordrhein-Westfalen, Rheinland-Pfalz, Saarland,
Schleswig-Holstein.<br>
<br>
PROJ string:<br>
+proj=pipeline<br>
+step +proj=axisswap +order=2,1<br>
+step +proj=unitconvert +xy_in=deg +xy_out=rad<br>
+step +proj=push +v_3<br>
+step +proj=cart +ellps=WGS84<br>
+step +inv +proj=helmert +x=598.1 +y=73.7 +z=418.2 +rx=0.202
+ry=0.045<br>
+rz=-2.455 +s=6.7 +convention=position_vector<br>
+step +inv +proj=cart +ellps=bessel<br>
+step +proj=pop +v_3<br>
+step +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0
+ellps=bessel<br>
+step +proj=axisswap +order=2,1<br>
<br>
-------------------------------------<br>
Operation No. 3:<br>
<br>
unknown id, Inverse of DHDN to WGS 84 (3) + 3-degree Gauss-Kruger
zone 4, 2 m, Germany - states of former East Germany - Berlin,
Brandenburg; Mecklenburg-Vorpommern; Sachsen; Sachsen-Anhalt;
Thuringen.<br>
<br>
PROJ string:<br>
+proj=pipeline<br>
+step +proj=axisswap +order=2,1<br>
+step +proj=unitconvert +xy_in=deg +xy_out=rad<br>
+step +proj=push +v_3<br>
+step +proj=cart +ellps=WGS84<br>
+step +inv +proj=helmert +x=612.4 +y=77 +z=440.2 +rx=-0.054
+ry=0.057<br>
+rz=-2.797 +s=2.55 +convention=position_vector<br>
+step +inv +proj=cart +ellps=bessel<br>
+step +proj=pop +v_3<br>
+step +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0
+ellps=bessel<br>
+step +proj=axisswap +order=2,1<br>
<br>
</p>
<div class="moz-cite-prefix">Le 15/04/2021 à 14:51, Alan Snow a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAGybdFS-drFsGY-0XQt799+0hP=17Dc5GEzKkFRnttxoEv8X-Q@mail.gmail.com">
<div dir="auto">Original question: <a
href="https://github.com/pyproj4/pyproj/discussions/814"
moz-do-not-send="true">https://github.com/pyproj4/pyproj/discussions/814</a>
<div dir="auto"><br>
</div>
<div dir="auto">What he is asking is if TOWGS84 parameters are
needed for datum transformations.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks 👍</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Apr 15, 2021, 2:32 AM
XCTrails <<a href="mailto:info@xctrails.org"
moz-do-not-send="true">info@xctrails.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>
I have input polygon in epsg:31468 which I need to
transform to epsg:4326 <br>
</div>
<div><br>
</div>
<div>My current code boils down to this:</div>
<div><br>
</div>
<div>project =
pyproj.Transformer.from_crs("EPSG:31468","EPSG:4326",
always_xy=True)</div>
<div>poly = transform(project.transform, poly)</div>
<div><br>
</div>
<div>The problem however is that the resulting polygons have
a 1-2 meter offset according to visual inspection in QGIS.
On reddit, someone suggested that I might also need a
datum transformation, on the pyproj4 issue tracker someone
said, that datum transformations are no longer needed in
PROJ 6+ and that I should ask for clarification here. So
here I am ;-)</div>
<div><br>
</div>
<div>Can anyone shed any light on why I get these offsets
and what I can do to fix this?<br>
</div>
<div>There's no offset if I manually reproject this in QGIS
and compare it with the original.<br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Armin<br>
</div>
</div>
_______________________________________________<br>
PROJ mailing list<br>
<a href="mailto:PROJ@lists.osgeo.org" target="_blank"
rel="noreferrer" moz-do-not-send="true">PROJ@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/proj"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></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>