ArcEngine实现空间分析

<div class="page-title pad group">

		<ul class="meta-single group">
		<li class="category"><a href="https://www.giserdqy.com/arcengine/" rel="category tag">ArcEngine</a></li>
				</ul>
				<article class="post-26960 post type-post status-publish format-standard has-post-thumbnail hentry category-arcengine tag-arcengine">
			<div class="post-inner group">
				<p id="breadcrumbs"><span><span><a href="https://www.giserdqy.com/">首页</a> » <span><a href="https://www.giserdqy.com/arcengine/">ArcEngine</a> » <span class="breadcrumb_last" aria-current="page">ArcEngine实现空间分析</span></span></span></span></p>					<h1 class="post-title">ArcEngine实现空间分析</h1>
				
				<div class="bdsharebuttonbox bdshare-button-style0-24" data-bd-bind="1563003227441"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_mshare" data-cmd="mshare" title="分享到一键分享"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a><a href="#" class="bds_youdao" data-cmd="youdao" title="分享到有道云笔记"></a><a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a><a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a><a href="#" class="bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a><a href="#" class="bds_copy" data-cmd="copy" title="分享到复制网址"></a><a href="#" class="bds_print" data-cmd="print" title="分享到打印"></a></div>
				<p class="post-byline">by <a href="https://www.giserdqy.com/author/dqy/" title="由giser发布" rel="author">giser</a> · 2019-04-05</p>

				
				<div class="clear"></div>

				<div class="entry ">
					<div class="entry-inner">
						<div id="ez-toc-container" class="counter-hierarchy counter-decimal">

目录

1.熟悉 ITopologicalOperator 接口(用于空间拓扑运算)的使用
2.熟悉 IRelationalOperator 接口(用于空间关联运算)的使用
3.熟悉 IProximityOperator 接口(用于空间距离运算)的使用

●·● 目录:

A1 ………… ITopologicalOperator5 接口

A2 ………… IRelationalOperator 接口

A3 ………… IPoint 接口
A4 ………… ICurve3 接口
A5 ………… ISegment 接口
A6 ………… ICircularArc 接口

———————————————————————————————————

            ╔════════╗
╠════╣    第A1个    ╠══════════════════════════════════════════════════╣
            ╚════════╝

●·● ITopologicalOperator5
接口

1. Provides additional information on non-simple geometries.【拓扑操作】

  Members
  Description
Read-only propertyBoundary
返回值:IGeometry
The boundary of this geometry. A polygon’s boundary is a polyline. A polyline’s boundary is a multipoint. A point or multipoint’s boundary is an empty point or multipoint.
MethodBuffer
(double distance)
返回值:IGeometry
Constructs a polygon that is the locus of points at a distance less than or equal to a specified distance from this geometry.
通过给定距离,得到操作图形的缓冲区,返回得到缓冲区几何图形!
但是这里面的距离很是蹊跷,同时实验发现,我写入 0.01 的时候,大约表示 1km,所以大约是 1:100 000 的关系!
MethodClip
(IEnvelope clipperEnvelope)
Constructs the intersection of this geometry and the specified envelope.
返回矩形部分的要素,直接作用在要素上面!
MethodClipDenseConstructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.
MethodClipExConstructs the intersection of this geometry and the specified envelope.
MethodClipToDomainClips the geometry to the domain of the spatial reference. Useful for ensuring that buffers can be fit within the spatial domain of the feature class to which they are being added.
MethodConstructUnionDefines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly.
MethodConvexHullConstructs the convex hull of this geometry.
MethodCutSplits this geometry into a part left of the cutting polyline, and a part right of it.
MethodCut2Divides a geometry into multiple parts
MethodDifferenceConstructs the geometry containing points from this geometry but not the other geometry.
MethodGeoNormalizeExShifts longitudes, if need be, into a continuous range of 360 degrees.
MethodIntersectConstructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.
MethodIntersectMultidimensionConstructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension.
Read-only propertyIsKnownSimpleIndicates whether this geometry is known (or assumed) to be topologically correct.
Write-only propertyIsKnownSimpleIndicates whether this geometry is known (or assumed) to be topologically correct.
Read-only propertyIsSimpleIndicates whether this geometry is known (or assumed) to be topologically correct, after explicitly determining this if the geometry is not already known (or assumed) to be simple.
Read-only propertyIsSimpleExDetermines why a geometry is not simple. Currently only implemented for polygons.
MethodQueryClippedRedefines clippedGeometry to be the intersection of this geometry and the clipping envelope.
MethodQueryClippedDenseRedefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.
MethodSimplifyMakes this geometry topologically correct.
MethodSymmetricDifferenceConstructs the geometry that contains points from either but not both input geometries.
MethodUnionConstructs the geometry that is the set-theoretic union of the input geometries.
  CoClasses that implement ITopologicalOperator
