首页 > 代码库 > ArcEngine的拓扑分析之ITopologicalOperator
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);
ArcEngine的拓扑分析之ITopologicalOperator
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。