Arcgis Engine的拓扑检查类

使用方式

TopologyChecker topocheck = new TopologyChecker(mainlogyDataSet);//传入要处理的要素数据集
topocheck.PUB_TopoBuild("testTopo2");//构建拓扑的名字
topocheck.PUB_AddFeatureClass(null);//将该要素中全部要素都加入拓扑
//添加规则
topocheck.PUB_AddRuleToTopology(TopologyChecker.TopoErroType.点要素之间不相交, (topocheck.PUB_GetAllFeatureClass())[2], (topocheck.PUB_GetAllFeatureClass())[0]);
//获取生成的拓扑图层并添加
axMapControl1.Map.AddLayer(topocheck.PUB_GetTopoLayer());
axMapControl1.ActiveView.Refresh();

实现类代码:注意修改命名空间

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesGDB;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geoprocessor;
using ESRI.ArcGIS.DataManagementTools;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace EngineWindowsApplication1
{
    class TopologyChecker//功能:构建拓扑,拓扑检测
    {

        Geoprocessor GP_Tool = new Geoprocessor();//GP运行工具
        ITopology Topology;//生成的拓扑
        IFeatureDataset FeatureDataset_Main;//拓扑所属的要素数据集
        List<IFeatureClass> LI_FeatureClass = new List<IFeatureClass>();//要素数据集所包含的所有要素类
        List<string> LI_AllErrorInfo = new List<string>();//记录所有错误信息
        ITopologyLayer L_TopoLayer;//记录拓扑的图层

        #region 辅助函数

            /// <summary>
            /// 获取拓扑图层
            /// </summary>
            /// <returns>拓扑图层Ilayer</returns>
            public ILayer PUB_GetTopoLayer()
        {
            if (L_TopoLayer == null)
            {
                L_TopoLayer = new TopologyLayerClass();
                L_TopoLayer.Topology = Topology;
            }
            return L_TopoLayer as ILayer;
        }

        /// <summary>
        /// 构造拓扑检验类
        /// </summary>
        /// <param name="IN_MainlogyDataSet">输入的要素数据集</param>
        public TopologyChecker(IFeatureDataset IN_MainlogyDataSet)
        {
            FeatureDataset_Main = IN_MainlogyDataSet;
            if (LI_FeatureClass.Count != 0)
                LI_FeatureClass.Clear();
            PUB_GetAllFeatureClass();//获取数据集中所有包含的要素类
        }

        /// <summary>
        /// 获取数据集中所有包含的要素类
        /// </summary>
        /// <returns>返回数据集中所有包含的要素类 List<IFeatureClass></returns>
        public List<IFeatureClass> PUB_GetAllFeatureClass()
        {
            if (LI_FeatureClass.Count == 0)
            {
                IFeatureClassContainer Temp_FeatureClassContainer = (IFeatureClassContainer)FeatureDataset_Main;
                IEnumFeatureClass Temp_EnumFeatureClass = Temp_FeatureClassContainer.Classes;
                IFeatureClass Temp_FeatureClass = Temp_EnumFeatureClass.Next();

                while (Temp_FeatureClass != null)
                {
                    LI_FeatureClass.Add(Temp_FeatureClass);
                    Temp_FeatureClass = Temp_EnumFeatureClass.Next();
                }
                if (LI_FeatureClass.Count == 0)
                {
                    MessageBox.Show("空数据集!");
                }
            }

            return LI_FeatureClass;
        }
        #endregion

            #region 构建拓扑

            /// <summary>
            /// 在数据集中构建拓扑(GP方法)
            /// </summary>
            /// <param name="IN_TopoName">要生成拓扑的名称</param>
            /// <param name="IN_Tolerance">拓扑容差,可选,默认0.001</param>
            public void PUB_TopoBuildWithGP(string IN_TopoName, double IN_Tolerance = 0.001)
        {
            IWorkspace FeatureWorkSpace = FeatureDataset_Main.Workspace;
            ITopologyWorkspace TopoWorkSpace = FeatureWorkSpace as ITopologyWorkspace;
            try//若不存在同名拓扑则添加
            {
                Topology = TopoWorkSpace.OpenTopology(IN_TopoName);
                MessageBox.Show("已存在该拓扑,无法添加!");
            }
            catch
            {
                CreateTopology Topotool = new CreateTopology();//拓扑GP工具
                Topotool.in_dataset = FeatureDataset_Main; ;
                Topotool.out_name = IN_TopoName;
                Topotool.in_cluster_tolerance = IN_Tolerance;
                try
                {
                    GP_Tool.Execute(Topotool, null);
                    Topology = TopoWorkSpace.OpenTopology(IN_TopoName);
                }
                catch (COMException comExc)
                {
                    MessageBox.Show(String.Format("拓扑创建出错: {0} 描述: {1}", comExc.ErrorCode, comExc.Message));
                }
            }
        }

        /// <summary>
        /// 在数据集中构建拓扑
        /// </summary>
        /// <param name="IN_TopoName">要生成拓扑的名称</param>
        /// <param name="IN_Tolerance">拓扑容差,可选,默认0.001</param>
        public void PUB_TopoBuild(string IN_TopoName, double IN_Tolerance = 0.001)
        {
            ITopologyContainer topologyContainer = (ITopologyContainer)FeatureDataset_Main;
            try//若不存在同名拓扑则添加
            {
                Topology = topologyContainer.get_TopologyByName(IN_TopoName);
                MessageBox.Show("已存在该拓扑,无法添加!");
            }
            catch
            {
                try
                {
                    Topology = topologyContainer.CreateTopology(IN_TopoName, IN_Tolerance, -1, "");
                }
                catch (COMException comExc)
                {
                    MessageBox.Show(String.Format("拓扑创建出错: {0} 描述: {1}", comExc.ErrorCode, comExc.Message));
                }
            }
        }

        #endregion

            #region 添加要素类

            /// <summary>
            /// 添加特定要素类到拓扑中(GP方法)
            /// </summary>
            /// <param name="IN_TopologyClass">要添加的要素类的集合。输入null为该数据集下所有要素类</param>
            /// <param name="IN_XYRank">XY等级,默认为1。可选。</param>
            /// <param name="IN_ZRank">Z等级,默认为1。可选。</param>
            public void PUB_AddFeatureClassWithGP(List<IFeatureClass> IN_TopologyClass, int IN_XYRank = 1, int IN_ZRank = 1)
        {
            if (Topology != null)
            {
                AddFeatureClassToTopology Temp_AddClassToTopo = new AddFeatureClassToTopology();
                Temp_AddClassToTopo.in_topology = Topology;
                Temp_AddClassToTopo.xy_rank = IN_XYRank;
                Temp_AddClassToTopo.z_rank = IN_ZRank;
                if (IN_TopologyClass == null)
                {
                    IN_TopologyClass = LI_FeatureClass;
                }
                foreach (IFeatureClass EachFeatureCLS in IN_TopologyClass)
                {
                    if (LI_FeatureClass.Contains(EachFeatureCLS))
                    {
                        Temp_AddClassToTopo.in_featureclass = EachFeatureCLS;
                        try
                        {
                            GP_Tool.Execute(Temp_AddClassToTopo, null);
                        }
                        catch (COMException comExc)
                        {
                            MessageBox.Show(String.Format(((FeatureClass)EachFeatureCLS).Name + ":添加失败。 描述: {0}", comExc.Message));
                        }
                    }
                    else
                    {
                        MessageBox.Show("该要素类不属于目标要素集,无法添加!");
                    }
                }
            }
            else
            {
                MessageBox.Show("请先构建拓扑");
            }
        }

        /// <summary>
        /// 添加特定要素类到拓扑中
        /// </summary>
        /// <param name="IN_TopologyClass">要添加的要素类的集合。输入null为该数据集下所有要素类</param>
        /// <param name="IN_XYRank">XY等级,默认为1。可选。</param>
        /// <param name="IN_ZRank">Z等级,默认为1。可选。</param>
        /// <param name="IN_Weight">权重,默认为5。可选。</param>
        public void PUB_AddFeatureClass(List<IFeatureClass> IN_TopologyClass, int IN_XYRank = 1, int IN_ZRank = 1, double IN_Weight = 5)
        {
            if (Topology != null)
            {
                if (IN_TopologyClass == null)
                {
                    IN_TopologyClass = LI_FeatureClass;
                }
                foreach (IFeatureClass EachFeatureCLS in IN_TopologyClass)//逐项添加所选的要素类
                {
                    if (LI_FeatureClass.Contains(EachFeatureCLS))//只有相同要素数据集中的要素可以被添加
                    {
                        try
                        {
                            Topology.AddClass(EachFeatureCLS as IClass, IN_Weight, IN_XYRank, IN_ZRank, false);
                        }
                        catch (COMException comExc)
                        {
                            MessageBox.Show(String.Format(((FeatureClass)EachFeatureCLS).Name + ":添加失败。 描述: {0}", comExc.Message));
                        }
                    }
                    else
                    {
                        MessageBox.Show("该要素类不属于目标要素集,无法添加!");
                    }
                }
            }
            else
            {
                MessageBox.Show("请先构建拓扑");
            }
        }
        #endregion

            #region 添加规则并检验
            //GP法拓扑验证
            private void PRV_ValidateTopologyWithGP()
        {
            try
            {
                ValidateTopology Temp_Validate = new ValidateTopology(Topology);
                GP_Tool.Execute(Temp_Validate, null);
            }
            catch
            {
                MessageBox.Show("无法完成检测!");
            }
        }

        /// <summary>
        /// 单要素规则
        /// </summary>
        /// <param name="IN_RuleType">要添加的规则</param>
        /// <param name="IN_FeatureClass">添加规则的要素类</param>
        public void PUB_AddRuleToTopology(TopoErroType IN_RuleType, IFeatureClass IN_FeatureClass)
        {
            if (Topology != null)
            {
                ITopologyRule Temp_TopologyRule = new TopologyRuleClass();
                //设定参数
                Temp_TopologyRule.TopologyRuleType = PRV_ConvertTopologyRuleType(IN_RuleType);
                Temp_TopologyRule.Name = IN_RuleType.ToString();
                Temp_TopologyRule.OriginClassID = IN_FeatureClass.FeatureClassID;
                Temp_TopologyRule.AllOriginSubtypes = true;
                PRV_AddRuleTool(Temp_TopologyRule);
            }
            else
            {
                MessageBox.Show("请先构建拓扑");
            }
        }

        /// <summary>
        /// 双要素规则
        /// </summary>
        /// <param name="IN_RuleType">要添加的双要素规则</param>
        /// <param name="IN_FeatureClassA">第一个要素</param>
        /// <param name="IN_FeatureClassB">第二个要素</param>
        public void PUB_AddRuleToTopology(TopoErroType IN_RuleType, IFeatureClass IN_FeatureClassA, IFeatureClass IN_FeatureClassB)
        {
            if (Topology != null)
            {
                ITopologyRule Temp_TopologyRule = new TopologyRuleClass();
                //设定参数
                Temp_TopologyRule.TopologyRuleType = PRV_ConvertTopologyRuleType(IN_RuleType);
                Temp_TopologyRule.Name = IN_RuleType.ToString();
                Temp_TopologyRule.OriginClassID = IN_FeatureClassA.FeatureClassID;
                Temp_TopologyRule.DestinationClassID = IN_FeatureClassB.FeatureClassID;
                Temp_TopologyRule.AllOriginSubtypes = true;
                Temp_TopologyRule.AllDestinationSubtypes = true;
                PRV_AddRuleTool(Temp_TopologyRule);
            }
            else
            {
                MessageBox.Show("请先构建拓扑");
            }

        }

        //规则添加工具
        private void PRV_AddRuleTool(ITopologyRule IN_TopologyRule)
        {
            ITopologyRuleContainer Temp_TopologyRuleContainer = (ITopologyRuleContainer)Topology;//构建容器
            try
            {
                Temp_TopologyRuleContainer.get_CanAddRule(IN_TopologyRule);//不能添加的话直接报错
                try
                {
                    Temp_TopologyRuleContainer.DeleteRule(IN_TopologyRule);//删除已存在的规则后再添加
                    Temp_TopologyRuleContainer.AddRule(IN_TopologyRule);//规则存在的话直接报错
                }
                catch
                {
                    Temp_TopologyRuleContainer.AddRule(IN_TopologyRule);
                }
            }
            catch
            {
                MessageBox.Show("不支持添加");
            }
            PRV_ValidateTopologyWithGP();//添加完成后自动检验
            PUB_GetTopoLayer();//存储创建的拓扑图层
            PRV_GetError(IN_TopologyRule);//输出错误
        }

        //获取错误信息
        private void PRV_GetError(ITopologyRule IN_TopologyRule)
        {
            if (Topology != null)
            {
                IEnvelope Temp_Envolope = (this.Topology as IGeoDataset).Extent;
                IErrorFeatureContainer Temp_ErrorContainer = Topology as IErrorFeatureContainer;
                //获取所有信息
                IEnumTopologyErrorFeature Temp_EnumErrorFeature = Temp_ErrorContainer.get_ErrorFeatures(((IGeoDataset)FeatureDataset_Main).SpatialReference, IN_TopologyRule, Temp_Envolope, true, true);
                ITopologyErrorFeature Temp_ErrorFeature = Temp_EnumErrorFeature.Next();
                while (Temp_ErrorFeature != null)
                {
                    IFeature Temp_Feature = Temp_ErrorFeature as IFeature;
                    string Temp_ErrorInfo;
                    if (Temp_ErrorFeature.DestinationClassID != 0)//检测是否是双要素规则
                    {
                        Temp_ErrorInfo = Temp_ErrorFeature.OriginOID + "," + Temp_ErrorFeature.DestinationOID;
                    }
                    else
                        Temp_ErrorInfo = Temp_ErrorFeature.OriginOID.ToString();
                    LI_AllErrorInfo.Add(Temp_ErrorInfo);//将错误信息加入List
                    MessageBox.Show("错误:" + PRV_RecorverTopologyRuleType((int)(Temp_ErrorFeature.TopologyRuleType)) + "\r\n错误ID:" + Temp_ErrorInfo);
                    Temp_ErrorFeature = Temp_EnumErrorFeature.Next();
                }
            }
            else
            {
                MessageBox.Show("请先构建拓扑");
            }
        }

        /// <summary>
        /// 提取所有拓扑错误信息
        /// </summary>
        /// <returns>错误信息集合</returns>
        public List<string> PUB_GetErrorInfo()
        {
            return LI_AllErrorInfo;
        }

        #region 规则翻译

            //根据错误的中文描述转换成esri拓扑枚举
            private esriTopologyRuleType PRV_ConvertTopologyRuleType(TopoErroType IN_TopoRuleType)
        {
            esriTopologyRuleType Temp_TopoRuleType;
            switch (IN_TopoRuleType)
            {
                case TopoErroType.面要素之间无空隙:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaNoGaps;
                    break;
                case TopoErroType.任何规则:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAny;
                    break;
                case TopoErroType.要素大于最小容差:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTFeatureLargerThanClusterTolerance;
                    break;
                case TopoErroType.面要素间无重叠:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaNoOverlap;
                    break;
                case TopoErroType.第二个图层面要素必须被第一个图层任一面要素覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaCoveredByAreaClass;
                    break;
                case TopoErroType.面要素必须只包含一个点要素:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaContainOnePoint;
                    break;
                case TopoErroType.两图层面要素必须互相覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaAreaCoverEachOther;
                    break;
                case TopoErroType.第一个图层面要素必须被第一个图层任一面要素包含:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaCoveredByArea;
                    break;
                case TopoErroType.图层间面要素不能相互覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaNoOverlapArea;
                    break;
                case TopoErroType.线要素必须跟面图层边界的一部分或全部重叠:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineCoveredByAreaBoundary;
                    break;
                case TopoErroType.点要素必须落在面要素边界上:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTPointCoveredByAreaBoundary;
                    break;
                case TopoErroType.点要素必须落在面要素内:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTPointProperlyInsideArea;
                    break;
                case TopoErroType.线要素间不能有相互重叠部分:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoOverlap;
                    break;
                case TopoErroType.线要素之间不能相交:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoIntersection;
                    break;
                case TopoErroType.线要素不允许有悬挂点:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoDangles;
                    break;
                case TopoErroType.线要素不允许有假节点:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoPseudos;
                    break;
                case TopoErroType.第一个图层线要素应被第二个线图层线要素覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineCoveredByLineClass;
                    break;
                case TopoErroType.第一个图层线要素不被第二个线图层线要素覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoOverlapLine;
                    break;
                case TopoErroType.点要素应被线要素覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTPointCoveredByLine;
                    break;
                case TopoErroType.点要素应在线要素的端点上:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTPointCoveredByLineEndpoint;
                    break;
                case TopoErroType.面要素边界必须被线要素覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaBoundaryCoveredByLine;
                    break;
                case TopoErroType.面要素的边界必须被另一面要素边界覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaBoundaryCoveredByAreaBoundary;
                    break;
                case TopoErroType.线要素不能自重叠:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoSelfOverlap;
                    break;
                case TopoErroType.线要素不能自相交:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoSelfIntersect;
                    break;
                case TopoErroType.线要素间不能重叠和相交:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoIntersectOrInteriorTouch;
                    break;
                case TopoErroType.线要素端点必须被点要素覆盖:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineEndpointCoveredByPoint;
                    break;
                case TopoErroType.面要素内必须包含至少一个点要素:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAreaContainPoint;
                    break;
                case TopoErroType.线不能是多段:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoMultipart;
                    break;
                case TopoErroType.点要素之间不相交:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTPointDisjoint;
                    break;
                case TopoErroType.线要素必须不相交:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoIntersectLine;
                    break;
                case TopoErroType.线必须不相交或内部接触:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTLineNoIntersectOrInteriorTouchLine;
                    break;
                default:
                    Temp_TopoRuleType = esriTopologyRuleType.esriTRTAny;//将此规则赋予拓扑会直接报错
                    break;
            }
            return Temp_TopoRuleType;
        }

        public enum TopoErroType
        {
            任何规则=-1,
            要素大于最小容差 = 0,
            面要素之间无空隙 = 1,
            面要素间无重叠 = 3,
            第二个图层面要素必须被第一个图层任一面要素覆盖 = 4,
            两图层面要素必须互相覆盖 = 5,
            第一个图层面要素必须被第一个图层任一面要素包含 = 7,
            图层间面要素不能相互覆盖 = 8,
            线要素必须跟面图层边界的一部分或全部重叠 = 10,
            线要素必须在面内=11,
            点要素必须落在面要素边界上 = 13,
            点要素必须落在面要素内 = 15,
            面要素必须只包含一个点要素=16,
            线要素间不能有相互重叠部分 = 19,
            线要素之间不能相交 = 20,
            线要素不允许有悬挂点 = 21,
            线要素不允许有假节点 = 22,
            第一个图层线要素应被第二个线图层线要素覆盖 = 26,
            第一个图层线要素不被第二个线图层线要素覆盖 = 28,
            点要素应被线要素覆盖 = 29,
            点要素应在线要素的端点上 = 31,
            点要素之间不相交=34,
            点要素重合点要素=35,
            面要素边界必须被线要素覆盖 = 37,
            面要素的边界必须被另一面要素边界覆盖 = 38,
            线要素不能自重叠 = 39,
            线要素不能自相交 = 40,
            线要素间不能重叠和相交 = 41,
            线要素端点必须被点要素覆盖 = 42,
            面要素内必须包含至少一个点要素 = 43,
            线不能是多段 = 44,
            线要素必须不相交=45,
            线必须不相交或内部接触=46
        };

        //根据错误ID获取对应描述
        private string PRV_RecorverTopologyRuleType(int IN_TopoType)
        {
            //根据枚举值获取枚举名
            string Temp_ErrorDiscripe=Enum.GetName(typeof(TopoErroType), IN_TopoType);
            if (Temp_ErrorDiscripe == null)
                return (IN_TopoType.ToString());//若规则不在列表内则直接返回规则号
            else
                return Temp_ErrorDiscripe;
        }
        #endregion

            #endregion

    }
}

