Example #1
0
 /// <summary>
 /// Check if longitude and latitude in decimal degrees are within valid range
 /// </summary>
 /// <param name="decimal_degrees">longitude or latitude</param>
 /// <param name="bLat">True if latitude</param>
 /// <returns>true if value is correct</returns>
 static public bool CheckLonLatValidity(String decimal_degrees, bool bLat)
 {
     try
     {
         double coord = MyTools.ConvertToDouble(decimal_degrees);
         return(CoordConvHMI.CheckLonLatValidity(coord, bLat));
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #2
0
 /// <summary>
 /// Check if longitude and latitude in decimal degrees are within valid range
 /// </summary>
 /// <param name="decimal_degrees_lon">longitude in decimal degrees (-180 / +180)</param>
 /// <param name="decimal_degrees_lat">latitude in decimal degrees (-90 / +90)</param>
 /// <returns>true if both values are correct</returns>
 static public bool CheckLonLatValidity(String decimal_degrees_lon, String decimal_degrees_lat)
 {
     try
     {
         double lon = MyTools.ConvertToDouble(decimal_degrees_lon);
         double lat = MyTools.ConvertToDouble(decimal_degrees_lat);
         return(CoordConvHMI.CheckLonLatValidity(lon, lat));
     }
     catch (Exception)
     {
         return(false);
     }
 }