CoClasses and ClassesDescription
GeoEllipse
(esriDefenseSolutions)
Its a spheroidal ellipse.
GeometryBagAn ordered collection of objects that support the IGeometry interface.
GeoPolygon
(esriDefenseSolutions)
Its a spheroidal polygon.
GeoPolyline
(esriDefenseSolutions)
This is a spheroidal polyline.
MultiPatchA collection of surface patches.
MultipointAn ordered collection of points; optionally has measure, height and ID attributes.
PointA two dimensional point, optionally with measure, height, and ID attributes.
PolygonA collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.
PolylineAn ordered collection of paths; optionally has measure, height and ID attributes.

※ | ※ → 公共代码部分:

//公共变量!~

复制代码
   
   
  1. IMap pMap;
  2. IActiveView pActiveView;
  3. IEnvelope pEnv;
  4. ISelectionEnvironment pSelectionEnv;
  5. IEnumFeature pEnumFeature;
  6. IGraphicsContainer pGraphicsContainer;
  7. IFeature pFeature;
  8. IGeometry pGeometry;
  9. IEnvelope pEnvClip;
  10. IPolyline pLineCut;
  11. IPolygon pFirstPolygon;
复制代码

//鼠标点击事件!~

复制代码
   
   
  1. private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
  2. {
  3. axMapControl1.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
  4. if (isClip) //此时要拉Clip框
  5. {
  6. pEnvClip = axMapControl1.TrackRectangle();
  7. isClip = false;
  8. }
  9. else if (isCut)
  10. {
  11. pLineCut = axMapControl1.TrackLine() as IPolyline;
  12. isCut = false;
  13. }
  14. else if (isFirstIn)
  15. {
  16. pMap = axMapControl1.Map;
  17. pActiveView = pMap as IActiveView;
  18. pEnv = axMapControl1.TrackRectangle();
  19.  
  20. pSelectionEnv = new SelectionEnvironment();
  21. pSelectionEnv.DefaultColor = GetColor(0, 255, 0);
  22. pMap.SelectByShape(pEnv, pSelectionEnv, false);
  23. pActiveView.Refresh();
  24. pEnumFeature = axMapControl1.Map.FeatureSelection as IEnumFeature;
  25. }
  26. else
  27. {
  28. pMap = axMapControl1.Map;
  29. pActiveView = pMap as IActiveView;
  30. pEnv = axMapControl1.TrackRectangle();
  31.  
  32. pSelectionEnv = new SelectionEnvironment();
  33. pSelectionEnv.DefaultColor = GetColor(255, 0, 0);
  34. pMap.SelectByShape(pEnv, pSelectionEnv, false);
  35. pActiveView.Refresh();
  36. pEnumFeature = axMapControl1.Map.FeatureSelection as IEnumFeature;
  37. }
  38. }
复制代码

//RGB颜色!~

复制代码
   
   
  1. private IRgbColor GetColor(int r, int g, int b)
  2. {
  3. IRgbColor pColor = new RgbColor();
  4. pColor.Red = r;
  5. pColor.Green = g;
  6. pColor.Blue = b;
  7. return pColor;
  8. }
复制代码

 

※ | ※ → Buffer:

