拓扑分析出现错误,请指导下 [已关闭]

0 投票

 

代码如下:m_checkDataName = "LineNoOverlap-checkpop";
            WorkspaceTreeNodeBase node = workspaceControl1.WorkspaceTree.SelectedNode as WorkspaceTreeNodeBase;
            WorkspaceTreeNodeDataType type = node.NodeType;
            DatasetVector dataset = node.GetData() as DatasetVector;
           
            if(dataset.Type==DatasetType.Line)
            {
                mapControl1.Map.Layers.Clear();
                 mapControl1.Map.Layers.Add(dataset, true);
                dataset.Datasource.Datasets.Delete(m_bufDatasetName);
                DatasetVector m_bufDataset = (DatasetVector)dataset.Datasource.CopyDataset(dataset, m_bufDatasetName, dataset.EncodeType);


                TopologyDatasetRelationItem topoItem = new TopologyDatasetRelationItem(m_bufDataset);
                TopologyDatasetRelationItem[] items = { topoItem };

                // 拓扑预处理,这个需要先调用
                // Topology Preprocessing
                TopologyValidator.Preprocess(items, 2);

                // 检查线相重叠
                //Check the topology according to the rule of LineNoOverlap
                dataset.Datasource.Datasets.Delete(m_checkDataName);
                DatasetVector resultDataset = TopologyValidator.Validate(m_bufDataset, m_bufDataset, TopologyRule.LineNoOverlap, 2, null, dataset.Datasource, m_checkDataName);

报错:

问题关闭原因: 已经解决
12月 31, 2019 分类:  95次浏览 | 用户: chei 才疏学浅 (11 分)
已关闭 1月 1 用户:chei
...