Esempio n. 1
0
        /// <summary>
        /// 保存,StretchPoints以Ts部件存入数据库,ScreenPoints自己保存。
        /// </summary>
        public bool Store(ref YWCHEntEx db)
        {
            // 面
            // 根据地质对象类型,弹出数据库编录卡,保存信息(数据来源:私有模型),记录地质点guid
            var partSurfaceGuid = db.SkyFrmSymxDzdx(this.MarkerType);

            if (string.IsNullOrEmpty(partSurfaceGuid))
            {
                return(false);
            }
            var sourceSurfaceGuid = db.PublishPartVer(partSurfaceGuid);

            // 根据面点集构建ts文件
            this.TsSurface = new TsFile(WorldPoints, "TSurf", "M", MarkerType, Name, new List <string>
            {
                sourceSurfaceGuid // ?
            });
            TsSurface.WriteTsFile();

            // 上传面TS文件
            var isSurfacePartUploaded = db.SkyUploadPartVer(partSurfaceGuid, TsSurface.FilePath);

            ////线
            ////创建
            // var newLineGuid = Guid.NewGuid().ToString();
            // var partLineGuid = db.SkyNewObject(MarkerType, newLineGuid, "X", Name, GetColorRGB());
            // if (string.IsNullOrEmpty(partLineGuid))
            // return false;
            // var sourceLineGuid = db.PublishPartVer(partLineGuid);

            ////根据面点集构建ts文件
            // TsLine = new TsFile(WorldPoints, "PLine", "X", MarkerType, Name, new List<string>
            // {
            // sourceLineGuid //??
            // });
            // TsLine.WriteTsFile();

            ////上传面TS文件
            // var isLinePartUploaded = db.SkyUploadPartVer(partLineGuid, TsLine.FilePath);


            return(isSurfacePartUploaded);



            // 将ts文件与地质点关联
            // db.SkyAddConnect(1, TsLine.Guid, markerGuid);
        }
Esempio n. 2
0
        public virtual void Store(string dataSourceObjGuid, ref YWCHEntEx db)
        {
            //上传TS部件文件
            db.SkyUploadPartVer(Ts.Guid, Ts.FilePath);
            //创建地质对象(几何部件、界线、结构面等),并关联ts
            switch (MarkerType)
            {
            case "几何部件":
                //以标识点(BSD)形式创建几何部件地质对象(数据来源级别?)
                var sourceGuid = db.SkyNewObject("BSD", Guid, DbGeoType, Name, Color);
                db.SkyAddConnect(1, Ts.Guid, sourceGuid);    //?
                break;

            case "界线":
                StoreMarkerProcess(dataSourceObjGuid, "DXM", ref db);
                break;

            case "结构面":
                StoreMarkerProcess(dataSourceObjGuid, "JGM", ref db);
                break;

            case "崩塌":
                StoreMarkerProcess(dataSourceObjGuid, "BT", ref db);
                break;

            case "滑坡":
                StoreMarkerProcess(dataSourceObjGuid, "HP", ref db);
                break;

            case "泥石流":
                StoreMarkerProcess(dataSourceObjGuid, "NSL", ref db);
                break;

            case "构造带":
                StoreMarkerProcess(dataSourceObjGuid, "GZD", ref db);
                break;

            default:
                MessageBox.Show(@"Marker类型无效。", @"保存失败");
                return;
            }
        }