阅读:1423回复:1
如何获取线的每一个节点的坐标
在VBA/VB环境下如何获取线的每一个节点的Z坐标值,并进行平差,赋回给原先的节点
|
|
1楼#
发布于:2009-07-24 08:18
<P>意思好像没有表达清楚,获取xyz的坐标可以使用IPointCollection获得。主要参看以下代码</P>
<P>z也是一样的。</P> <P>Dim theshape As IGeometry<BR>Set theshape = thefeature.Shape<BR>Dim thepoints As IPointCollection<BR>Set thepoints = theshape</P> <P>For i = 0 To thepoints.PointCount - 1<BR> Dim thepoint As IPoint<BR> Set thepoint = New Point<BR> With thepoint<BR> .x = thepoints.Point(i).x<BR> .y = thepoints.Point(i).y<BR> End With</P> <P>next i</P> <P><img src="images/post/smile/dvbbs/em05.gif" /></P> |
|