原文地址:https://www.cnblogs.com/King2019Blog/p/11732165.html

时间: 2024-10-13 21:22:28

Arcgis Engine的拓扑检查类的相关文章

ArcGIS Engine检索要素集、要素类和要素

转自原文 ArcGIS Engine检索要素集.要素类和要素 [csharp] view plain copy print? /// <summary> /// 获取所有要素集 /// </summary> /// <param name="workspace">工作空间对象</param> /// <returns>要素集列表</returns> public static List<IFeatureDat

ArcGIS Engine开发之旅04---ARCGIS接口详细说明

原文 ArcGIS Engine开发之旅04---ARCGIS接口详细说明 ArcGIS接口详细说明... 1 1.IField接口(esriGeoDatabase)... 2 2.IFieldEdit接口(esriGeoDatabase)... 2 3.IFields接口(esriGeoDatabase)... 2 4. IRow接口(esriGeoDatabase)... 3 5. ITable接口(esriGeoDatabase)... 3 6. IArea接口(esriGeometry)

利用ArcGIS Engine、VS .NET和Windows控件开发GIS应用

原文:利用ArcGIS Engine.VS .NET和Windows控件开发GIS应用 此过程说明适合那些使用.NET建立和部署应用的开发者,它描述了使用ArcGIS控件建立和部署应用的方法和步骤. 你可以在下面的目录下找到相应的样例程序: <安装目录>\DeveloperKit\Samples\Developer_Guide_Scenarios\ ArcGIS_Engine\Building_an_ArcGIS_Control_Application\Map_Viewer 注:ArcGIS样

