Converts the specified geographic coordinate to NAD83 datum in the speciifed NADCON region.
true - if the conversion succeeded, false - if it failed
The function verifies validity of the input arguments before running the conversion. The valid latitude is a real number in the range from -90.0 (inclusive) to 90.0 (inclusive). The valid longitude is a real number in the range from -180.0 (inclusive) to -180.0 (inclusive). The function returns false, if the original geographic coordinate is outside the specified NADCON region.
This sample shows how to call the ApsNadcon.ConvertToNad83 method from C# code:
double latInDegNad27 = 45.13;
double lonInDegNad27 = -120.1313;
ApsNadconRegion nadconRegion = ApsNadconRegion.ConterminousUS;
double latInDegNad83 = Double.NaN;
double lonInDegNad83 = Double.NaN;
double latShiftInSec = Double.NaN;
double lonShiftInSec = Double.NaN;
string errorMessage = String.Empty;
Console.WriteLine("Lat NAD27: " + latInDegNad27.ToString());
Console.WriteLine("Lon NAD27: " + lonInDegNad27.ToString());
if (!ApsNadcon.ConvertToNad83(latInDegNad27, lonInDegNad27, nadconRegion, out latInDegNad83, out lonInDegNad83, out latShiftInSec, out lonShiftInSec, out errorMessage))
{
Console.WriteLine("Error: " + errorMessage);
}
else
{
Console.WriteLine("Lat NAD83: " + latInDegNad83.ToString());
Console.WriteLine("Lon NAD83: " + lonInDegNad83.ToString());
}
ApsNadcon Class | ApsNadcon Namespace | ApsNadcon.ConvertToNad83 Overload List