This project is read-only.

Transformation to Gauss Kruger coordinates

Aug 28, 2010 at 6:03 PM


First, thank you very much for this beautiful piece of software!


I'm using GPS.NET 3.0 for a project related to ground investigation (dynamic probing, bore logs, leveling, etc.).

The requirements are to provide positioning information using the Gauss Kruger coordinate system [1].


1) Does anyone know of an existing open-source piece of code, which transforms the data coming out of GPS.NET 3.0 into the Gauss Kruger thingy?

2) Also, in what form does the data come out of GPS.NET? Is it the UTM coordinate system [2], using the WGS84 ellipsoid [3]?


[1] German link to Gauß Krüger:




Excuse if I got the meaning of the terms wrong, because currently those are just buzzwords for me, which I don't really understand.



Kasimier Buchcik

Aug 30, 2010 at 2:07 PM

I am not familiar with the Gauss Kruger coordinate system, so I can't address your first question. However, I can help with your second question.

GPS.Net uses the WGS84 ellipsoid by default, as this is the coordinate system used by most GPS systems around the world.  However, GeoFramework ships with over 70 different ellipsoids that you can use instead of WGS84 if you prefer.  These are available as static properties of the Ellipsoid class.  Most of the classes in GeoFramework and GPS.Net have properties or method overloads that allow you to specify which ellipsoid to use.


Sep 4, 2010 at 4:56 PM

Hi, thanks for the clarification.

Since we currently cannot find any resources in order to address the transformation to Gauss Kruger: It would also be possible for us to use ETRS89 (UTM).

Are there any examples available of how to transform the WGS84 data to ETRS89? I.e. which API to use the Datum.Lithuania1994_ETRS89 thingy with in order to get the desired format?


Kasimier Buchcik

Sep 13, 2010 at 9:55 AM

If you have no luck using Geoframeworks Take a look at DotSpatial.Projections to manually reproject coordinates. Not sure if the projection your looking for is supported though.

Sep 13, 2010 at 7:07 PM
Edited Sep 13, 2010 at 7:22 PM

@tidyup: thanks for the tip!

I looked at the example for projections with DotSpatial:
... but currently I don't even know where (and with what values) to apply the projection.

For the simple GPS mind I am: Could someone comment on the following sequence?

1) Subscribe to the following events in order to get the current Longitude/Latitude and Altitude.

GeoFramework.Gps.Nmea.NmeaInterpreter.PositionChanged --> (types: GeoFramework.Longitude and GeoFramework.Latitude)
GeoFramework.Gps.Nmea.NmeaInterpreter.AltitudeChanged --> (types: GeoFramework.Distance)
2) How do I get the correct x and y for the projection out of GeoFramework.Longitude and GeoFramework.Latitude? Do I use the ToDecimalDegrees(...) static methods here?

3) Is GeoFramework.Distance.Value already the correct z for the projection?

4) How do I know the "starting coordiante system"?
@BigstickCarpet mentioned that "GPS.Net uses the WGS84 ellipsoid by default"; what does this mean? Is this already the format of the raw data sent by the GPS receiver, or does GPS.NET transform the raw to WGS84?
Can I ask the NmeaInterpreter somehow what system it uses for the values it returns to me? How to convert the GPS.NET systems (ellipsoids?) to DotSpatial's?

Does the above make any sense at all?

Kasimier Buchcik

Sep 19, 2010 at 7:21 PM

OK, we ended up using a proprietary library for the transformation. Works fine now.

In case some other Germans need to convert to Gauß Krüger, here's what we did:

1) Get the degree values via the NmeaInterpreter.PositionChanged event:

    double latitide = Latitude.ToDecimalDegrees(posArgs.Position.Latitude.Hours, posArgs.Position.Latitude.Minutes, posArgs.Position.Latitude.Seconds, posArgs.Position.Latitude.Hemisphere);
    double longitude = Longitude.ToDecimalDegrees(posArgs.Position.Longitude.Hours, posArgs.Position.Longitude.Minutes, posArgs.Position.Longitude.Seconds, posArgs.Position.Longitude.Hemisphere);

2) Transform those values using:

    a)  As the source coordinate system: Geographic coordinates (Greenwich) [deg]
        As the source reference system (ellipsoid): WGS84 (World-wide GPS), geocentric
    b)  As the target coordinate system: e.g. Gauss-Krueger (3 degrees wide strips)
        As the target reference system (ellipsoid): e.g. DHDN/PD (DE Old States North <±1m), Rauenberg, Bessel
See the transformation table at

Kasimier Buchcik

Oct 12, 2010 at 10:12 AM
Edited Oct 12, 2010 at 10:14 AM

Sorry I didn't get back to you sooner. Though it looks like you have it all worked out from your last post.

1) Yes - they are the events you will need

2) Yes - use ToDecimalDegrees. All coordinates in GPS.NET are in WGS84 (most NMEA GPS units output in this format/coordinate system)

3) Yes - You can get it directly from Interpreter.Altitude from anywhere or get it in the GeoFramework.Gps.Nmea.NmeaInterpreter.AltitudeChanged event

4) The Position object Latitude and Longitude are in WGS84 so that is your source coordinate system.

 I notice that DotSpatial.Projections does appear to support several Gauss-Krueger projections as well as  ETRS89 (UTM) though I'm not familiar with them. You will need to insert the correct projection instead of "KnownCoordinateSystems.Projected.GausKrugerOther.ED19503DegreeGKZone10" or you can use a Proj4 string like var pEnd = new ProjectionInfo(Proj4String); See the example below:

        internal static void Wgs84ToGausKrugerOtherProjection(ref double[] xy, ref double[] z)
            var pStart = KnownCoordinateSystems.Geographic.World.WGS1984;
            var pEnd = KnownCoordinateSystems.Projected.GausKrugerOther.ED19503DegreeGKZone10;
            Reproject.ReprojectPoints(xy, z, pStart, pEnd, 0, 1);
        internal static Point Wgs84PositionToGausKrugerOtherProjection(Position pos, Distance altitude)
            var xy = new[] {pos.Longitude.DecimalDegrees, pos.Latitude.DecimalDegrees};
            var z = new[] {altitude.ToMeters().Value};
            Wgs84ToGausKrugerOtherProjection(ref xy, ref z);
            return new Point(xy[0], xy[1], z[0]);
