# How can I convert the Gaussian coordinates( Gauß-Krüger) to the WGS84 coordinates

I have a list of WGS84 and Gauss coordinates, but how to convert another WGS84 coordinates.
I want to use PROJ for conversion.

What is PROJ string like?

``````| Name | x         | y        | H       | Lat(N)      | Lon(E)      |
|------|-----------|----------|---------|-------------|-------------|
| X1   | -1676.071 | 4056.312 | 10.4167 | 31.2203175  | 121.5097212 |
| X2   | -1180.277 | 6330.704 | 10.4985 | 31.22477859 | 121.533594  |
| X3   | 472.067   | 6226.347 | 10.4846 | 31.23968209 | 121.5325094 |
| X4   | -73.008   | 4895.714 | 10.4383 | 31.23477255 | 121.5185389 |
| X5   | -646.523  | 5682.03  | 10.4711 | 31.22959614 | 121.5267891 |
| X6   | -398.196  | 5181.716 | 10.4711 | ?           | ?           |
``````
• Do you mean Gauß-Krüger when you talk about "Gaussian coordinates"? – Senshi Dec 23 '19 at 7:10
• Please, provide the coordinates as text in the post. With latitudes and longitudes already converted to decimal degrees (also in radians it would be great). So we can test our rudimentary methods to estimate the parameters for a custom transverse Mercator projection, knowing a set of source and mapped coordinates. – Gabriel De Luca Dec 24 '19 at 1:22
• @GabrielDeLuca Yes, I've updated the question – pagala2008 Dec 24 '19 at 2:51
• X seems to be the Northing and Y the Easting. That is common in topography, but for the projection will not be easy to handle (PROJ will not have problem in invert the axes, but if you want to show them in a map, e.g. in QGIS, I don't know how to do it). I will try to answer with X and Y axes exchanged. – Gabriel De Luca Dec 24 '19 at 4:30
• Excuse me. With my formulas: `+proj=tmerc +lon_0=121.46715048235 +lat_0=31.23543103004` must work. But I have 2 meters difference in Northing and seems a lot to me. I just hope it is a mistake of mine and there is no error in the calculation of the meridian arc in my proj version. – Gabriel De Luca Dec 24 '19 at 6:54

First, let's see what the mapping between a Y-X plane and a Lon-Lat plane would look like:

Notes:

• Y-X-H coordinates are Cartesian ones.

• Since you named it Gaussian coordinates, it is suposed to Y and X are Transverse Mercator projections of the geodetic coordinates.

• I am assuming that Y coordinates are Eastings and X coordinates are Northings. Also, H coordinates seems to be orthometric heights. But in a projected system we can go from the ellipsoid to a 2D plane and vice versa.

• If you had also ellipsoidal heights we can try a transformation between Cartesian geocentric coordinates (X-Y-Z) and a X-Y-H Cartesian system. Or we can try the projection but using a vertical datum to transform altitudes in heights. For now, we can only discard H coordinates.

Then, we generate the text files to be processed by PROJ:

lonlat.txt:

``````121.5097212 31.2203175
121.533594 31.22477859
121.5325094 31.23968209
121.5185389 31.23477255
121.5267891 31.22959614
``````

yx.txt:

``````4056.312 -1676.071
6330.704 -1180.277
6226.347 472.067
4895.714 -73.008
5682.03 -646.523
5181.716 -398.196
``````

Let's try the most simple way to estimate the projection: Using one given point as the center of the projection plane. We will use X4 point because its relative spatial location:

``````C:\test>proj -f "%.3f" +proj=tmerc +lon_0=121.5185389 +lat_0=31.23477255 +x_0=4895.714 +y_0=-73.008 lonlat.txt
4055.528        -1675.655
6330.157        -1180.975
6226.607        471.414
4895.714        -73.008
5681.749        -646.905
``````

We are defining a custom Transverse Mercator projection, centered on X4, with the X4 coordinates defining false Easting a Northing.

We can see indeterminations in the order of the meter. Analyzing the errors for each point, I think we could calculate the coordinates of X6 with an indeterminacy close to half a meter.

``````C:\test>proj -I -f "%.8f" +proj=tmerc +lon_0=121.5185389 +lat_0=31.23477255 +x_0=4895.714 +y_0=-73.008 yx.txt
121.50972942    31.22031375
121.53359975    31.22478488
121.53250667    31.23968798
121.51853890    31.23477255
121.52679205    31.22959959
121.52154084    31.23183955
``````

So, I think that X6 is almost a half meter away from LonLat = (121.52154084 31.23183955).

We can start playing with tests. For example, in a projection centered in X4, with X4 coordinates as false Easting and Northing, where is the Y-X = (0 0) point located?

``````C:\test>proj -I -f "%.8f" +proj=tmerc +lon_0=121.5185389 +lat_0=31.23477255 +x_0=4895.714 +y_0=-73.008
0 0
121.46715049    31.23542076
``````

So, can we use LonLat = (121.46715049 31.23542076) as the center of the projection without false Easting and Northing?

``````C:\test>proj -f "%.3f" +proj=tmerc +lon_0=121.46715049 +lat_0=31.23542076 +x_0=0 +y_0=0 lonlat.txt
4056.307        -1673.769
6330.706        -1178.031
6226.388        474.311
4895.748        -70.731
5682.050        -644.263
``````

We are seeing very good approximations in the Y coordinate, but very bad in the X.

This must be because when moving away from the central meridian, the latitudes deform. But I recognize that I was surprised by the magnitude of these deformation (also, by the accuracy in the Y outputs).

We could try assuming that the projection center is at Y = 5000? In a projection centered in X4, with X4 coordinates as false Easting and Northing, where is the Y-X = (5000 0) point located?

``````C:\test>proj -I -f "%.8f" +proj=tmerc +lon_0=121.5185389 +lat_0=31.23477255 +x_0=4895.714 +y_0=-73.008
5000 0
121.51963355    31.23543103
``````

Let's see then project using that center with false Easting 5000:

``````C:\test>proj -f "%.3f" +proj=tmerc +lon_0=121.51963355 +lat_0=31.23543103 +x_0=5000 +y_0=0 lonlat.txt
4055.512        -1675.646
6330.145        -1180.989
6226.612        471.402
4895.713        -73.007
5681.743        -646.912
``````

Ok, very similar than project centered in X4.

Conclusion:

• We can easily estimate a custom projection with an indetermination of the order of one meter, with and for the data given.

• Accuracy in Eastings and unaccuracy in Northings, when moving away the central meridian, attracts attention. An analysis is still pending in order to find a better solution to the problem.

• The recommended action is to consult the information provider about the type of transformation and the parameters used.

• One possible idea would be to use different ellipsoid. At least in Europe old Gauß-Krüger projections often used Bessel ellipsoid. – TomazicM Dec 25 '19 at 16:59