Determines NADCON region to which the specified geographic coordinate belongs.
true - if the NADCON region is found, false - if it is not found, or an error happend
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 geographic coordinate is outside all NADCON regions.
This sample shows how to call the ApsNadcon.FindNadconRegion method from C# code:
double latInDeg = 45.13;
double lonInDeg = -120.1313;
ApsNadconRegion nadconRegion = ApsNadconRegion.ConterminousUS;
string errorMessage = String.Empty;
Console.WriteLine("Lat: " + latInDeg.ToString());
Console.WriteLine("Lon: " + lonInDeg.ToString());
if (!ApsNadcon.FindNadconRegion(latInDeg, lonInDeg, out nadconRegion, out errorMessage))
{
Console.WriteLine("Not found: " + errorMessage);
}
else
{
Console.WriteLine("Found:" + nadconRegion);
}
ApsNadcon Class | ApsNadcon Namespace