FromGreenwich Method

[VB]

Public Function FromGreenwich(ByVal inputPoint As GeoCalcNET.GeodeticPoint, ByVal outputPoint As GeoCalcNET.GeodeticPoint) As Boolean

[C#]

public System.Boolean FromGreenwich(GeoCalcNET.GeodeticPoint inputPoint, GeoCalcNET.GeodeticPoint outputPoint)

Description

The FromGreenwich method converts a GeodeticPoint that uses the Greenwich Meridian to a point that uses this PrimeMeridian.  The method takes two arguments, the first of which is the point to be converted, and the second of which is the point that will hold the result.  The method returns a boolean value indicating the success of the operation.

Example

[VB]

Private Sub GeoCalcNET_PrimeMeridian_FromGreenwich(ByVal pm As GeoCalcNET.PrimeMeridian, ByVal data As GeoCalcNET.DataSourceComponent)

Dim pt1 As GeoCalcNET.GeodeticPoint = data.GetGeodeticPoint("BMG", "GEODETIC_POINT_DEGREES")

Dim pt2 As GeoCalcNET.GeodeticPoint = data.GetGeodeticPoint("BMG", "GEODETIC_POINT_DEGREES")

pt1.SetInUnits(-45.67, 22.89)

If Not pm.FromGreenwich(pt1, pt2) Then

MessageBox.Show("unable to convert FromGreenwich")

End If

End Sub

[C#]

private void GeoCalcNET_PrimeMeridian_FromGreenwich(GeoCalcNET.PrimeMeridian pm, GeoCalcNET.DataSourceComponent data)

{

GeoCalcNET.GeodeticPoint greenPt = data.GetGeodeticPoint("BMG", "GEODETIC_POINT_DEGREES");

GeoCalcNET.GeodeticPoint notGreenPt = data.GetGeodeticPoint("BMG", "GEODETIC_POINT_DEGREES");

greenPt.SetInUnits(12.1, 4.6);

if(! pm.FromGreenwich(greenPt, notGreenPt))

{

MessageBox.Show("error converting point from greenwich");

}

}