Ejemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public DoubleDiffer()
 {
     ProcessCount            = 4;
     this.InputFileExtension = "*.??O;*.??d.Z";
     FileExtension           = Setting.RinexOFileFilter;
     InputFileManager        = new InputFileManager();
     BaseLineSelector        = new BaseLineSelector(BaseLineSelectionType.中心站法, "", "");
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 执行
        /// </summary>
        /// <returns></returns>
        public override bool Do()
        {
            var reader = new DoubleDifferParamReader(this.OperationInfo.ParamFilePath);

            foreach (var item in reader)
            {
                CurrentParam      = item;
                this.ProcessCount = item.ParallelProcessCount;

                var inPath  = item.InputPath;
                var outPath = item.OutputPath;

                if (OupputDirecory == null)
                {
                    if (Geo.Utils.FileUtil.IsDirectory(outPath))
                    {
                        this.OupputDirecory = outPath;
                    }
                    else
                    {
                        OupputDirecory = Path.GetDirectoryName(outPath);
                    }
                }

                //读取预知信息
                this.ObsFiles = InputFileManager.GetLocalFilePathes(inPath, FileExtension);
                InputObsFiles = new Dictionary <string, string>();
                foreach (var file in ObsFiles)
                {
                    var key = Path.GetFileName(file);
                    InputObsFiles.Add(key, file);
                }
                if (File.Exists(item.BaselinePath))
                {
                    this.Baselines = new BaselineReader(item.BaselinePath).ReadAll();
                }
                else
                {
                    this.Baselines = BaseLineSelector.GetFileBaselines(ObsFiles.ToArray());
                }

                if (File.Exists(item.SiteInfoPath))
                {
                    SiteInfoDics = new Dictionary <string, SiteInfo>();
                    List <SiteInfo> sites = new SiteInfoReader(item.SiteInfoPath).ReadAll();
                    foreach (var site in sites)
                    {
                        SiteInfoDics.Add(site.SiteName.ToUpper(), site);
                    }
                }

                //计算
                if (CurrentParam.IsParallel)
                {
                    ParallelCompute(item, inPath, outPath);
                }
                else
                {
                    SerialProcess(item, inPath, outPath);
                }
            }
            return(true);
        }