ArcGIS拓扑检查
对于拓扑检查中的等级参数一直不理解,经过参考资料才明白过来:
注:如果有两个要素参与到拓扑,在修复拓扑错误时会优先移动拓扑级别低的要素来满足匹配拓扑规则要求。
参考资料:
https://wenku.baidu.com/view/b446ad5e04a1b0717ed5dd4e.html
http://zhihu.esrichina.com.cn/article/1573
拓扑检查官方文档有误导
当两个要素类参与拓扑时,官方有一段代码,将拓扑规则加到拓扑中:
1 | topologyRule.AllOriginSubtypes = false ; |
1 | topologyRule.AllDestinationSubtypes = false ;<br>对于AllOriginSubtypes、AllDestinationSubtypes的官方解释: |
Indicates if all origin subtypes are specified for the topology rule.
Indicates if all destination subtypes are specified for the topology rule.
默认为false,但是这样是得不到拓扑结果的。
overlap2:overlap2,这里是有问题的,实际就是:“overlap2”。具体原因也没搞清楚。
地址:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | public void AddRuleToTopology(ITopology topology, esriTopologyRuleType ruleType, String ruleName, IFeatureClass originClass, int originSubtype, IFeatureClass destinationClass, int destinationSubtype) { // Create a topology rule. ITopologyRule topologyRule = new TopologyRuleClass(); topologyRule.TopologyRuleType = ruleType; topologyRule.Name = ruleName; topologyRule.OriginClassID = originClass.FeatureClassID; topologyRule.AllOriginSubtypes = false ; topologyRule.OriginSubtype = originSubtype; topologyRule.DestinationClassID = destinationClass.FeatureClassID; topologyRule.AllDestinationSubtypes = false ; topologyRule.DestinationSubtype = destinationSubtype; // Cast the topology to the ITopologyRuleContainer interface and add the rule. ITopologyRuleContainer topologyRuleContainer = (ITopologyRuleContainer)topology; if (topologyRuleContainer.get_CanAddRule(topologyRule)) { topologyRuleContainer.AddRule(topologyRule); } else { throw new ArgumentException( "Could not add specified rule to the topology." ); } } |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· Vue3状态管理终极指南:Pinia保姆级教程