ArcGIS Engine开发之地图基本操作(2)

地图数据的加载 1.加载地图文档 ArcGIS Engine支持加载多种类型的数据,有矢量数据的Coverage.Shapefile.dwg/dxf文件,栅格数据的BMP.GRID.控件数据库等.很多情况下加载通过ArcGIS桌面制作的地图文档是最合适的(*.mxd格式). 加载地图的第三种方式: 使用IMAPControl接口的LoadMxfile方法加载. 通过IMAPDocument接口加载. 使用ArcGIS Engine中封装好的类库资源ControlsOpenDocCommandCl

[转载]ArcGIS Engine 中的多线程使用

ArcGIS Engine 中的多线程使用 原文链接 http://anshien.blog.163.com/blog/static/169966308201082441114173/   一直都想写写AE中多线程的使用,但一直苦于没有时间,终于在中秋假期闲了下来.呵呵,闲话不说了,进入正题! 大家都了解到ArcGIS中处理大数据量时速度是相当的慢,这时如果你的程序是单线程的,那可就让人着急坏了,不知道处理到什么地步,不能操作其他的功能,无奈~~如果在这时你能够想到用多线程技术,那就来试试该如何

ArcGIS Engine开发之旅05---空间数据库

原文 ArcGIS Engine开发之旅05---空间数据库 1  Geodatabase概念 Geodatabase是ArcInfo8引入的一种全新的面向对象的空间数据模型,是建立在DBMS之上的统一的.智能的空间数据模型.“统一”是指,Geodatabase之前的多个空间数据模型都不能在一个统一的模型框架下对地理空间要素信息进行统一的描述,而Geodatabase做到了这一点:“智能化”是指,在Geodatabase模型中,对空间要素的描述和表达较之前的空间数据模型更接近我们的现实世界,更能