复制代码
   
   
  1. private void button1_Click(object sender, EventArgs e)
  2. {
  3. while (true)
  4. {
  5. pGraphicsContainer = pMap as IGraphicsContainer; //定义容器
  6. pFeature = pEnumFeature.Next(); //遍历要素
  7. if (pFeature == null) //若不存在要素,则推出循环
  8. break;
  9. pGeometry = pFeature.Shape; //获取要素的Geometry
  10. ITopologicalOperator pTopoOperator = pGeometry as ITopologicalOperator; //QI到拓扑操作
  11. IGeometry pBufferGeo = pTopoOperator.Buffer(2); //缓冲区分析
  12.  
  13. IElement pElement = new PolygonElement();
  14. pElement.Geometry = pBufferGeo; //获取得到的缓冲区
  15.  
  16. pGraphicsContainer.AddElement(pElement, 0); //显示缓冲区
  17. pActiveView.Refresh();
  18. }
  19. }
复制代码

 

※ | ※ → Boundary:

复制代码
   
   
  1. private void button2_Click(object sender, EventArgs e)
  2. {
  3. while (true)
  4. {
  5. pGraphicsContainer = pMap as IGraphicsContainer; //定义容器
  6. pFeature = pEnumFeature.Next(); //遍历要素
  7. if (pFeature == null) //若不存在要素,则推出循环
  8. break;
  9. pGeometry = pFeature.Shape; //获取要素的Geometry
  10. ITopologicalOperator pTopoOperator = pGeometry as ITopologicalOperator; //QI到拓扑操作
  11. IGeometry pBoundary = pTopoOperator.Boundary; //获取边界
  12.  
  13. ILineElement pLineEle = new LineElementClass();
  14. ISimpleLineSymbol pSLS = new SimpleLineSymbol();
  15. IRgbColor pColor = GetColor(0, 255, 0);
  16. pSLS.Color = pColor;
  17. pSLS.Width = 5;
  18. pLineEle.Symbol = pSLS;
  19.  
  20. IElement pElement = pLineEle as IElement;
  21. pElement.Geometry = pBoundary;
  22.  
  23. pGraphicsContainer.AddElement(pElement, 0); //显示边界
  24. pActiveView.Refresh();
  25. }
  26. }
复制代码

 

※ | ※ → Clip:

复制代码
   
   
  1. bool isClip = false;
  2. private void button3_Click(object sender, EventArgs e)
  3. {
  4. isClip = true;
  5. }
  6.  
  7. private void button4_Click(object sender, EventArgs e)
  8. {
  9. while (true)
  10. {
  11. pGraphicsContainer = pMap as IGraphicsContainer; //定义容器
  12. pFeature = pEnumFeature.Next(); //遍历要素
  13. if (pFeature == null) //若不存在要素,则推出循环
  14. break;
  15. pGeometry = pFeature.Shape; //获取要素的Geometry
  16. ITopologicalOperator pTopoOperator = pGeometry as ITopologicalOperator; //QI到拓扑操作
  17. pTopoOperator.Clip(pEnvClip);
  18.  
  19. IElement pElement = new PolygonElement();
  20. pElement.Geometry = pGeometry; //获取得到的缓冲区
  21.  
  22. pGraphicsContainer.AddElement(pElement, 0); //显示缓冲区
  23. pActiveView.Refresh();
  24. }
  25. }
复制代码

 

※ | ※ → ConvexHull:

复制代码
   
   
  1. private void button5_Click(object sender, EventArgs e)
  2. {
  3. while (true)
  4. {
  5. pGraphicsContainer = pMap as IGraphicsContainer; //定义容器
  6. pFeature = pEnumFeature.Next(); //遍历要素
  7. if (pFeature == null) //若不存在要素,则推出循环
  8. break;
  9. pGeometry = pFeature.Shape; //获取要素的Geometry
  10. ITopologicalOperator pTopoOperator = pGeometry as ITopologicalOperator; //QI到拓扑操作
  11. IGeometry pBufferGeo = pTopoOperator.ConvexHull();
  12.  
  13. IElement pElement = new PolygonElement();
  14. pElement.Geometry = pBufferGeo; //获取得到的缓冲区
  15.  
  16. pGraphicsContainer.AddElement(pElement, 0); //显示缓冲区
  17. pActiveView.Refresh();
  18. }
  19. }
复制代码

 

※ | ※ → Cut:

