예제 #1
0
 /// <summary>
 /// Rechecks all of the lat/lon coordinates in case the coordinate system has changed between
 /// geographic and projected.
 /// </summary>
 private bool CheckAllCoords(bool projected)
 {
     if (projected)
     {
         return(GeoUtilities.CheckProjCoordinate(textBoxLon1.Text) &&
                GeoUtilities.CheckProjCoordinate(textBoxLat1.Text) &&
                GeoUtilities.CheckProjCoordinate(textBoxLon2.Text) &&
                GeoUtilities.CheckProjCoordinate(textBoxLat2.Text) &&
                GeoUtilities.CheckProjCoordinate(textBoxLon3.Text) &&
                GeoUtilities.CheckProjCoordinate(textBoxLat3.Text));
     }
     else
     {
         return(GeoUtilities.CheckGeoCoordinate(textBoxLon1.Text) &&
                GeoUtilities.CheckGeoCoordinate(textBoxLat1.Text) &&
                GeoUtilities.CheckGeoCoordinate(textBoxLon2.Text) &&
                GeoUtilities.CheckGeoCoordinate(textBoxLat2.Text) &&
                GeoUtilities.CheckGeoCoordinate(textBoxLon3.Text) &&
                GeoUtilities.CheckGeoCoordinate(textBoxLat3.Text));
     }
 }
예제 #2
0
 /// <summary>
 /// Checks to see if the string is a valid coordinate.
 /// </summary>
 /// <param name="str">string to check</param>
 /// <returns>true if the string can be converted to a valid coordinate value</returns>
 private bool CheckCoords(string str)
 {
     return(GeoUtilities.CheckProjCoordinate(str) || GeoUtilities.CheckGeoCoordinate(str));
 }