Public Function ToGreenwich(ByVal inputPoint As GeoCalcNET.GeodeticPoint, ByVal outputPoint As GeoCalcNET.GeodeticPoint) As Boolean
public System.Boolean ToGreenwich(GeoCalcNET.GeodeticPoint inputPoint, GeoCalcNET.GeodeticPoint outputPoint)
The ToGreenwich method converts a GeodeticPoint that uses this PrimeMeridian to one that uses the Greenwich Meridian. 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.
Private Sub GeoCalcNET_PrimeMeridian_ToGreenwich(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(35.6, -2.9)
If Not pm.ToGreenwich(pt1, pt2) Then
MessageBox.Show("unable to convert ToGreenwich")
End If
End Sub
private void GeoCalcNET_PrimeMeridian_ToGreenwich(GeoCalcNET.PrimeMeridian pm, GeoCalcNET.DataSourceComponent data)
{
GeoCalcNET.GeodeticPoint greenPt = data.GetGeodeticPoint("BMG", "GEODETIC_POINT_DEGREES");
GeoCalcNET.GeodeticPoint notGreenPt = data.GetGeodeticPoint("BMG", "GEODETIC_POINT_DEGREES");
notGreenPt.SetInUnits(1.06, 4.61);
if(! pm.ToGreenwich(notGreenPt, greenPt))
{
MessageBox.Show("error converting point to greenwich");
}
}