复制代码
   
   
  1. bool isCut = false;
  2.  
  3. private void button6_Click(object sender, EventArgs e)
  4. {
  5. isCut = true;
  6. }
  7.  
  8. private void button7_Click(object sender, EventArgs e)
  9. {
  10. while (true)
  11. {
  12. pGraphicsContainer = pMap as IGraphicsContainer; //定义容器
  13. pFeature = pEnumFeature.Next(); //遍历要素
  14. if (pFeature == null) //若不存在要素,则推出循环
  15. break;
  16. pGeometry = pFeature.Shape; //获取要素的Geometry
  17. ITopologicalOperator pTopoOperator = pGeometry as ITopologicalOperator; //QI到拓扑操作ry
  18. IGeometry pGeoRight = new PolygonClass();
  19. IGeometry pGeoLeft = new PolygonClass();
  20. pTopoOperator.Cut(pLineCut, out pGeoLeft, out pGeoRight);
  21.  
  22. IElement pElement = new PolygonElement();
  23.  
  24. IFillShapeElement pFillEle = pElement as IFillShapeElement;
  25. ISimpleFillSymbol pSFS = new SimpleFillSymbol();
  26. pSFS.Color = GetColor(255, 255, 0);
  27. pFillEle.Symbol = pSFS;
  28.  
  29. pElement.Geometry = pGeoLeft; //获取得到的缓冲区
  30. pGraphicsContainer.AddElement(pElement, 0); //显示缓冲区
  31.  
  32. pSFS = new SimpleFillSymbol();
  33. pSFS.Color = GetColor(255, 0, 255);
  34. pFillEle.Symbol = pSFS;
  35.  
  36. pElement = new PolygonElement();
  37. pElement.Geometry = pGeoRight; //获取得到的缓冲区
  38. pGraphicsContainer.AddElement(pElement, 0); //显示缓冲区
  39.  
  40. pActiveView.Refresh();
  41. }
  42. }
复制代码

 

※ | ※ → Union:

复制代码
   
   
  1. private void button8_Click(object sender, EventArgs e)
  2. {
  3. IGeometry pUnionGeo = new PolygonClass();
  4. pGraphicsContainer = pMap as IGraphicsContainer; //定义容器
  5.  
  6. while (true)
  7. {
  8. pFeature = pEnumFeature.Next(); //遍历要素
  9. if (pFeature == null) //若不存在要素,则推出循环
  10. break;
  11. pGeometry = pFeature.Shape; //获取要素的Geometry
  12. ITopologicalOperator pTopoOperator = pUnionGeo as ITopologicalOperator; //QI到拓扑操作ry
  13. pUnionGeo = pTopoOperator.Union(pGeometry);
  14. }
  15.  
  16. IElement pElement = new PolygonElement();
  17.  
  18. IFillShapeElement pFillEle = pElement as IFillShapeElement;
  19. ISimpleFillSymbol pSFS = new SimpleFillSymbol();
  20. pSFS.Color = GetColor(255, 255, 0);
  21. pFillEle.Symbol = pSFS;
  22.  
  23. pElement.Geometry = pUnionGeo; //获取得到的缓冲区
  24. pGraphicsContainer.AddElement(pElement, 0); //显示缓冲区
  25.  
  26. pActiveView.Refresh();
  27. }
复制代码

 

※ | ※ → Intersect:

复制代码
   
   
  1. bool isFirstIn = false;
  2.  
  3. private void button10_Click(object sender, EventArgs e)
  4. {
  5. isFirstIn = true;
  6. }
  7.  
  8. private void button11_Click(object sender, EventArgs e)
  9. {
  10.     isFirstIn = false;
  11.     pFirstPolygon = new PolygonClass();
  12.     while (true)
  13.     {
  14.         pFeature = pEnumFeature.Next();
  15.         if (pFeature == null)
  16.             break;
  17.         pGeometry = pFeature.Shape;
  18.         ITopologicalOperator pTopoOperator = pFirstPolygon as ITopologicalOperator;
  19.         pFirstPolygon = pTopoOperator.Union(pGeometry) as IPolygon;
  20.     }
  21. }
  22.  
  23. private void button12_Click(object sender, EventArgs e)
  24. {
  25. IGeometry pIntersectGeo = new PolygonClass();
  26. IGeometry pSecondPolygon = new PolygonClass();
  27. pGraphicsContainer = pMap as IGraphicsContainer;
  28.  
  29. while (true)
  30. {
  31. pFeature = pEnumFeature.Next();
  32. if (pFeature == null)
  33. break;
  34. pGeometry = pFeature.Shape;
  35. ITopologicalOperator pTopoOperator = pSecondPolygon as ITopologicalOperator;
  36. pSecondPolygon = pTopoOperator.Union(pGeometry) as IPolygon;
  37. }
  38.  
  39. ITopologicalOperator pTopo = pSecondPolygon as ITopologicalOperator;
  40. pIntersectGeo = pTopo.Intersect(pFirstPolygon, esriGeometryDimension.esriGeometry2Dimension) as  IPolygon;
  41. IElement pElement = new PolygonElementClass();
  42. pElement.Geometry = pIntersectGeo;
  43. pGraphicsContainer.AddElement(pElement, 0);
  44. IFeatureLayer pFeatureLayer = pMap.get_Layer(0) as IFeatureLayer;
  45. pFeatureLayer.Visible = false;
  46. pFeatureLayer = pMap.get_Layer(1) as IFeatureLayer;
  47. pFeatureLayer.Visible = false;
  48. pActiveView.Refresh();
  49. }