ArcGIS Engine开发之旅03--ArcGIS Engine中的控件

原文 ArcGIS Engine开发之旅03--ArcGIS Engine中的控件 制图控件,如MapControl.PageLayoutControl,其中MapControl控件主要用于地理数据的显示和分析,PageLayoutControl用于生成一幅成品地图.MapControl封装了Map对象,而PageLayoutControl则封装了PageLayout对象.这两个控件都实现了IMxContents接口,因此不仅可以读取ArcMap创建的地图文档,而且可以将自身的地图内容写到一个新

ArcGIS engine中Display类库 (局部刷新)

转自原文 ArcGIS engine中Display类库 (局部刷新) Display类库包括了用于显示GIS数据的对象.除了负责实际输出图像的主要显示对象(display object)外,这个类库还包含了表示符号和颜色的对象,用于控制在显示(display)中绘制时实体的属性.这个类库也包含了用户与显示(display)交互时的可视化反馈的对象.完成这些功能的对象被归并到一组类库子系统中. 这些类库子系统是: n         Display n         Dynamic Displ

ArcGIS engine中Display类库——Display

转自原文  ArcGIS engine中Display类库——Display Display类库包括了用于显示GIS数据的对象.除了负责实际输出图像的主要显示对象(display object)外,这个类库还包含了表示符号和颜色的对象,用于控制在显示(display)中绘制时实体的属性.这个类库也包含了用户与显示(display)交互时的可视化反馈的对象.完成这些功能的对象被归并到一组类库子系统中. 这些类库子系统是: n         Display n         Dynamic Di