Hi guys,
After reading about the differences in SpatialReference (planar, geodesic) and transformations and a lot of try and error I've found the solution in using GeometryEngine.LengthGeodesic() instead of Length()...
Reading this helped a little, but still I'm not sure why the following is happening as I'm analysing a very small area.
I have two points which are 900 meters appart. Then I project them to Wgs84 (AngularUnit) and WebMercator (LinearUnit) with the correct transformation.
var gauss2 = SpatialReference.Create(31466);
var point1Gauss2 = new MapPoint(2548675.907, 5717625.516, gauss2);
var point2Gauss2 = new MapPoint(2548033.679, 5718260.329, gauss2);
var polyLineGauss2 = new Polyline(new[] { point1Gauss2, point2Gauss2 });
var transMercator = TransformationCatalog.GetTransformation(gauss2, SpatialReferences.WebMercator);
var point1Mercator = (MapPoint) point1Gauss2.Project(SpatialReferences.WebMercator, transMercator);
var point2Mercator = (MapPoint) point2Gauss2.Project(SpatialReferences.WebMercator, transMercator);
var polyLineMercator = new Polyline(new[] { point1Mercator, point2Mercator });
var polyLineMercatorProjected = (Polyline) polyLineGauss2.Project(SpatialReferences.WebMercator, transMercator);
var transWgs84 = TransformationCatalog.GetTransformation(gauss2, SpatialReferences.Wgs84);
var point1Wgs84 = (MapPoint) point1Gauss2.Project(SpatialReferences.Wgs84, transWgs84);
var point2Wgs84 = (MapPoint) point2Gauss2.Project(SpatialReferences.Wgs84, transWgs84);
var polyLineWgs84 = new Polyline(new[] { point1Wgs84, point2Wgs84 });
var polyLineWgs84Projected = (Polyline) polyLineGauss2.Project(SpatialReferences.Wgs84, transWgs84);
var gauss2Length = polyLineGauss2.Length();
var gauss2LengthG = polyLineGauss2.LengthGeodetic();
var mercatorLength = polyLineMercator.Length();
var mercatorLengthG = polyLineMercator.LengthGeodetic();
var mercatorProjectedLength = polyLineMercatorProjected.Length();
var mercatorProjectedLengthG = polyLineMercatorProjected.LengthGeodetic();
var wgs84Length = polyLineWgs84.Length();
var wgs84LengthG = polyLineWgs84.LengthGeodetic();
var wgs84ProjectedLength = polyLineWgs84Projected.Length();
var wgs84ProjectedLengthG = polyLineWgs84Projected.LengthGeodetic();
The output is:

I quite do not understand why Length() in WebMercator gives 1452 meters (> 50% too long) while the original Gauss2 Length() is correct with 903 meters.
When I project the WebMercator points back to Gauss2 Length() gives the correct 903 meters. So it can be only an issue of the SpatialReference in itself!
So it really is the distortion described in the link above? And it is so bad?
Thanks for educating me here
Soko