private BaseLineNetManager LoadBaseLineNets()
        {
            var tables      = ObjectTableManager.Read(InputBaselinePathes, ".");
            var table       = tables.Combine();                                   //合并所有的表格
            var BaseLineNet = BaseLineNetManager.Parse(table, periodSpanMinutes); //时段网

            return(BaseLineNet);
        }
        private void button_showBadLines_Click(object sender, EventArgs e)
        {
            var path = this.fileOpenControl_input.FilePath;

            if (!File.Exists(path))
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("没有文件!在下无能为力!"); return;
            }

            if (AllSychTrilateralQualities == null)
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("请先计算后再试!"); return;
            }
            if (BaseLineNets != null)
            {
                BaseLineNets = LoadBaseLineNets();
            }

            if (ShowLayer != null && AllSychTrilateralQualities != null)
            {
                int netIndex = 0;
                List <LineString> lineStrings = new List <LineString>();
                foreach (var kv in AllSychTrilateralQualities)
                {
                    foreach (var line in kv.Value.KeyValues)
                    {
                        var  lineName = line.Key;
                        bool isbad    = false;
                        var  item     = line.Value;
                        {
                            if (!item.IsAllOk)
                            {
                                isbad = true;
                                break;
                            }
                        }

                        if (!isbad)
                        {
                            continue;
                        }

                        LineString lineString = BuildLineString(netIndex, lineName.GetBaseLineNames()[0]);


                        lineStrings.Add(lineString);
                    }
                    netIndex++;
                }
                if (lineStrings.Count == 0)
                {
                    return;
                }

                AnyInfo.Layer layer = AnyInfo.LayerFactory.CreateLineStringLayer(lineStrings, "基线", Color.OrangeRed, 5);
                ShowLayer(layer);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 多时段
        /// </summary>
        /// <returns></returns>
        public BaseLineNetManager GetBaseLineNetManager()
        {
            BaseLineNetManager result = new BaseLineNetManager();

            foreach (var item in this.KeyValues)
            {
                var period = new BufferedTimePeriod(item.Key, item.Key);
                result[period] = item.Value.GetBaseLineNet();
            }
            return(result);
        }
        private void button_run_Click(object sender, EventArgs e)
        {
            //手动输入
            double levelFixed    = this.namedFloatControl_fixedErrorLevel.GetValue();
            double verticalFixed = this.namedFloatControl_fixedErrorVertical.GetValue();
            double levelCoeef    = this.namedFloatControl_levelCoefOfProprotion.GetValue();
            double verticalCoeef = this.namedFloatControl_verticalCoefOfProprotion.GetValue();
            var    GnssReveiverNominalAccuracy = new GnssReveiverNominalAccuracy(levelFixed, verticalFixed, levelCoeef, verticalCoeef);

            var periodSpanMinutes = this.namedFloatControl_periodSpanMinutes.GetValue();

            var path = this.fileOpenControl_input.FilePath;

            if (!File.Exists(path))
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("没有文件!在下无能为力!"); return;
            }

            var pathes = this.fileOpenControl_input.FilePathes;

            var tables = ObjectTableManager.Read(pathes, ".");
            //合并所有的表格
            var rawTable = tables.Combine();

            BaseLineNets = BaseLineNetManager.Parse(rawTable, periodSpanMinutes);  //时段网

            this.AllSychTrilateralQualities = BaseLineNets.BuildTriangularClosureQualies(GnssReveiverNominalAccuracy);

            //同步环闭合差计算
            ObjectTableStorage totalSyncErrorTable = BaseLineNets.BuildSyncTrilateralErrorTable(AllSychTrilateralQualities);



            //复测基线较差,所有与第一个作差
            var PeriodsRepeatErrors = BaseLineNets.BuildRepeatBaselineError();
            var worst = PeriodsRepeatErrors.GetWorst();

            if (worst != null)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine("复测基线较差最弱边:" + worst.ToString());
                this.richTextBoxControl_textResult.Text += "\r\n" + sb.ToString();
            }

            this.PeriodsRepeatErrorslQualities = BaseLineNets.BuildRepeatBaselingQulities(PeriodsRepeatErrors, GnssReveiverNominalAccuracy);
            //生成所有表格
            ObjectTableStorage repeatErrorTable = BaseLineNets.BuildRepeatBaselingErrorTable(PeriodsRepeatErrorslQualities, GnssReveiverNominalAccuracy);

            this.objectTableControl_syncclosureError.DataBind(totalSyncErrorTable);
            this.objectTableControl_closureErrorOfRepeatBaseline.DataBind(repeatErrorTable);
            this.objectTableControl_rawData.DataBind(rawTable);

            this.tabControl_res.SelectedTab = this.tabPage_allSync;
        }
        private void button_showOnMap_Click(object sender, EventArgs e)
        {
            var path = this.fileOpenControl_input.FilePath;

            if (!File.Exists(path))
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("没有文件!在下无能为力!"); return;
            }

            if (BaseLineNets != null)
            {
                BaseLineNets = LoadBaseLineNets();
            }

            if (ShowLayer != null && BaseLineNets != null)
            {
                List <AnyInfo.Geometries.Point> pts = new List <AnyInfo.Geometries.Point>();
                int           netIndex   = 0;
                List <string> addedNames = new List <string>();
                foreach (var kv in BaseLineNets.KeyValues)
                {
                    foreach (var line in kv.Value)
                    {
                        var name = netIndex + "-" + line.BaseLineName.RovName;
                        if (!addedNames.Contains(name))
                        {
                            pts.Add(new AnyInfo.Geometries.Point(line.EstimatedGeoCoordOfRov, null, name));
                            addedNames.Add(name);
                        }
                        name = netIndex + "-" + line.BaseLineName.RefName;
                        if (!addedNames.Contains(name))
                        {
                            var geoCoord = CoordTransformer.XyzToGeoCoord(line.ApproxXyzOfRef);
                            pts.Add(new AnyInfo.Geometries.Point(geoCoord, null, name));
                            addedNames.Add(name);
                        }
                    }
                    netIndex++;
                }
                if (pts.Count == 0)
                {
                    return;
                }
                AnyInfo.Layer layer = AnyInfo.LayerFactory.CreatePointLayer(pts);
                ShowLayer(layer);
            }
        }
