コード例 #1
0
        public void EqualsByRefNormal()
        {
            Coordinate coordinate1 = new GeodeticCoordinate(10.0, 10.0);
            Coordinate coordinate2 = coordinate1;

            Assert.True(coordinate1.Equals((object)coordinate2));
        }
コード例 #2
0
        public void GridToGeodeticTest()
        {
            var coordinate = new GridCoordinate {
                X = 7094946, Y = 1693701, Projection = SwedishProjections.RT90_25GonV
            };
            var expected = new GeodeticCoordinate {
                Latitude = 63.90786d, Longitude = 19.75247d
            };
            var actual = GaussKruger.GridToGeodetic(coordinate);

            Assert.IsTrue(expected.Equals(actual));
        }
コード例 #3
0
        public void CoordFromDistanceTest()
        {
            var start = new GeodeticCoordinate()
            {
                Latitude = 63.83451, Longitude = 20.24655
            };
            double bearing  = 140d;
            double distance = 1.3d;
            var    expected = new GeodeticCoordinate()
            {
                Latitude = 63.8256, Longitude = 20.2636
            };
            var actual = DistanceCalculator.CoordFromDistance(start, bearing, distance);

            Assert.IsTrue(expected.Equals(actual));
        }
コード例 #4
0
        public void EqualsOtherNull()
        {
            Coordinate coordinate1 = new GeodeticCoordinate(10.0, 10.0);

            Assert.False(coordinate1.Equals(null));
        }