5

I have a number of points in Gauss-Kruger, Zone 3 that I want to convert to display them within Google-Earth. Assuming WGS84 for Google-Earth the transformed coordinated differ from the original ones about 140m to the north-east.

I am doing the coordinate transformation using the "PROJ.4 - Cartographic Projections Library" (http://trac.osgeo.org/proj/) with the following proj4 strings:

Gauß Krüger, Zone 3:

+proj=tmerc +lat_0=0 +lon_0=9 +k=1.000000 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs 
WGS84:
 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs - "

Could somebody check if my proj4 strings are correct (especially WGS84 for Google Earth) or suggest other causes of the error?

1 Answer 1

6

Your Gauss-Krueger projection uses +datum=potsdam. Up to 2012, this was hard coded in proj4 to a very unprecise value using a 3-parameter-transformation.

You find more exact values for 7-parameter transformations in this topic:

http://forum.openstreetmap.org/viewtopic.php?id=12723

There is an even better ntv2-grid transformation available here (take the binary), that has to be in the same folder as your application and data, unlsss you specify full pathnames.

To compare the different possible values, I made this test batch file:

echo epsg31467-epsg4326 >out.txt
cs2cs +init=epsg:31467 +to +init=epsg:4326 31467.txt >>out.txt

echo proj-Definition epsg >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs  +to +init=epsg:4326 31467.txt >>out.txt

echo proj-definition Qgis >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=582,105,414,1.04,0.35,-3.08,8.3 +units=m +no_defs +to +init=epsg:4326 31467.txt >>out.txt

echo proj-definition nadgrid >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +x_0=3500000 +y_0=0 +k=1.000000 +ellps=bessel +units=m +nadgrids=./BETA2007.gsb +wktext +to +init=epsg:4326 31467.txt >>out.txt

echo epsg31467-epsg3785 >>out.txt
cs2cs +init=epsg:31467 +to +init=epsg:3785 31467.txt >>out.txt
echo proj-definition Qgis >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=582,105,414,1.04,0.35,-3.08,8.3 +units=m +no_defs +to +init=epsg:3785 31467.txt >>out.txt

echo proj-definition nadgrid >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +x_0=3500000 +y_0=0 +k=1.000000 +ellps=bessel +units=m +nadgrids=./BETA2007.gsb +wktext +to +init=epsg:3785 31467.txt >>out.txt

echo epsg31467-epsg3857 >>out.txt
cs2cs +init=epsg:31467 +to +init=epsg:3857 31467.txt >>out.txt
echo proj-definition Qgis >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=582,105,414,1.04,0.35,-3.08,8.3 +units=m +no_defs +to +init=epsg:3857 31467.txt >>out.txt

echo epsg31467-epsg900913 >>out.txt
cs2cs +init=epsg:31467 +to +init=epsg:900913 31467.txt >>out.txt
echo epsg31467-proj900913 >>out.txt
cs2cs +init=epsg:31467 +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +over +no_defs 31467.txt >>out.txt
echo proj31467-proj900913 >>out.txt
cs2cs +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=582,105,414,1.04,0.35,-3.08,8.3 +units=m +no_defs +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +over +no_defs 31467.txt >>out.txt

with any sample Gauss-Krüger lon-lat coordinate pair in 31467.txt

6
  • thank you. Do you think the issue occurs with the latest proj4 version also? I am using proj4 with cs2cs and just installed that a week ago. Commented Nov 3, 2014 at 18:05
  • It depends on the software you use. Latest builds from gisinternals are up-to-date, while FWtools and proj4js may be a bit behind. I always prefer to use the full +towgs84 parameters.
    – AndreJ
    Commented Nov 3, 2014 at 18:21
  • ok. As I am not too familiar with proj4, could you tell me how to modify my proj4 strings having found potsdam "towgs84=597.1,71.4,412.1,0.894,0.068,-1.563,7.58" "Germany (West - South - 47d00N to 50d20'N)" "Accuracy <1m" in the thread you linked to? Commented Nov 3, 2014 at 18:40
  • Thank you for your effort! However when running your script on the inputfile containing 456433.163000 5430249.143000 126.410000 I am getting the following errors: Rel. 4.8.0, 6 March 2012 <cs2cs>: while processing file: 31467.txt, line 1 pj_transform(): failed to load datum shift file Rel. 4.8.0, 6 March 2012 <cs2cs>: while processing file: 31467.txt, line 1 pj_transform(): failed to load datum shift file Rel. 4.8.0, 6 March 2012 <cs2cs>: projection initialization failure cause: no options found in 'init' file program abnormally terminated Commented Nov 3, 2014 at 19:09
  • Let us continue this discussion in chat. Commented Nov 3, 2014 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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