Oct 14, 2010 at 3:45 PM
Edited Oct 14, 2010 at 3:53 PM

Thanks for the info!

I noticed that there are definitions like KnownCoordinateSystems.Projected.NationalGrids.DHDN3DegreeGaussZone1 in DotSpatial.
DotSpatial defines 5 zones (1-5) for DHDN3DegreeGauss. Each of the zones is to be used for a specific meridian.

The current problem is that beside those different zones, there are additional specific reference systems, which I can't find in DotSpatial.

Those reference systems are:
(1)  DHDN/PD (DE 1995 <±5m), Rauenberg, Bessel
(17) DHDN/PD (DE 2001 <±3m), Rauenberg, Bessel
(18) DHDN/PD (DE Old States South <±1m), Rauenberg, Bessel
(19) DHDN/PD (DE Old States Middle <±1m), Rauenberg, Bessel
(20) DHDN/PD (DE Old States North <±1m), Rauenberg, Bessel

Using the proprietary transformation engine mentioned above we get the following results:

Input: Longitude = 10.12, Latitude = 54.33

GeoDLL: RefSys: 1   Zone: 1   X: 1962821,78735231   Y: 6045622,80278157
GeoDLL: RefSys: 1   Zone: 2   X: 2767994,83493485   Y: 6030041,6344311
GeoDLL: RefSys: 1   Zone: 3   X: 3572930,8242991   Y: 6022785,46212423
GeoDLL: RefSys: 1   Zone: 4   X: 4377802,80611463   Y: 6023833,54547743
GeoDLL: RefSys: 1   Zone: 5   X: 5182782,15598189   Y: 6033188,88682741
GeoDLL: RefSys: 17   Zone: 1   X: 1962822,04144848   Y: 6045624,04358815
GeoDLL: RefSys: 17   Zone: 2   X: 2767995,14120756   Y: 6030042,86112402
GeoDLL: RefSys: 17   Zone: 3   X: 3572931,1822084   Y: 6022786,67368278
GeoDLL: RefSys: 17   Zone: 4   X: 4377803,21527423   Y: 6023834,7408594
GeoDLL: RefSys: 17   Zone: 5   X: 5182782,61615132   Y: 6033190,06494114
GeoDLL: RefSys: 18   Zone: 1   X: 1962825,20138621   Y: 6045623,75330313
GeoDLL: RefSys: 18   Zone: 2   X: 2767998,28040041   Y: 6030042,43701566
GeoDLL: RefSys: 18   Zone: 3   X: 3572934,29796559   Y: 6022786,11681397
GeoDLL: RefSys: 18   Zone: 4   X: 4377806,30489387   Y: 6023834,05190443
GeoDLL: RefSys: 18   Zone: 5   X: 5182785,67684865   Y: 6033189,24419752
GeoDLL: RefSys: 19   Zone: 1   X: 1962822,5339019   Y: 6045622,55308387
GeoDLL: RefSys: 19   Zone: 2   X: 2767995,56886897   Y: 6030041,35359738
GeoDLL: RefSys: 19   Zone: 3   X: 3572931,5450284   Y: 6022785,15056409
GeoDLL: RefSys: 19   Zone: 4   X: 4377803,51302498   Y: 6023833,20350726
GeoDLL: RefSys: 19   Zone: 5   X: 5182782,84841776   Y: 6033188,51467732
GeoDLL: RefSys: 20   Zone: 1   X: 1962820,59170808   Y: 6045623,5614382
GeoDLL: RefSys: 20   Zone: 2   X: 2767993,67477555   Y: 6030042,4420025
GeoDLL: RefSys: 20   Zone: 3   X: 3572929,70047678   Y: 6022786,31764049
GeoDLL: RefSys: 20   Zone: 4   X: 4377801,71956486   Y: 6023834,44812067
GeoDLL: RefSys: 20   Zone: 5   X: 5182781,10774987   Y: 6033189,83591249

With DotSpatial we get the following.

Spatial: Zone: DHDN_3_Degree_Gauss_Zone_1   X: 1962758,93435507   Y: 6045434,28254202
Spatial: Zone: DHDN_3_Degree_Gauss_Zone_2   X: 2767924,11896824   Y: 6029856,29168558
Spatial: Zone: DHDN_3_Degree_Gauss_Zone_3   X: 3572852,34860787   Y: 6022603,44530625
Spatial: Zone: DHDN_3_Degree_Gauss_Zone_4   X: 4377716,65040769   Y: 6023655,00967466
Spatial: Zone: DHDN_3_Degree_Gauss_Zone_5   X: 5182688,37817886   Y: 6033013,99755058

1) Does anyone know which of the reference systems DotSpatial uses here?

2) Are those additional reference systems expected to be added?
   Maybe adding those is easy for you guys - it's unfortunately way over my head.

Kasimier Buchcik

Oct 15, 2010 at 2:51 AM

I'm not sure Kasimier, you'll need to post specific questions about DotSpatial on that projects discussion forum to get the best answer. The project is very active so you should get a response and they have added projections on request in the past. FYI: GPS.NET will be added to the DotSpatial project as Dotspatial.Positioning (as soon as i get a chance to do the refactor!).