Beispiel #6
0
        private void button_read_Click(object sender, EventArgs e)
        {
            var span = namedFloatControl_periodSpanMinutes.GetValue();

            BaseLineNet = new BaseLineNetManager();
            int netIndex = 0;

            foreach (var path in BaseLinePathes)
            {
                LgoAscBaseLineFileReader reader = new LgoAscBaseLineFileReader(path);
                BaseLineFile = reader.Read();
                var mgr = BaseLineFile.GetBaseLineNetManager();
                BaseLineNet.Add(mgr);
                netIndex++;
            }

            objectTableControl_sites.DataBind(BaseLineNet.GetSiteTable());
            this.objectTableControl_rawData.DataBind(BaseLineNet.GetLineTable());
        }
        private void button_showLines_Click(object sender, EventArgs e)
        {
            var path = this.fileOpenControl_input.FilePath;

            if (!File.Exists(path))
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("没有文件!在下无能为力!"); return;
            }

            if (BaseLineNets != null)
            {
                BaseLineNets = LoadBaseLineNets();
            }

            if (ShowLayer != null && BaseLineNets != null)
            {
                int netIndex = 0;
                List <LineString> lineStrings = new List <LineString>();
                foreach (var kv in BaseLineNets.KeyValues)
                {
                    foreach (var line in kv.Value)
                    {
                        LineString lineString = BuildLineString(netIndex, line);
                        lineStrings.Add(lineString);
                    }
                    netIndex++;
                }
                if (lineStrings.Count == 0)
                {
                    return;
                }

                AnyInfo.Layer layer = AnyInfo.LayerFactory.CreateLineStringLayer(lineStrings, "基线");
                ShowLayer(layer);
            }
        }