Checks if a geographic coordinate is inside the specified NADCON region.
true - if the geographic coordinate is inside the specified NADCON region, false - if it is outside the specified NADCON region, or an error occurred
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).
This sample shows how to call the ApsNadcon.IsInsideNadconRegion 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.IsInsideNadconRegion(latInDeg, lonInDeg, nadconRegion, out errorMessage))
{
Console.WriteLine("Is outside or error: " + errorMessage);
}
else
{
Console.WriteLine("Inside");
}
ApsNadcon Class | ApsNadcon Namespace