Keven Corazza
Posts: 11
Joined: Tue Oct 28, 2008 5:28 pm

WGS84 -> Italian/Custom grid

Thu Oct 30, 2008 5:30 pm

Hi I'm testing the coordinate conversion of GPStools.

The Italian West zone has the following paramters:

Datum: ROME40
Datum dx=-87;
Datum dy=-98;
Datum dz=-121

Ellipsoid: International
Semimajor axis: 6378388
E2=0.08226888960733730

Grid: Italian West
FalseEasting=1500000;
ScaleFactor=0.9996;
LongitudeOfOrigin=9°
Projection: TraverseMercatore

I wrote my code in the following way:

GpsToolsNET.CustomDatum cd=new CustomDatum();
cd.DeltaX=-87;
cd.DeltaY=-98;
cd.DeltaZ=-121;
cd.E2=0.08226888960733730;
cd.SemiMajorAxis=6378388;

GpsToolsNET.CustomGrid cg=new CustomGrid();
cg.Algorithm=Algorithm.TRANSVERSE_MERCATOR;
cg.CustomDatum=cd;
cg.FalseEasting=1500000;
cg.ScaleFactor=0.9996;
cg.LongitudeOfOrigin=9;

GpsToolsNET.Position objPosX=new Position();
objPosX.Datum=Datum.WGS_84;
objPosX.SetLatitudeDMS(45,20,13.8907,"N");
objPosX.SetLongitudeDMS(11,51,05.1400,"E");

objPosX.Grid = (GpsToolsNET.Grid) ddGrid.SelectedIndex;

MessageBox.Show("E:"+objPosX.Easting.ToString("F3")+"
N:""+objPosX.Northing.ToString("F3"));

As you can see I would like to check the result of the conversion for the following WGS84 coordinates

Lat: 45°20'13.8907"
Long: 11°51'05.1400"

I get this results:

E: 1719191.393
N: 4984426.001

I'm expecting to have the following coordinates (checked with several softwares)

E: 1723497.903
N: 5024563.336

If I use the predefined Grid for Italy that is ITALIAN_GRID_ZONE_1 I get the following result:

E: 1723444.980
N: 5024383.918

For this last case I suppose that you are using different datum paramters...

Anyway I would like to know hot to set CustomGrid and CustomDatum to get the right results.

Thankyou in advance.

Regards

Keven Corazza

Keven Corazza
Posts: 11
Joined: Tue Oct 28, 2008 5:28 pm

RE: WGS84 -> Italian/Custom grid

Fri Oct 31, 2008 4:51 pm

I found the problem: the E2 parameter was wrong.

Keven Corazza

Return to “GpsTools”