Share |

Oblique Stereographic Projection - Eye4Software GPS Toolkit

Download Eye4Software GPS Toolkit free trial Download the Eye4Software GPS Toolkit fully functional 30 day trial version for free
Browse through the Eye4Software GPS Toolkit for Windows manual Browse through the Eye4Software GPS Toolkit manual

Oblique Stereographic Projection

The stereographic projection, in geometry, is a particular mapping (function) that projects a sphere onto a plane. The projection is defined on the entire sphere, except at one point — the projection point. Where it is defined, the mapping is smooth and bijective. It is conformal, meaning that it preserves angles. It is neither isometric nor area-preserving: that is, it preserves neither distances nor the areas of figures.

Oblique Stereographic Projection

Required Parameters

To convert Oblique Stereographic coordinates, the following parameters have to be set:

  • False Northing;
  • False Easting;
  • Latitude Of Origin;
  • Central Meridian;
  • Scale Factor.

Eye4Software GPS Toolkit

The following code sample (VBScript) shows how to use the Oblique Stereographic Projection from the Eye4Software GPS Toolkit:

' demo_stereographic.vbs
'
' This demo translates lat/lon coordinates (WGS84) to RDNAP coordinates (Amersfoort) using
' stereographic projection
'
' This demo specifies a map grid based on the 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 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 & " - Stereographic 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: Amersfoort
objDatumDst.Axis 		= 6377397.155
objDatumDst.Flattening  	= 299.1528183
objDatumDst.TranslationX	= 539.16
objDatumDst.TranslationY	=  26.15
objDatumDst.TranslationZ	= 465.89
objDatumDst.RotationX		= -1.304
objDatumDst.RotationY		= -0.103
objDatumDst.RotationZ		= -1.145
objDatumDst.ScaleFactor		= 4.0772

' Set destination grid: RDNAP
objGridDst.Projection		= objConstants.GPS_PROJECTION_STEREOGRAPHIC
objGridDst.Datum		= objDatumDst
objGridDst.FalseNorthing	= 463000.00
objGridDst.FalseEasting		= 155000.00
objGridDst.OriginLatitude	= 52.156161
objGridDst.OriginLongitude	=  5.387639
objGridDst.ScaleFactor		=  0.999908

' 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 RDNAP using 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."

Click here to show a list of all supported map projections.