复制代码

 

※ | ※ → Difference:(需要前面两部分)

复制代码
   
   
  1. private void button13_Click(object sender, EventArgs e)
  2. {
  3. IGeometry pIntersectGeo = new PolygonClass();
  4. IGeometry pSecondPolygon = new PolygonClass();
  5. pGraphicsContainer = pMap as IGraphicsContainer;
  6.  
  7. while (true)
  8. {
  9. pFeature = pEnumFeature.Next();
  10. if (pFeature == null)
  11. break;
  12. pGeometry = pFeature.Shape;
  13. ITopologicalOperator pTopoOperator = pSecondPolygon as ITopologicalOperator;
  14. pSecondPolygon = pTopoOperator.Union(pGeometry) as IPolygon;
  15. }
  16.  
  17. ITopologicalOperator pTopo = pSecondPolygon as ITopologicalOperator;
  18. pIntersectGeo = pTopo.Difference(pFirstPolygon) as IPolygon;
  19. IElement pElement = new PolygonElementClass();
  20. pElement.Geometry = pIntersectGeo;
  21. pGraphicsContainer.AddElement(pElement, 0);
  22. IFeatureLayer pFeatureLayer = pMap.get_Layer(0) as IFeatureLayer;
  23. pFeatureLayer.Visible = false;
  24. pFeatureLayer = pMap.get_Layer(1) as IFeatureLayer;
  25. pFeatureLayer.Visible = false;
  26. pActiveView.Refresh();
  27. }
复制代码

 

———————————————————————————————————

            ╔════════╗
╠════╣    第A2个    ╠══════════════════════════════════════════════════╣
            ╚════════╝

●·● IRelationalOperator
接口

1. Provides access to members that determine if a certain spatial relationship exists between two geometries.

  Members
  Description
MethodContainsIndicates if this geometry contains the other geometry.
前者是否包含后者!
MethodCrossesIndicates if the two geometries intersect in a geometry of lesser dimension.
MethodDisjointIndicates if the two geometries share no points in common. Negate this result to compute the Intersect relation.
MethodEqualsIndicates if the two geometries are of the same type and define the same set of points in the plane.
MethodOverlapsIndicates if the intersection of the two geometries has the same dimension as one of the input geometries.
前者和后者是否有重叠!不包括包含关系!
MethodRelationIndicates if the defined relationship exists.
MethodTouchesIndicates if the boundaries of the geometries intersect.
MethodWithinIndicates if this geometry is contained (is within) another geometry.
前者是否在后者内部!
  CoClasses that implement IRelationalOperator
CoClasses and ClassesDescription
EnvelopeA rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes.
GeometryBagAn ordered collection of objects that support the IGeometry interface.
MultiPatchA collection of surface patches.
MultipointAn ordered collection of points; optionally has measure, height and ID attributes.
PointA two dimensional point, optionally with measure, height, and ID attributes.
PolygonA collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.
PolylineAn ordered collection of paths; optionally has measure, height and ID attributes.

※ | ※ → 公共代码部分:

复制代码
   
   
  1. IMap pMap;
  2. IActiveView pActiveView;
  3. IEnvelope pEnv;
  4. ISelectionEnvironment pSelectionEnv;
  5. IEnumFeature pEnumFeature;
  6. IFeature pFeature;
  7. IGeometry pGeometry;
  8. IGeometry pBasicGeo;
