3

I've got the following Python Script:

from pyproj import Transformer, transform

transformer = Transformer.from_crs(31468, 25832, always_xy=True)

x_coords = 4359995
y_coords = 5295525

transformer.transform(x_coords, y_coords)

With pyproj 2.6.1.post1 I get these coordinates:

(584665.8977184547, 5292775.704050368)

With pyproj 3.0.0 or 3.2.0 I get these coordinates:

 (584665.4771803176, 5292775.48134032)

Can someone explain the difference? Do you get the same results?

3

Test with gdaltranslate and Proj version Rel. 6.3.2, May 1st, 2020

gdaltransform -s_srs epsg:31468 -t_srs epsg:25832
4359995 5295525
584665.897718455 5292775.70405037 0

Test with Proj 7.2.0

gdaltransform -s_srs epsg:31468 -t_srs epsg:25832
4359995 5295525
584665.477180318 5292775.48134032 0

Your numbers look alike. Obviously newer Proj version gives slightly different result that is hopefully more accurate.

Projinfo shows how the conversion is done:

projinfo -s epsg:31468 -t epsg:25832
Candidate operations found: 2
Note: using '--spatial-test intersects' would bring more results (6)
-------------------------------------
Operation No. 1:

unknown id, Inverse of 3-degree Gauss-Kruger zone 4 + DHDN to ETRS89 (8) + UTM zone 32N, 0.9 m, Germany - onshore

PROJ string:
+proj=pipeline +step +proj=axisswap +order=2,1 +step +inv +proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel +step +proj=hgridshift +grids=BETA2007.gsb +step +proj=utm +zone=32 +ellps=GRS80

This transformation seems to utilize the gridshift file "BETA2007.gsb".

2
  • Thanks for the fast reply!! But i still wonder if the .gsb file changed or something different. The .gsb file is also used in other gis systems like QGIS or ArcGIS. With QGIS I get the same Results of x\y coordinates like in pyproj version 2.6.1.post1. Might this change in the future?
    – P.Hert
    Sep 14 at 18:18
  • I also found this interesting question which might solve my problem gis.stackexchange.com/questions/403307/…
    – P.Hert
    Sep 14 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.