Shayne
路人甲
路人甲
  • 注册日期2015-07-20
  • 发帖数2
  • QQ
  • 铜币2枚
  • 威望1点
  • 贡献值0点
  • 银元0个
阅读:2138回复:3

求问AE二次开发如何得到与一个线要素相邻接的其他线要素?

楼主#
更多 发布于:2015-07-20 19:31
问题是这样的:
我有一个shp文件,里面都是线要素,当我选中其中一个线要素时,需要得到与其邻接的几条线要素。
就像这样,选中一个线要素


然后得到与其相邻接的线要素



在ArcMap中我可以用按位置选择来实现








但我要批量的利用该功能生成数据,需要用到AE二次开发
求问AE二次开发时要怎样实现呢?求高手指点!
喜欢0 评分0
Shayne
路人甲
路人甲
  • 注册日期2015-07-20
  • 发帖数2
  • QQ
  • 铜币2枚
  • 威望1点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2015-07-20 21:59
自顶一下自顶一下
举报 回复(0) 喜欢(0)     评分
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15947
  • QQ554730525
  • 铜币25339枚
  • 威望15364点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
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 |
举报 回复(0) 喜欢(0)     评分
行者斯盖
路人甲
路人甲
  • 注册日期2015-10-10
  • 发帖数7
  • QQ
  • 铜币7枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
3楼#
发布于:2015-10-10 10:38
楼上说的很详细    要多学习使用帮助文档
举报 回复(0) 喜欢(0)     评分
游客

返回顶部