|
Download the Eye4Software GPS Toolkit fully functional 30 day trial version for free |
|
Browse through the Eye4Software GPS Toolkit manual |
The Polar Stereographic Projection is a projection derived from the Stereographic Projection for use on the North- and South Pole.
To convert Polar Stereographic coordinates, the following parameters have to be set:
The following code sample (VBScript) shows how to use the Polar Stereographic Projection from the Eye4Software GPS Toolkit:
' This demo translates lat/lon coordinates (WGS84) to UPS South coordinates (WGS84) using
' polar stereographic projection
'
' This demo specifies a map grid based on the Polar Stereographic projection, by setting all geodetic parameters.
'
' If you want to convert using one of the 4000 grids that are included in the component,
' you should have a look at the demo_gridsimple.vbs demo (recommended for users with less or no experience in geodesy).
Option Explicit
Dim objDatum, objGridSrc, objGridDst, objProjection, objConstants
Set objDatum = 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 & " - Polar Stereographic Projection Demo"
WScript.Echo
' // Start of parameters part //
' Set Datum: WGS84
objDatum.Axis = 6378137.000
objDatum.Flattening = 298.257223563
' Set Source GridL: Latitude/Longitude ( WGS84 )
objGridSrc.Projection = objConstants.GPS_PROJECTION_NONE
objGridSrc.Datum = objDatum
' Set destination grid: UPS South ( WGS84 )
objGridDst.Projection = objConstants.GPS_PROJECTION_POLARSTEREOGRAPHIC
objGridDst.Datum = objDatum
objGridDst.FalseNorthing = 2000000.00
objGridDst.FalseEasting = 2000000.00
objGridDst.OriginLatitude = -90.0
objGridDst.OriginLongitude = 0.0
' Set Source coordinates (Geodetic WGS84)
objProjection.Latitude = -82.734375
objProjection.Longitude = 87.187500
' // End of parameters part //
' Perform the transformation
WScript.Echo "Convert from Latitude / Longitude to UPS South using polar stereographic 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."