阅读:1823回复:6
如何获得道路交叉点坐标??
如何获得选中道路交叉点的坐标,请高手指点,能告诉我一下用什么接口也行,谢谢了先!!(我用VB+AO开发)
[此贴子已经被作者于2005-7-26 19:42:43编辑过]
|
|
1楼#
发布于:2005-07-25 20:59
看看arcgis的Snap功能了
|
|
|
2楼#
发布于:2005-07-26 19:45
楼上的,说清楚点,我是要编程序实现,能告诉我用什么接口吗?或者有相关代码更好!!谢谢了先!!<img src="images/post/smile/dvbbs/em02.gif" />
|
|
3楼#
发布于:2005-08-14 19:35
ITopologicalPtr接口 看看吧。:)
|
|
4楼#
发布于:2005-08-16 16:21
谢谢了!!
|
|
5楼#
发布于:2005-08-16 16:34
不行啊!!我试过ITopologicalOperator接口的Intersect方法不行啊!!
|
|
6楼#
发布于:2005-08-19 12:43
'功能描述:求两线的交点<BR>'传入参数:<BR>'返回参数:交点<BR>'依赖关系:<BR>'作者:<BR>'创建日期<BR>'**************************************************<BR>Public Function FindIntersection(pLines1 As ITopologicalOperator, plines2 As ITopologicalOperator, maxDev As Double) As IPoint<BR> Dim pIntersect As IGeometry<BR> Set pIntersect = pLines1.Intersect(plines2, esriGeometry0Dimension)<BR> If pIntersect Is Nothing Then Exit Function<BR> If pIntersect.IsEmpty Then Exit Function<BR> Dim pEnv As IEnvelope<BR> Set pEnv = pIntersect.Envelope<BR> ' 确定结果只有一个交点<BR> If pEnv.Height > maxDev Or pEnv.Width > maxDev Then Exit Function<BR> Dim pPt As IPoint<BR> Set pPt = New Point<BR> Set pPt.SpatialReference = pEnv.SpatialReference<BR> pPt.PutCoords 0.5 * (pEnv.XMin + pEnv.XMax), 0.5 * (pEnv.YMin + pEnv.YMax)<BR> Set FindIntersection = pPt<BR>End Function
|
|
|