I m currently trying to convert coordinates which come in a csv file in Lon/Lat to Gauss Krüger (Zone 4) using R. My script works perfectly fine, except that the resulting shapefile with the converted points are a little off where they should be (ranging from ~18 to 40m). I guess something is wrong with my spTransform input. As the original CSV didn't come with any metadata, i definded the CRS to WGS84 (the points were recorded with a garmin gps device)

proj4string(results_eDNA)=CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")

where results_eDNA is the dataframe including the coordinates

I then try to transform it with:

coor_eDNA<- spTransform(results_eDNA, CRS("+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000
 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs +towgs84=23.92,-141.27,-80.9,-0,0.35,0.82,-0.12"))

i think the error comes from the numbers following "+towgs84=", but i have no idea how to figure out which would be the right ones for me. I tried all posibilitys i found on spatialreference.org but with no success.

  • Do you know Datum of your Gauss Krüger projection? There are many from different datums
    – aldo_tapia
    Sep 14, 2017 at 12:48
  • it just needs to be in any Gauss Krüger projection in Zone 4. Or do you mean the datum of the "original" data?
    – sn1ks
    Sep 14, 2017 at 12:57
  • Gauss Krüger is a projection, like UTM. You don't project to simply UTM coordinate reference system, you project to WGS 84 UTM zone X for example, because a coordinate system is compound by Datum + Projection. So, you need to know both items
    – aldo_tapia
    Sep 14, 2017 at 13:16
  • When you say they are 18-40m off, how can you be sure the thing you are comparing them too is accurate?
    – Spacedman
    Sep 14, 2017 at 13:32
  • 2
    In QGIS, I would expect both layers to line up, if the map/view's coordinate system is the OSM or the original data's. If your GK data is offset, that implies to me that QGIS isn't applying the datum transformation (+towgs84) to reconcile the data layers. Anyway, if you project WGS84 to Potsdam (or DHDN), there should an offset between the two. If you project to GK 4 using WGS84 coords (no transformation), you'll get different projected coords than if you apply transformation to Potsdam and then project to GK. See colorado.edu/geography/gcraft/notes/coordsys/coordsys_f.html
    – mkennedy
    Sep 14, 2017 at 20:44

1 Answer 1


You are mixing datum shift values:


is valid for the Pulkovo 1942 datum, based on the Russian Krassowsky ellipsoid. See https://epsg.io/2398


is valid for the German DHDN Gauss-Krueger CRS based on the bessel ellipsoid and Potsdam datum, see https://epsg.io/31468. The datum shift to WGS84 is


Both CRS have been used in Eastern Germany, so you have to make sure which datum your data is in.


Your Answer

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

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