Пример #1
0
        private void button_merge_Click(object sender, EventArgs e)
        {
            SinexFile fileMerged = null;

            foreach (var item in this.textBox_pathes.Lines)
            {
                SinexFile file = SinexReader.Read(item);
                if (fileMerged == null)
                {
                    fileMerged = file;
                }
                else
                {
                    fileMerged = SinexMerger.Merge(fileMerged, file, this.checkBox_eraseNonCoord.Checked);
                }
            }
            if (checkBox_showresult.Checked)
            {
                this.textBox_result.Text = fileMerged.ToString();
            }

            File.WriteAllText(this.textBox_savepath.Text, fileMerged.ToString());

            Geo.Utils.FormUtil.ShowIfOpenDirMessageBox(this.textBox_savepath.Text);
        }
Пример #2
0
        private void button_merge_Click(object sender, EventArgs e)
        {
            SinexFile a = SinexReader.ParseText(this.textBox_A.Text);
            SinexFile b = SinexReader.ParseText(this.textBox_B.Text);
            SinexFile c = SinexMerger.Merge(a, b);

            if (checkBox_show.Checked)
            {
                this.textBox_C.Text = c.ToString();
            }

            File.WriteAllText(this.textBox_mergePath.Text, c.ToString());

            Geo.Utils.FormUtil.ShowIfOpenDirMessageBox(this.textBox_mergePath.Text);
        }
Пример #3
0
        /// <summary>
        /// 构建参数平差观测方程,并进行平差计算。
        /// </summary>
        /// <param name="fileA"></param>
        /// <param name="fileB"></param>
        /// <returns></returns>
        private double[][] Adjust(SinexFile fileA, SinexFile fileB)
        {
            //检查一下是否只包含坐标,如否,则清理。
            if (!fileA.IsOnlyEstimateCoordValue)
            {
                fileA.CleanNonCoordSolutionValue();
            }
            if (!fileB.IsOnlyEstimateCoordValue)
            {
                fileB.CleanNonCoordSolutionValue();
            }

            double[][] A = SinexSubNetsUnion.GetCoeffMatrixOfParams(fileA, fileB);
            double[][] Q = SinexSubNetsUnion.GetCovaMatrixOfObs(fileA, fileB);
            double[][] obsMinusApriori = SinexSubNetsUnion.GetObsMinusApriori(fileA, fileB);
            var        pa = new ParamAdjuster();

            p = pa.Run(new AdjustObsMatrix(A, obsMinusApriori, Q));

            double[][] apriori = GetApriori(fileA, fileB);


            //MatrixUtil.SaveToText(A, @"C:\A.txt");
            //MatrixUtil.SaveToText(Q, @"C:\Q.txt");
            //MatrixUtil.SaveToText(obsMinusApriori, @"C:\l.txt");
            //MatrixUtil.SaveToText(apriori, @"C:\D.txt");

            xyzs = GetXyzs(MatrixUtil.GetPlus(p.Estimated.OneDimArray, apriori));

            geoCoords = new List <GeoCoord>();
            foreach (var item in xyzs)
            {
                geoCoords.Add(CoordTransformer.XyzToGeoCoord(item));
            }

            result = SinexMerger.EmergeBasic(fileA, fileB);
            return(apriori);
        }