复制代码
复制代码
   
   
  1. private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
  2. {
  3. axMapControl1.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
  4. pMap = axMapControl1.Map;
  5. pActiveView = pMap as IActiveView;
  6. pEnv = axMapControl1.TrackRectangle();
  7. pSelectionEnv = new SelectionEnvironment();
  8. pSelectionEnv.DefaultColor = GetColor(255, 0, 0);
  9. pMap.SelectByShape(pEnv, pSelectionEnv, false);
  10. pActiveView.Refresh();
  11. pEnumFeature = pMap.FeatureSelection as IEnumFeature;
  12. }
复制代码
复制代码
   
   
  1. private IRgbColor GetColor(int r, int g, int b)
  2. {
  3. IRgbColor pColor = new RgbColor();
  4. pColor.Red = r;
  5. pColor.Green = g;
  6. pColor.Blue = b;
  7. return pColor;
  8. }
复制代码
复制代码
   
   
  1. private IGeometry GetBasicGeometry()
  2. {
  3. IFeatureLayer pFeatureLayer = axMapControl1.Map.get_Layer(1) as IFeatureLayer;
  4. IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
  5. IFeatureCursor pFeatureCursor = pFeatureClass.Search(null, false);
  6. IFeature pF = pFeatureCursor.NextFeature();
  7. IGeometry pUnionGeo = new PolygonClass();
  8. pUnionGeo = pF.Shape;
  9. while(pF != null)
  10. {
  11. ITopologicalOperator pUnionTopo = pUnionGeo as ITopologicalOperator;
  12. pUnionGeo = pUnionTopo.Union(pF.Shape);
  13. pF = pFeatureCursor.NextFeature();
  14. }
  15. return pUnionGeo;
  16. }
复制代码
   
   
  1. private void Form1_Load(object sender, EventArgs e)
  2. {
  3. (axMapControl1.get_Layer(1) as IFeatureLayer).Selectable = false;
  4. }

 

※ | ※ → Contains:

复制代码
   
   
  1. private void button5_Click(object sender, EventArgs e)
  2. {
  3. pBasicGeo = GetBasicGeometry();
  4. pGeometry = new PolygonClass();
  5. while (true)
  6. {
  7. pFeature = pEnumFeature.Next();
  8. if (pFeature == null)
  9. break;
  10. ITopologicalOperator pTopo = pGeometry as ITopologicalOperator;
  11. pGeometry = pTopo.Union(pFeature.Shape);
  12. }
  13.  
  14. IRelationalOperator pRO = pBasicGeo as IRelationalOperator;
  15. bool IsContains = pRO.Contains(pGeometry);
  16. if (IsContains)
  17. {
  18. MessageBox.Show("Basic图层数据 包含 选中数据!");
  19. }
  20. else
  21. {
  22. MessageBox.Show("Basic图层数据 不包含 选中数据!");
  23. }
  24. }
复制代码

 

※ | ※ → Overlaps:

复制代码
   
   
  1. private void button2_Click(object sender, EventArgs e)
  2. {
  3. pBasicGeo = GetBasicGeometry();
  4. pGeometry = new PolygonClass();
  5. while (true)
  6. {
  7. pFeature = pEnumFeature.Next();
  8. if (pFeature == null)
  9. break;
  10. ITopologicalOperator pTopo = pGeometry as ITopologicalOperator;
  11. pGeometry = pTopo.Union(pFeature.Shape);
  12. }
  13.  
  14. IRelationalOperator pRO = pGeometry as IRelationalOperator;
  15. bool IsContains = pRO.Overlaps(pBasicGeo);
  16. if (IsContains)
  17. {
  18. MessageBox.Show("选中数据 重叠 Basic图层数据!");
  19. }
  20. else
  21. {
  22. MessageBox.Show("选中数据 不重叠 Basic图层数据!");
  23. }
  24. }

