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

Local Grid - D48 GaussKruger

Mon May 15, 2006 8:39 pm

Hi,
I would like to convert WGS84 data to GaussKruger D48 and back.
I know that GpsTools support this but I am not sure what should I do.

Here are the parameters:

5. zone (E13°30' - E16°30)

Projection: Transverse Mercator
Latitude of origin 0°
Longitude of origin 15°
Scale factor at meridian 0.9999
Units to meter scale 1
False East at origin 5 500 000 m
False North at origin 0 m

How can I do it in VB.NET using GpsTools (recently purchesed)?

Regards
Dusan [8D]

User avatar
johan
GpsGate
Posts: 14913
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Local Grid - D48 GaussKruger

Mon May 15, 2006 8:46 pm

Please read about the Position class in the reference manual for how to do coordinate conversions.

In your case this is a good starting point:
http://franson.com/gpstools/reference_manual.asp?comp=tools&class=Position&item=CustomGrid&platform=net

Regards,
Johan

Franson Support

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

RE: Local Grid - D48 GaussKruger

Mon May 15, 2006 9:47 pm

Thanks,

Hi,
I had a look at the documentation page.
In order to be sure that the conversion will work as needed here is the information I found for Coordinate Transformer.

MGI
Balkans Zone 5
Slovenia Grid

This is the area we would need the conversion.
Are the parameters needed to perform conversion available from Franson ?

Dusan [:)]

User avatar
johan
GpsGate
Posts: 14913
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Local Grid - D48 GaussKruger

Mon May 15, 2006 9:50 pm

Please download and take a look at CoordTrans. It contains thousands of parameters for different grids. Take a close look at "Manage Grids" in the main dialog menu.

http://franson.com/coordtrans

Regards,
Johan

Franson Support

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

RE: Local Grid - D48 GaussKruger

Tue May 16, 2006 5:31 pm

Hi,

I did as suggested. Downloading Coordinate Transformer, taking parameters out and writing custom conversion. Eastings differs from Coordinate Transformer for about 305 meters. The difference is constant.
Cordinate transformer works correctly. But the code below does not.
Where might be a catch.

MGI
Balkans Zone 5
Slovenia Grid

Here is the code:
..................................................................
Sub WGS84_2_GK5( _
ByVal inX As Double, ByVal inY As Double, ByRef outX As Double, ByRef outY As Double)
Dim pos As New Position
pos.Datum = Datum.WGS_84

pos.Longitude = inX
pos.Latitude = inY

Dim swe_grid As New CustomGrid
swe_grid.Algorithm = Algorithm.TRANSVERSE_MERCATOR
swe_grid.ScaleFactor = 0.9999
swe_grid.Datum = Datum.MGI
swe_grid.FalseEasting = 5500000
swe_grid.FalseNorthing = 0
swe_grid.LongitudeOfOrigin = 15
swe_grid.LatitudeOfOrigin = 0

pos.CustomGrid = swe_grid

outX = pos.Easting ' + 305.27633773
outY = pos.Northing
End Sub
....................................................

User avatar
johan
GpsGate
Posts: 14913
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: Local Grid - D48 GaussKruger

Tue May 16, 2006 5:38 pm

Carefully check the parameters, and use a CustomDatum object instead of Datum.MGI

Regards,
Johan

Franson Support

Return to “GpsTools”