/// <summary> /// 根据vct文件中的特征值获取标志 /// </summary> /// <param name="sNodeName">所在标准文件的节点名称</param> /// <param name="strSymbol">vct文件中的特征值</param> /// <returns></returns> public string GetHeadMark(string strSymbol) { try { #region ///坐标系统类型 ConfigHeadItem pSystemTypeInfo = this.CoordSystemType; if (strSymbol == pSystemTypeInfo.Symbol) { return(pSystemTypeInfo.Mark); } ////坐标维数 ConfigHeadItem pSystemDimInfo = this.CoordinateDim; if (strSymbol == pSystemDimInfo.Symbol) { return(pSystemDimInfo.Mark); } ////版本 ConfigHeadItem pVersion = this.Version; if (strSymbol == pVersion.Symbol) { return(pVersion.Mark); } ///x坐标轴方向 ConfigHeadItem pAxisDirection = this.XAxisDirection; if (strSymbol == pAxisDirection.Symbol) { return(pAxisDirection.Mark); } ///y坐标轴方向 pAxisDirection = this.YAxisDirection; if (strSymbol == pAxisDirection.Symbol) { return(pAxisDirection.Mark); } ///坐标单位 ConfigHeadItem pCoordinateUnit = this.CoordinateUnit; if (strSymbol == pCoordinateUnit.Symbol) { return(pCoordinateUnit.Mark); } ///首子午线 ConfigInfo pConfig = this.PrimeMeridian; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///分隔符 pConfig = this.Sparator; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///数据标识 pConfig = this.DataMark; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///参考椭球 pConfig = this.Spheroid; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///投影类型 pConfig = this.Projection; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///投影参数 pConfig = this.ProjectionParator; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///高程基准 pConfig = this.Vertical; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///时间参考系 pConfig = this.TemporalReferenceSystem; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///最大坐标 pConfig = this.MaxCoordinate; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///最小坐标 pConfig = this.MinCoordinate; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///比例尺 pConfig = this.Scale; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///坐标偏移量 pConfig = this.Excurtion; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } ///土地规划批准时间 pConfig = this.PassTime; if (strSymbol == pConfig.Symbol) { return(pConfig.Mark); } return(""); #endregion } catch (Exception ex) { Logger.WriteErrorLog(ex); return(""); } }
/// <summary> /// 初始化头文件配置信息 /// </summary> /// <param name="pHeadNode"></param> /// <returns></returns> public bool Initial(XmlNode pHeadNode) { if (pHeadNode == null) return false; foreach (XmlNode pHeadInfo in pHeadNode.ChildNodes) { ///处理坐标系统类型 if (pHeadInfo.Name == "COORDINATESYSTEMTYPE") { m_CoordSystemType = new ConfigHeadItem(pHeadInfo); continue; } ///处理坐标维数 if (pHeadInfo.Name == "COORDINATEDIM") { m_CoordinateDim = new ConfigHeadItem(pHeadInfo); continue; } ///X坐标轴方向 if (pHeadInfo.Name == "XAXISDIRECTION") { m_XAxisDirection = new ConfigHeadItem(pHeadInfo); continue; } ///Y坐标轴方向 if (pHeadInfo.Name == "YAXISDIRECTION") { m_YAxisDirection = new ConfigHeadItem(pHeadInfo); continue; } ///坐标单位 if (pHeadInfo.Name == "COORDINATEUNIT") { m_CoordinateUnit = new ConfigHeadItem(pHeadInfo); continue; } ///版本 if (pHeadInfo.Name == "VERSION") { m_Version = new ConfigHeadItem(pHeadInfo); if (m_Version != null) { ////修改默认值为当前标准 string strMark = m_DBStandard.ToString(); foreach (ConfigInfo item in m_Version.ConfigInfoList) { if (strMark.Trim() == item.Mark.Trim()) { m_Version.Defualt = item.Symbol; break; } } } continue; } ///分隔符 if (pHeadInfo.Name == "SEPARATOR") { m_Sparator = GetConfigInfo(pHeadInfo); continue; } ///头信息分隔符 if (pHeadInfo.Name == "HEADSEPARATOR") { m_HeadSpilit = GetConfigInfo(pHeadInfo); continue; } ///参考椭球 if (pHeadInfo.Name == "SPHEROID") { m_Spheroid = GetConfigInfo(pHeadInfo); continue; } ///数据标识 if (pHeadInfo.Name == "DATAMERK") { m_DataMark = GetConfigInfo(pHeadInfo); continue; } /////版本 //if (pHeadInfo.Name == "VERSION") //{ // m_Version = GetConfigInfo(pHeadInfo); // continue; //} //投影类型 if (pHeadInfo.Name == "PROJECTION") { m_Projection = GetConfigInfo(pHeadInfo); continue; } ///首子午线 if (pHeadInfo.Name == "PRIMEMERIDIAN") { m_PrimeMeridian = GetConfigInfo(pHeadInfo); continue; } /////投影类型 //if (pHeadInfo.Name == "PROJECTIONTYPE") //{ // m_ProjectionType = GetConfigInfo(pHeadInfo); // continue; //} ///投影参数 if (pHeadInfo.Name == "PROJECTIONPARAMETOR") { m_ProjectionParator = GetConfigInfo(pHeadInfo); continue; } ///高程基准 if (pHeadInfo.Name == "VERTICAL") { m_Vertical = GetConfigInfo(pHeadInfo); continue; } ///时间参考系 if (pHeadInfo.Name == "TEMPORALREFERENCESYSTEM") { m_TemporalReferenceSystem = GetConfigInfo(pHeadInfo); continue; } ///最大坐标 if (pHeadInfo.Name == "MAXLOCAL") { m_MaxCoordinate = GetConfigInfo(pHeadInfo); continue; } ///最小坐标 if (pHeadInfo.Name == "MINLOCAL") { m_MinCoordinate = GetConfigInfo(pHeadInfo); continue; } ///比例尺 if (pHeadInfo.Name == "SCALE") { m_Scale = GetConfigInfo(pHeadInfo); continue; } ///偏移量 if (pHeadInfo.Name == "EXCURSION") { m_Excurtion = GetConfigInfo(pHeadInfo); continue; } ///土地规划批准时间 if (pHeadInfo.Name == "PASSTIME") { m_PassTime = GetConfigInfo(pHeadInfo); continue; } } return true; }
/// <summary> /// 初始化头文件配置信息 /// </summary> /// <param name="pHeadNode"></param> /// <returns></returns> public bool Initial(XmlNode pHeadNode) { if (pHeadNode == null) { return(false); } foreach (XmlNode pHeadInfo in pHeadNode.ChildNodes) { ///处理坐标系统类型 if (pHeadInfo.Name == "COORDINATESYSTEMTYPE") { m_CoordSystemType = new ConfigHeadItem(pHeadInfo); continue; } ///处理坐标维数 if (pHeadInfo.Name == "COORDINATEDIM") { m_CoordinateDim = new ConfigHeadItem(pHeadInfo); continue; } ///X坐标轴方向 if (pHeadInfo.Name == "XAXISDIRECTION") { m_XAxisDirection = new ConfigHeadItem(pHeadInfo); continue; } ///Y坐标轴方向 if (pHeadInfo.Name == "YAXISDIRECTION") { m_YAxisDirection = new ConfigHeadItem(pHeadInfo); continue; } ///坐标单位 if (pHeadInfo.Name == "COORDINATEUNIT") { m_CoordinateUnit = new ConfigHeadItem(pHeadInfo); continue; } ///版本 if (pHeadInfo.Name == "VERSION") { m_Version = new ConfigHeadItem(pHeadInfo); if (m_Version != null) { ////修改默认值为当前标准 string strMark = m_DBStandard.ToString(); foreach (ConfigInfo item in m_Version.ConfigInfoList) { if (strMark.Trim() == item.Mark.Trim()) { m_Version.Defualt = item.Symbol; break; } } } continue; } ///分隔符 if (pHeadInfo.Name == "SEPARATOR") { m_Sparator = GetConfigInfo(pHeadInfo); continue; } ///头信息分隔符 if (pHeadInfo.Name == "HEADSEPARATOR") { m_HeadSpilit = GetConfigInfo(pHeadInfo); continue; } ///参考椭球 if (pHeadInfo.Name == "SPHEROID") { m_Spheroid = GetConfigInfo(pHeadInfo); continue; } ///数据标识 if (pHeadInfo.Name == "DATAMERK") { m_DataMark = GetConfigInfo(pHeadInfo); continue; } /////版本 //if (pHeadInfo.Name == "VERSION") //{ // m_Version = GetConfigInfo(pHeadInfo); // continue; //} //投影类型 if (pHeadInfo.Name == "PROJECTION") { m_Projection = GetConfigInfo(pHeadInfo); continue; } ///首子午线 if (pHeadInfo.Name == "PRIMEMERIDIAN") { m_PrimeMeridian = GetConfigInfo(pHeadInfo); continue; } /////投影类型 //if (pHeadInfo.Name == "PROJECTIONTYPE") //{ // m_ProjectionType = GetConfigInfo(pHeadInfo); // continue; //} ///投影参数 if (pHeadInfo.Name == "PROJECTIONPARAMETOR") { m_ProjectionParator = GetConfigInfo(pHeadInfo); continue; } ///高程基准 if (pHeadInfo.Name == "VERTICAL") { m_Vertical = GetConfigInfo(pHeadInfo); continue; } ///时间参考系 if (pHeadInfo.Name == "TEMPORALREFERENCESYSTEM") { m_TemporalReferenceSystem = GetConfigInfo(pHeadInfo); continue; } ///最大坐标 if (pHeadInfo.Name == "MAXLOCAL") { m_MaxCoordinate = GetConfigInfo(pHeadInfo); continue; } ///最小坐标 if (pHeadInfo.Name == "MINLOCAL") { m_MinCoordinate = GetConfigInfo(pHeadInfo); continue; } ///比例尺 if (pHeadInfo.Name == "SCALE") { m_Scale = GetConfigInfo(pHeadInfo); continue; } ///偏移量 if (pHeadInfo.Name == "EXCURSION") { m_Excurtion = GetConfigInfo(pHeadInfo); continue; } ///土地规划批准时间 if (pHeadInfo.Name == "PASSTIME") { m_PassTime = GetConfigInfo(pHeadInfo); continue; } } return(true); }