|
Download the Eye4Software GPS Toolkit fully functional 30 day trial version for free |
|
Browse through the Eye4Software GPS Toolkit manual |
Transverse Mercator projections result from projecting the sphere onto a cylinder tangent to a central meridian. Transverse Mercator maps are often used to portray areas with larger north-south than east-west extent. Distortion of scale, distance, direction and area increase away from the central meridian. Transverse Mercator is one of the most used map projections around the globe.
Some projections that are derived from the Transverse Mercator projection are:
To convert Transverse Mercator coordinates, the following parameters have to be set:
The following code sample (VBScript) shows how to use the Transverse Mercator Projection from the Eye4Software GPS Toolkit:
Option Explicit
Dim objDatumSrc, objDatumDst, objGridSrc, objGridDst, objProjection, objConstants
Set objDatumSrc = CreateObject ( "Eye4Software.GpsDatumParameters" )
Set objDatumDst = CreateObject ( "Eye4Software.GpsDatumParameters" )
Set objGridSrc = CreateObject ( "Eye4Software.GpsGridParameters" )
Set objGridDst = CreateObject ( "Eye4Software.GpsGridParameters" )
Set objProjection = CreateObject ( "Eye4Software.GpsProjection" )
Set objConstants = CreateObject ( "Eye4Software.GpsConstants" )
WScript.Echo "Eye4Software GPS Toolkit " & objProjection.Version & " - Transverse Mercator Projection Demo"
WScript.Echo
' // Start of parameters part //
' Set Source Datum: WGS84
objDatumSrc.Axis = 6378137.000
objDatumSrc.Flattening = 298.257223563
' Set Source GridL: Latitude/Longitude
objGridSrc.Projection = 0
objGridSrc.Datum = objDatumSrc
' Set Destination Datum: WGS84
objDatumDst.Axis = 6378137.000
objDatumDst.Flattening = 298.257223563
' Set destination grid: UTM Zone 31N
objGridDst.Projection = objConstants.GPS_PROJECTION_TRANSVERSEMERCATOR
objGridDst.Datum = objDatumDst
objGridDst.FalseNorthing = 0
objGridDst.FalseEasting = 500000
objGridDst.OriginLatitude = 0
objGridDst.OriginLongitude = 3
objGridDst.ScaleFactor = 0.9996
' Set Source coordinates
objProjection.Latitude = 51.900000
objProjection.Longitude = 4.400000
' // End of parameters part //
' Perform the transformation
WScript.Echo "Convert from Latitude / Longitude to UTM Zone 31 using transverse mercator projection"
WScript.Echo
WScript.Echo "Latitude = " & objProjection.Latitude
WScript.Echo "Longitude = " & objProjection.Longitude
WScript.Echo
objProjection.TransformGrid objGridSrc, objGridDst
' Return the result
WScript.Echo "Result: " & objProjection.LastError & " (" & objProjection.LastErrorDescription & ")"
WScript.Echo
If ( objProjection.LastError = 0 ) Then
WScript.Echo "Northing = " & objProjection.Northing
WScript.Echo "Easting = " & objProjection.Easting
End If
WScript.Echo "Ready."