Page 1 of 1

Need Help converting coordinates from MapInfo

Posted: Wed Oct 01, 2008 3:14 pm
by BenCour
Hello,

We are currently evaluating your tool in order to do a conversion from Lat/Long WGS 84 to a custom Projection defined by the following string in map info :

Coordsys Earth Projection 3, 999, 10, 0, 0, 0, "m", 13.333333, 47.5, 46, 49, 400000, 400000

This line can be interpreted as follow :

Projection Type = 3 (Lambert Conformal Conic)
Projection Datum = 999 (Custom)
Ellipsoid # 10 = Bessel 1841 a=6377397.155 1/f 299.1528128 0.0033427731
deltaX = 0
deltaY = 0
deltaZ = 0
origin long 13.333333
origin lat 47.5
standard_parallel_1 = 46;
standard_parallel_2 = 49;
false easting 400000
false nothing 400000

Converting the following coordinates : 48.2171 16.3696
should give this : 625492 484036.3620
but instead we got this : 625692.575105678 473497.777106093

We tried the conversion with the following C# code :

GpsToolsNET.Position position = new GpsToolsNET.Position();
position.Datum = GpsToolsNET.Datum.WGS_84;
position.Grid = GpsToolsNET.Grid.UTM_NORTH;

position.Latitude = 48.2171;
position.Longitude = 16.3696;

GpsToolsNET.CustomDatum customDatum = new GpsToolsNET.CustomDatum();
customDatum.SemiMajorAxis = 6377397.155;
customDatum.E2 = 1 / 299.1528128;
customDatum.DeltaX = 0;
customDatum.DeltaY = 0;
customDatum.DeltaZ = 0;

GpsToolsNET.CustomGrid customGrid = new GpsToolsNET.CustomGrid();
customGrid.CustomDatum = customDatum;
customGrid.LatitudeOfOrigin = 47.5;
customGrid.LongitudeOfOrigin = 13.333333;
customGrid.LatitudeSP1 = 46;
customGrid.LatitudeSP2 = 49;
customGrid.FalseNorthing = 400000;
customGrid.FalseEasting = 400000;
customGrid.Algorithm = GpsToolsNET.Algorithm.LAMBERT_2SP;
position.CustomGrid = customGrid;

Do you have any idea what we might be doing wrong ?

Many thanks in advance for your help

Best regards,

Benoit

RE: Need Help converting coordinates from MapInfo

Posted: Thu Oct 09, 2008 7:58 pm
by BenCour
Bump !