예제 #1
0
        public void TestUTMToMGRS()
        {
            UtmPoint utmPoint = new UtmPoint("33U 0411777 5655984");
            String   mgrs     = utmPoint.ToMgrsString(7).Replace(" ", "");

            Assert.AreEqual("33UVS1177755984", mgrs);
        }
예제 #2
0
 public void TestUTMToMGRS()
 {
     UtmPoint utmPoint = new UtmPoint("33U 0411777 5655984");
     String mgrs = utmPoint.ToMgrsString(7).Replace(" ", "");
     Assert.AreEqual("33UVS1177755984", mgrs);
 }
예제 #3
0
        private void SetValues(GeoPoint geoPoint, UtmPoint utmPoint, object sender)
        {
            if (sender != edt_LatLong)
            {
                if (geoPoint == null)
                {
                    edt_LatLong.Text = String.Empty;
                }
                else
                {
                    edt_LatLong.Text = geoPoint.ToString();
                }
            }
            if (sender != edt_geohash)
            {
                if (geoPoint == null)
                {
                    edt_geohash.Text = String.Empty;
                }
                else
                {
                    edt_geohash.Text = geoPoint.GeoHash;
                }
            }
            if (sender != edt_UTM)
            {
                if (utmPoint == null)
                {
                    edt_UTM.Text = String.Empty;
                }
                else
                {
                    edt_UTM.Text = utmPoint.ToString();
                }
            }
            if (sender != edt_MGRS)
            {
                if (utmPoint == null)
                {
                    edt_MGRS.Text = String.Empty;
                }
                else
                {
                    edt_MGRS.Text = utmPoint.ToMgrsString(6);
                }
            }
            _Point           = geoPoint;
            btnFlyTo.Enabled = (_Point != null);

            lbl_L7018Value.Text = "Not available";
            if (geoPoint != null)
            {
                try
                {
                    var sheet = RtsdMapIndex.IndexL7018(geoPoint);
                    if (sheet != null)
                    {
                        lbl_L7018Value.Text = sheet.Name;
                    }
                }
                catch (ArgumentOutOfRangeException)
                {
                }
            }
        }