Ejemplo n.º 1
0
            /// <summary>
            /// 高斯投影反算
            /// </summary>
            /// <param name="point">高斯平面坐标</param>
            /// <param name="L0">中央经线经度</param>
            /// <returns>经纬度坐标</returns>
            public Geo2Point GaussInverse(_2D_Point point, Angle L0)
            {
                double Bf      = Auxiliary.Get_Bf(ep.data.a, ep.data.e_2, point.X),
                       Mf      = Auxiliary.GetM(ep.data.a, ep.data.e_2, Bf),
                       Nf      = Auxiliary.GetN(ep.data.a, ep.data.e_2, Bf),
                       Nf_2    = Nf * Nf,
                       Nf_3    = Nf * Nf_2,
                       tf      = Auxiliary.Get_t(Bf),
                       tf_2    = tf * tf,
                       yitaf_2 = Auxiliary.GetYita2(ep.data.e2_2, Bf),
                       y       = point.Y,
                       y_2     = y * y,
                       y_3     = y * y_2,
                       cosBf   = Math.Cos(Bf);

                double B = Bf - tf * y_2 / 2 / Mf / Nf +
                           tf * (5 + 3 * tf_2 + yitaf_2 - 9 * yitaf_2 * tf_2) * y_2 * y_2 / 24 / Mf / Nf_3 -
                           tf * (61 + 90 * tf_2 + 45 * tf_2 * tf_2) * y_3 * y_3 / 720 / Mf / Nf_3 / Nf_2,

                       l = y / Nf / cosBf - (1 + 2 * tf_2 + yitaf_2) * y_3 / 6 / Nf_3 / cosBf +
                           (5 + 28 * tf_2 + 24 * tf_2 * tf_2 + 6 * yitaf_2 + 8 * yitaf_2 * tf_2) *
                           y_3 * y_2 / 120 / Nf_2 / Nf_3 / cosBf;

                return(new Geo2Point(Angle.ChangeToAngle(B), L0 + Angle.ChangeToAngle(l)));
            }
Ejemplo n.º 2
0
        public void ReadData(string path1, string path2)//读取像方数据文件,控制点,加密点
        {
            //StreamReader sr = new StreamReader(path1);
            var s = File.ReadAllLines(path1, Encoding.Default);

            oCount = s.Length;
            var ss = Regex.Split(s[0], " +");

            Count = (ss.Length - 4) / 2;
            for (int i = 0; i < Count; i++)
            {
                oIPoints.Add(new List <_2D_Point>());
                iPoints.Add(new List <_2D_Point>());
            }
            for (int i = 0; i < oCount; i++)
            {
                ss = Regex.Split(s[i], " +");
                pNames.Add(ss[0]);
                for (int j = 0; j < Count; j++)
                {
                    _2D_Point p = new _2D_Point();
                    p.X = double.Parse(ss[1 + 2 * j]);
                    p.Y = double.Parse(ss[2 + 2 * j]);
                    oIPoints[j].Add(p);
                }
                _3D_Point p3 = new _3D_Point();
                p3.X = double.Parse(ss[1 + 2 * Count]);
                p3.Y = double.Parse(ss[2 + 2 * Count]);
                p3.Z = double.Parse(ss[3 + 2 * Count]);
                oPoints.Add(p3);
            }

            s      = File.ReadAllLines(path2, Encoding.Default);
            pCount = s.Length;
            for (int i = 0; i < pCount; i++)
            {
                ss = Regex.Split(s[i], " +");
                pINames.Add(ss[0]);
                for (int j = 0; j < Count; j++)
                {
                    _2D_Point p = new _2D_Point();
                    p.X = double.Parse(ss[1 + 2 * j]);
                    p.Y = double.Parse(ss[2 + 2 * j]);
                    iPoints[j].Add(p);
                }
            }
        }
Ejemplo n.º 3
0
            /// <summary>
            /// 高斯邻带换算
            /// </summary>
            /// <param name="point">高斯平面上的点</param>
            /// <param name="L0">原中央经线经度</param>
            /// <param name="L1">新带中央经线经度</param>
            /// <returns>新带的高斯平面坐标</returns>
            public _2D_Point GaussBandConvert(_2D_Point point, Angle L0, Angle L1)
            {
                var bl = GaussInverse(point, L0);

                return(GaussPositive(bl, L1));
            }