Converts the specified geographic coordinate to NAD27 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.ConvertToNad27 method from C# code:
double latInDegNad83 = 45.13;
double lonInDegNad83 = -120.1313;
ApsNadconRegion nadconRegion = ApsNadconRegion.ConterminousUS;
double latInDegNad27 = Double.NaN;
double lonInDegNad27 = Double.NaN;
double latShiftInSec = Double.NaN;
double lonShiftInSec = Double.NaN;
string errorMessage = String.Empty;
Console.WriteLine("Lat NAD83: " + latInDegNad83.ToString());
Console.WriteLine("Lon NAD83: " + lonInDegNad83.ToString());
if (!ApsNadcon.ConvertToNad27(latInDegNad83, lonInDegNad83, nadconRegion, out latInDegNad27, out lonInDegNad27, out latShiftInSec, out lonShiftInSec, out errorMessage))
{
Console.WriteLine("Error: " + errorMessage);
}
else
{
Console.WriteLine("Lat NAD27: " + latInDegNad27.ToString());
Console.WriteLine("Lon NAD27: " + lonInDegNad27.ToString());
}
ApsNadcon Class | ApsNadcon Namespace | ApsNadcon.ConvertToNad27 Overload List