# How can you use and convert Gauss-Krüger-Coordinates in Mathematica?

I am given geographic data in the form of Gauss-Krüger-Coordinates and would like to calculate distances with them and convert them to longitude/latitude coordinates in another system for plotting (e.g. WGS84).

Gauss-Krüger-Coordinates are essentially like UTM-coordinates based upon a transversal Mercator projection where positions are indicated by a Right-value (East-value in UTM; y-coordinate in the geodetic coordinate system) and a High-value (North-value in UTM; x-coordinate int the geodetic coordinate system)

Far from being an expert in geodesy the way I understand it Mathematica's geodetic functions allow entering coordinates as GeoPosition, as GeoPositionENU or as GeoGridPosition. GeoGridPosition essentially will reference to a position on a projection so probably should be the way the Gauss-Krüger-Coordinates are entered, but I am not so sure. Mathematica does not seem to know Gauss-Krüger-Projection (not listed among GeoProjectionData[]) and I do not know which parameters to use for Gauss-Krüger and how best to do this. Thus:

How can I enter the Gauss-Krüger-Coordinates into Mathematica so they can be used for distance-calculations and conversions using Mathematica's geodetic functions?

• For more information on coordinate reference systems and conversions one might turn to epsg.org where guidance on conversions and formulas is given under epsg.org/guides/G7-2.html. – gwr May 22 '12 at 10:39
• The Guidance Note G7-2 which has all parameters needed for conversion can be found here. The link in my above comment is broken. – gwr Aug 22 '16 at 20:33

With a little help from other sources and the links given as a comment to my question I came up with a solution. Essentially Gauss-Krüger is a variant of the Transversal Mercator projection so this projection can be used and made to fit the Gauss-Krüger specialties:

gaussKruegerPosition[{right_Integer,high_Integer},centralMeridian_Integer,
falseEasting_Integer]:=

GeoGridPosition[
{right-falseEasting-centralMeridian/3*10^6,high,0},
{"TransverseMercator","Centering"-> {0,centralMeridian},"ReferenceModel"->"Bessel1841"}
];


This short function will convert Gauss-Krüger-Positions into a valid Mathematica position which can then be converted using GeoPosition or referenced for calculation of distances using GeoDistance[pos1, pos2].

Here in Germany the central Meridians will be spaced 3° apart and one can recognize this in the first digit of the Right-value of the coordinates which has to be multiplied by 3 to find the central Meridian.

In order to avoid negative Right-values a False Easting is usually given; in Germany it is 500 000.

• As a side note: For some reason Mathematica seems not to be able to convert the gaussKruegerPosition into a WGS84-Position. GeoPosition[ gaussKruegerPosition[{3513495, 5405227}, 9, 500000], "WGS84"] returns the error "GeoPosition::invdtm:Unknown geodetic datum "WGS84". Use GeodesyData["Datum"] for a list of available named datums." This is strange as "WGS84" is of course explicitly listed under GeodesyData[] and accepted for GeoPositions. A bug? – gwr May 22 '12 at 14:30
• Another observation is that it seems people at Wolfram Research have gotten the axes wrong. In geodesy as far as I have learned from web-research the x-axis should point north and the y-axis should point east. Have they missed that? – gwr May 23 '12 at 7:37