阅读:2313回复:3
求问AE二次开发如何得到与一个线要素相邻接的其他线要素?
问题是这样的:
我有一个shp文件,里面都是线要素,当我选中其中一个线要素时,需要得到与其邻接的几条线要素。 就像这样,选中一个线要素 ![]() 然后得到与其相邻接的线要素 ![]() 在ArcMap中我可以用按位置选择来实现 ![]() 但我要批量的利用该功能生成数据,需要用到AE二次开发 求问AE二次开发时要怎样实现呢?求高手指点! |
|
1楼#
发布于:2015-07-20 21:59
自顶一下自顶一下
|
|
2楼#
发布于:2015-07-30 09:49
ITopologicalOperator.Intersect Method可以完成 具体使用可以在开发帮助文档里查看。 ![]() [C#] //The following code shows to wrap a line segment into a polyline in C# //Assume a line (line1 as ILine) is already created object obj = Type.Missing; ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection; segCollection.AddSegment((ISegment)line1, ref obj, ref obj); //Set the spatial reference on the new polyline //The spatial reference is not transfered automatically from the segments IGeometry geom = segCollection as IGeometry; geom.SpatialReference = spatialRef; //Can now be used with ITopologicalOperator methods See Also ITopologicalOperator Interface | ITopologicalOperator.Intersect Method | IConstructMultipoint.ConstructIntersection Method | IConstructMultipoint.ConstructIntersectionEx Method .NET Samples ViperPin tool (Code Files: ViperPinForm) | .NET Related Topics How to create a polyline | |
|
|
3楼#
发布于:2015-10-10 10:38
楼上说的很详细 要多学习使用帮助文档
|
|