示例#1
0
        /// <summary>
        /// 数据变动后,应该初始化测站名称
        /// </summary>
        public new void Init()
        {
            var SiteNames = GetSiteNames();

            //检查,确保测站名称对应的否坐标一致
            SiteCoordsManager siteCoords = new SiteCoordsManager();

            foreach (var net in this)
            {
                foreach (var baseLine in net)
                {
                    siteCoords.GetOrCreate(baseLine.BaseLineName.RefName).Add(baseLine.ApproxXyzOfRef);
                    siteCoords.GetOrCreate(baseLine.BaseLineName.RovName).Add(baseLine.ApproxXyzOfRov);
                }
            }
            foreach (var item in siteCoords)
            {
                if (item.Coords.Count > 0 && !item.IsCoordSame()) //坐标不一致
                {
                    SetSiteCoord(item.Name, item.Coord);          //采用第一个进行赋值
                }
            }
        }
示例#2
0
        /// <summary>
        /// 数据变动后,应该初始化测站名称
        /// </summary>
        public new void Init()
        {
            //检查,确保测站名称对应的否坐标一致
            SiteCoordsManager siteCoords = new SiteCoordsManager();

            foreach (var baseLine in this)
            {
                siteCoords.GetOrCreate(baseLine.BaseLineName.RefName).Add(baseLine.ApproxXyzOfRef);
                siteCoords.GetOrCreate(baseLine.BaseLineName.RovName).Add(baseLine.ApproxXyzOfRov);
            }
            foreach (var item in siteCoords)
            {
                if (item.Coords.Count > 0 && !item.IsCoordSame()) //坐标不一致
                {
                    SetSiteCoord(item.Name, item.Coord);          //采用第一个进行赋值
                }
            }
            //默认时段
            if (TimePeriod == null && this.Count > 0)
            {
                TimePeriod = new BufferedTimePeriod(First.ApporxNetPeriod);
            }
        }