コード例 #1
0
        public void gigs_sample_rev()
        {
            var degToRad   = Math.PI / 180.0;
            var projection = new AmericanPolyconic(
                new GeographicCoordinate(0, -54.0 * degToRad),
                new Vector2(5000000, 10000000),
                new SpheroidEquatorialInvF(6378.137 * 1000, 298.2572221)
                );

            var expected = new GeographicCoordinate(-6 * degToRad, -45 * degToRad);
            var input    = new Point2(5996378.71, 9328349.94);

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

            Assert.AreEqual(expected.Latitude, result.Latitude, 0.0006);
            Assert.AreEqual(expected.Longitude, result.Longitude, 0.00001);
        }
コード例 #2
0
        public void gigs_sample_rev()
        {
            var degToRad = Math.PI / 180.0;
            var projection = new AmericanPolyconic(
                new GeographicCoordinate(0, -54.0 * degToRad),
                new Vector2(5000000, 10000000),
                new SpheroidEquatorialInvF(6378.137 * 1000, 298.2572221)
            );

            var expected = new GeographicCoordinate(-6 * degToRad, -45 * degToRad);
            var input = new Point2(5996378.71, 9328349.94);

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

            Assert.AreEqual(expected.Latitude, result.Latitude, 0.0006);
            Assert.AreEqual(expected.Longitude, result.Longitude, 0.00001);
        }