Ejemplo n.º 1
0
        public void ConvertWgs84ToOsgb36()
        {
            var GreenwichWGS84  = new LatLonEllipsoidal(51.4778, -0.0016, Datum.WGS84);            // default WGS84
            var GreenwichOSGB36 = GreenwichWGS84.ConvertDatum(Datum.OSGB36);

            Assert.AreEqual("51.4773°" + DMS.Separator + "N, 000.0000°" + DMS.Separator + "E", GreenwichOSGB36.ToString("d", 4));
        }
Ejemplo n.º 2
0
        public void C1E()
        {
            var Osgb    = new LatLonEllipsoidal(DMS.ParseDMS("52°39′27.2531″N"), DMS.ParseDMS("1°43′4.5177″E"), Datum.OSGB36);
            var GridRef = Osgb.ToGridRef();

            Assert.AreEqual(651409.903, GridRef.Easting);
        }
Ejemplo n.º 3
0
        public void C1N()
        {
            var Osgb    = new LatLonEllipsoidal(DMS.ParseDMS("52°39′27.2531″N"), DMS.ParseDMS("1°43′4.5177″E"), Datum.OSGB36);
            var GridRef = Osgb.ToGridRef();

            Assert.AreEqual(313177.270, GridRef.Northing);
        }
Ejemplo n.º 4
0
        public void DgRoundTripOsgb36Numeric()
        {
            OsGridRef         DgGridRef = OsGridRef.Parse("TQ 44359 80653");
            LatLonEllipsoidal DgOsgb    = DgGridRef.ToLatLon(Datum.OSGB36);

            Assert.AreEqual("544359,180653", DgOsgb.ToGridRef().ToString(0));
        }
Ejemplo n.º 5
0
 public void C1RoundTrip()
 {
     var Osgb    = new LatLonEllipsoidal(DMS.ParseDMS("52°39′27.2531″N"), DMS.ParseDMS("1°43′4.5177″E"), Datum.OSGB36);
     var GridRef = Osgb.ToGridRef();
     var OsGb2   = GridRef.ToLatLon(Datum.OSGB36);
 }