Пример #1
0
        public void EpsgExample_1_3_5_3_Test()
        {
            var projection = new TransverseMercatorSouth(
                new GeographicCoordinate(0, 0.506145483),
                new Vector2(0, 0),
                1,
                new SpheroidEquatorialInvF(6378137, 298.25722356)
            );
            var expected = new Point2(2847342.74, 71984.49);
            var input = new GeographicCoordinate(-0.449108618, 0.493625066);

            var result = projection.TransformValue(input);

            Assert.AreEqual(expected.X, result.X, 0.003);
            Assert.AreEqual(expected.Y, result.Y, 0.002);
        }
Пример #2
0
        public void EpsgExample_1_3_5_3_InverseTest()
        {
            var projection = new TransverseMercatorSouth(
                new GeographicCoordinate(0, 0.506145483),
                new Vector2(0, 0),
                1,
                new SpheroidEquatorialInvF(6378137, 298.25722356)
                );
            var input    = new Point2(2847342.74, 71984.49);
            var expected = new GeographicCoordinate(-0.449108618, 0.493625066);

            var result = projection.GetInverse().TransformValue(input);

            Assert.AreEqual(expected.Latitude, result.Latitude, 0.003);
            Assert.AreEqual(expected.Longitude, result.Longitude, 0.002);
        }