ApsGis.dll

TM.IsValidCentralMeridianInDeg Method

Checks if the provided central meridian (in decimal degrees) is valid, i.e. if it can be used in GIS calculations in the TM coordinate system.

public static bool IsValidCentralMeridianInDeg(
   double cmInDeg,
   out string errorMessage
);

Parameters

cmInDeg
a central meridian (in decimal degrees) to validate
errorMessage
an error message, passed by reference (out), that contains detailed information in case of the invalid central meridian

Return Value

true - if the central meridian is valid, false - if the central meridian is invalid

Remarks

The valid central meridian is a real number in the range from -180.0 (inclusive) to 180.0 (inclusive).

Example

This sample shows how to call the TM.IsValidCentralMeridianInDeg method from C# code:

string errorMessage = String.Empty;
double cmInDeg = 78.0;
            
if (TM.IsValidCentralMeridianInDeg(cmInDeg, out errorMessage))
{
    Console.WriteLine("Central Meridian is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

TM Class | ApsGis Namespace