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

      

    悲观者更正确,乐观者更成长。时代大潮下,充满着机遇和风险。 目标不同,选择也就不同,人生没有标准答案,对大多数人而言,还是要不停地提高自己,这个世界什么都能快,但学习从来都没有捷径,或者说学习已是捷径。
  • 相关阅读:
    Redis设置生存时间或过期时间的相关命令
    .Net Core使用Redis
    Redis的数据类型
    Java集合 使用Collections
    Java集合 使用Iterator
    Java集合 使用Stack
    响应式常用样式汇总
    图片 文字 背景等响应式设置总结
    微信动态聊天工具
    第2章 栅格系统
  • 原文地址:https://www.cnblogs.com/youzi-xuchongyou/p/8953336.html
Copyright © 2020-2023  润新知