转载自:https://blog.csdn.net/kone0611/article/details/48447961

			</div><!--/.post-inner-->
		</article><!--/.post-->
	
	<div class="clear"></div>

	<p class="post-tags"><span>Tags:</span> <a href="https://www.giserdqy.com/tag/arcengine/" rel="tag">arcengine</a><a href="https://www.giserdqy.com/tag/arcengine%e5%ae%9e%e7%8e%b0%e7%a9%ba%e9%97%b4%e5%88%86%e6%9e%90/" rel="tag">ArcEngine实现空间分析</a></p>
	
		<ul class="post-nav group">
	<li class="next"><a href="https://www.giserdqy.com/arcengine/26962/arcengine%e8%bf%9e%e6%8e%a5sde%e6%95%b0%e6%8d%ae/" rel="next"><i class="fa fa-chevron-right"></i><strong>Next story</strong> <span>ArcEngine连接SDE数据</span></a></li>
	<li class="previous"><a href="https://www.giserdqy.com/arcengine/26957/arcengine%e6%95%b0%e6%8d%ae%e7%bc%96%e8%be%91%e6%93%8d%e4%bd%9c-%e6%b7%bb%e5%8a%a0%e7%ba%bf/" rel="prev"><i class="fa fa-chevron-left"></i><strong>Previous story</strong> <span>ArcEngine数据编辑操作–添加线</span></a></li>
</ul>
You may also like...
</div><!--/.pad-->
<div class="sidebar s1 ">
	
	<a class="sidebar-toggle" title="Expand Sidebar"><i class="fa icon-sidebar-toggle"></i></a>
	
	<div class="sidebar-content">
		
					
					
		<div id="search-8" class="widget widget_search"><h3 class="group"><span>站内搜索</span></h3><form method="get" class="searchform themeform" action="https://www.giserdqy.com/">
<div>
	<input type="text" class="search" name="s" onblur="if(this.value=='')this.value='To search type and hit enter';" onfocus="if(this.value=='To search type and hit enter')this.value='';" value="To search type and hit enter">
</div>

分类

选择分类目录 ArcEngine ArcGIS    ArcGISServer    ArcMap       水文分析    ArcPy database GDAL geospatial Geotrellis GIS    CAD    GIS理论    开源GIS       GeoServer          入门          安装          数据管理             数据设置             栅格数据             矢量数据       geotools       ogc       三维开发          cesium             cesium中级教程1             cesium初级入门1          threejs             threejs初级       开源GIS新闻 GIS+BIM GIS人工智能 GIS前沿 GIS大数据 GIS应用 GIS项目 OGR oraclespatial PostGreSQL PROJ webgis    arcgis api for javascript       3.x       4.x    ArcGIS API For JavaScript官方文档    leaflet    openlayers WebGIS 原理、设计、实现 开发工具    git 开发语言    C#    CSS    html5       bootstrap       echarts       ztree    Java    JavaScript       es6    Python       pyspider       Python教程       Python数据分析       Scrapy教程    vue 技术积累 操作系统    centos    ubuntu    windows 数据库    MongoDB    MySQL       nodejs    Oracle 空间分析 空间统计 算法 精选文章 网站建设 资源下载
		</div><div id="tag_cloud-8" class="widget widget_tag_cloud"><h3 class="group"><span>标签</span></h3><div class="tagcloud"><a href="https://www.giserdqy.com/tag/arcengine/" class="tag-cloud-link tag-link-27 tag-link-position-1" style="font-size: 16.5625pt;" aria-label="arcengine (206个项目)">arcengine</a>

ArcGIS
arcgis api for javascript
arcgis api for javascript专栏
arcgis api for js
arcmap
ArcPy
cesium官方教程
es6
esri-leaflet入门教程(4)-加载各类图层
GDAL
geosanalysis
geoserver
GeoServer地图开发解决方案(一):环境搭建篇
GeoServer地图开发解决方案(二):地图数据处理篇
geostatistic
Geotools
geotrellis
GIS
git
leaflet
mongodb
ogr
openayers系列教程
openlayers
openlayers4
oracle spatial
PostGIS
postgresql
proj4
python教程
Python数据分析
scrapy
vue
webgis
人工智能
地图
地理信息
大数据
开源
智慧城市
空间分析
空间大数据
空间统计
自动驾驶

版权说明

部分文章来自于网络,如有侵权,请联系我删除。

</div><!--/.sidebar-->

	

			</div><!--/.main-inner-->
		</div>
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值