Converting Geocentric to Geographic

Jun 2, 2010 at 12:40 PM
Edited Jun 2, 2010 at 12:50 PM


How do I convert GeocentricCoordinateSystem to GeographicCoordinateSystem?

I do the following:

ICoordinateSystem wgs84geog = GeographicCoordinateSystem.WGS84;

ICoordinateSystem wgs84geoc = GeocentricCoordinateSystem.WGS84;

//transform creation

CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();

ICoordinateTransformation transGeoc2Geog = ctfac.CreateFromCoordinateSystems(wgs84geoc, wgs84geog);

double[] wgsCoords = _transGeoc2Geog .MathTransform.Transform(new double[] { geoCLocationX, geoCLocationY });

The problem is that the Y coordinate in the result (wgsCoords) is always 0.

What are the parameters required for the MathTransform.Transform mothod in this transformation?

Thanks, Eran.