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?
Answer
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.
Comments
Post a Comment