• ArcGIS拓扑检查


    对于拓扑检查中的等级参数一直不理解,经过参考资料才明白过来:

    注:如果有两个要素参与到拓扑,在修复拓扑错误时会优先移动拓扑级别低的要素来满足匹配拓扑规则要求。

    参考资料:

    https://wenku.baidu.com/view/b446ad5e04a1b0717ed5dd4e.html

    http://zhihu.esrichina.com.cn/article/1573

    拓扑检查官方文档有误导

    当两个要素类参与拓扑时,官方有一段代码,将拓扑规则加到拓扑中:

    topologyRule.AllOriginSubtypes = false;
    topologyRule.AllDestinationSubtypes = false;
    对于AllOriginSubtypes、AllDestinationSubtypes的官方解释:

    ITopologyRule.AllOriginSubtypes Property

    Indicates if all origin subtypes are specified for the topology rule.

    ITopologyRule.AllDestinationSubtypes Property

    Indicates if all destination subtypes are specified for the topology rule.

    默认为false,但是这样是得不到拓扑结果的。

    overlap2:overlap2,这里是有问题的,实际就是:“overlap2”。具体原因也没搞清楚。

      地址:

    http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/d/0001000002nv000000.htm

    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.");
        }
    }
    

      

    悲观者更正确,乐观者更成长。时代大潮下,充满着机遇和风险。 目标不同,选择也就不同,人生没有标准答案,对大多数人而言,还是要不停地提高自己,这个世界什么都能快,但学习从来都没有捷径,或者说学习已是捷径。
  • 相关阅读:
    17、静态链表
    16、约瑟夫问题
    15、循环链表
    9、插入排序
    14、企业链表
    13、单向链表
    12、顺序表的顺序存储结构
    11、归并排序
    10、快速排序
    原型模式
  • 原文地址:https://www.cnblogs.com/youzi-xuchongyou/p/8953336.html
Copyright © 2020-2023  润新知