zoukankan      html  css  js  c++  java
  • ArcEngine的拓扑分析之ITopologicalOperator

    先来看看ITopologicalOperator的成员:截图来自帮助文档:


    简要介绍下各个成员的汉语翻译:

    1、Boundary,边界,获取一个Geometry的边界;

    用法:

      ITopologicalOperator pTopologBoundary = pGeo as ITopologicalOperator;
      IGeometry pGeometry = pTopologBoundary.Boundary;
    (1)多边形Polygon的边界获取的是Polyline

    (2)Polyline获得的是IPiontColletion点集;(3)点没有边界


    2、Buffer,缓冲区,可以为点、线、面做缓冲区,参数为缓冲区范围的大小,大于0向外做缓冲区,小于0向内做缓冲区;

    用法:

     ITopologicalOperator pTopologBoundary = pGeo as ITopologicalOperator;
    IGeometry pGeometry = pTopologBoundary.Buffer(2);


    3、Clip,叠加裁剪,从源图层中裁剪掉分割图层后的图形;参数类型为IEnvelope类型

    用法:

    ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
    pTopologBoundary.Clip(pClipGeometry.Envelope as IEnvelope);


    4、Cut,分割,将一个Geometry分割为两部分。

    用法:

    IGeometry pSourceGeometry = null, pClipGeometry = null;
    IGeometry pLeftGeo,pRightGo;
    IPolyline pPolyline=null;
    ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
    pTopologBoundary.Cut(pPolyline, out pLeftGeo, out pRightGo);
    

    5、Difference,区别,保留下源图层与操作图层中不同的部分。

    用法:

    IGeometry pSourceGeometry = null, pDifGeometry = null;
    ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
    IGeometry pResultGeo= pTopologBoundary.Difference(pDifGeometry);

    6、Intersect,相交,求两个图层相交,返回IGeometry对象

    用法:

    ITopologicalOperator pTopological = (pSubFeature.Shape) as ITopologicalOperator;
    IGeometry pGeoIntersect=pTopological.Intersect(pFeature.Shape, esriGeometryDimension.esriGeometry2Dimension);

    7、IsSimple,是否拓扑闭合

    用法:

    ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
    bool bIsSimple = pTopologBoundary.IsSimple;
    8、Simplify,使一个Geometry拓扑闭合;

    用法:

    ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
    pTopologBoundary.Simplify();
    9、Union,使Geometry组合起来
    用法:
    <pre name="code" class="csharp">IGeometry pSourceGeometry = null, pUnionGeometry = null;
    ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
    IGeometry pUnionGeo=pTopologBoundary.Union(pUnionGeometry);


    
    


  • 相关阅读:
    电子海图开发一百篇第五十五篇-电子江图传输规范 数据模型
    天气可视化,海浪,温度图层的绘制,温度热力图的可视化
    全球潮汐数据API使用方法,潮汐数据查询
    海洋气象数据可视化,以流场的方式显示风场图,海洋气象API使用
    g++ 编译module失败
    编译gcc error-*** LIBRARY_PATH shouldn‘t contain the current directory when *** building gcc.
    windows两种自启动的区别
    windows多线程加锁
    windows server 2012不显示此电脑
    pthread_cond_wait
  • 原文地址:https://www.cnblogs.com/dengshiwei/p/4258715.html
Copyright © 2011-2022 走看看