globalvision
Posts: 12
Joined: Wed Sep 21, 2005 6:55 pm
Location: Slovenia

Custom datum and grid struggle

Thu Nov 09, 2006 4:31 pm

Hi,
we are trying to find way out how to convert from WGS 84 to Slovene National grid.
We have tried all of the available information on Esri Pages as suggested. But no luck. The result is not even close to results which are generated by CoordTrans 2.3.

It would be a great help if correct figures could be pasted to the places marked by ???.

Here is the code
'................................................................
Private Sub btnWgsGK5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWgsGK5.Click

<font color="blue">' WGS84 -> Balkan Zone 5 (or Slovenia Grid)</font id="blue">
Dim pos As New GpsToolsNET.Position

<font color="limegreen">' input</font id="limegreen">
pos.Datum = Datum.WGS_84
pos.Longitude = 14
pos.Latitude = 46

<font color="limegreen">' output:</font id="limegreen">
<font color="limegreen">' 1. define custom datum ???</font id="limegreen">
Dim d_mgi As New GpsToolsNET.CustomDatum
d_mgi.SemiMajorAxis = ???
Dim f As Double = ???
d_mgi.E2 = Math.Abs(f ^ 2 - 2 * f)
d_mgi.DeltaX = ???
d_mgi.DeltaY = ???
d_mgi.DeltaZ = ???
d_mgi.RotX = ???
d_mgi.RotY = ???
d_mgi.RotZ = ???

<font color="limegreen">' 2. define custom grid ???</font id="limegreen">
Dim slo_grid As New GpsToolsNET.CustomGrid
slo_grid.Algorithm = GpsToolsNET.Algorithm.TRANSVERSE_MERCATOR
slo_grid.Datum = Datum.CUSTOM_DATUM
slo_grid.CustomDatum = d_mgi
slo_grid.FalseEasting = ???
slo_grid.FalseNorthing = ???
slo_grid.ScaleFactor = ???
slo_grid.LongitudeOfOrigin = ???

<font color="limegreen">' 3. convert</font id="limegreen">
pos.CustomGrid = slo_grid
Dim ee As Double = pos.Easting
Dim nn As Double = pos.Northing

' According to your application CoordTrans v2.3, result should be:
' EASTING = 5422916,38
' NORTHING = 5095581,33

End Sub
'.....................................................

Regards
Dusan

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Custom datum and grid struggle

Thu Nov 09, 2006 4:35 pm

If you have CoordTrans you have the information you need.
Just click Tools -> Manage grid and Manage datum to find the parameters you're looking for.

Regards,
Jonas
Franson Support

Return to “GpsTools”