码迷,mamicode.com
首页 > 其他好文 > 详细

ArcEngine的拓扑分析之ITopologicalOperator

时间:2014-10-22 18:27:26      阅读:831      评论:0      收藏:0      [点我收藏+]

标签:arcengine的拓扑分析   itopologicaloperator   

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

bubuko.com,布布扣

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

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

用法:

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

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

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

用法:

 ITopologicalOperator pTopologBoundary = pGeo as ITopologicalOperator;
IGeometry pGeometry = pTopologBoundary.Buffer(2);
bubuko.com,布布扣

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

用法:

ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
pTopologBoundary.Clip(pClipGeometry.Envelope as IEnvelope);
bubuko.com,布布扣

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);
bubuko.com,布布扣
5、Difference,区别,保留下源图层与操作图层中不同的部分。

用法:

IGeometry pSourceGeometry = null, pDifGeometry = null;
ITopologicalOperator pTopologBoundary = pSourceGeometry as ITopologicalOperator;
IGeometry pResultGeo= pTopologBoundary.Difference(pDifGeometry);
bubuko.com,布布扣
6、Intersect,相交,求两个图层相交,返回IGeometry对象

用法:

ITopologicalOperator pTopological = (pSubFeature.Shape) as ITopologicalOperator;
IGeometry pGeoIntersect=pTopological.Intersect(pFeature.Shape, esriGeometryDimension.esriGeometry2Dimension);
bubuko.com,布布扣
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);






ArcEngine的拓扑分析之ITopologicalOperator

标签:arcengine的拓扑分析   itopologicaloperator   

原文地址:http://blog.csdn.net/anlidengshiwei/article/details/40377437

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!