Arcgis中工具总结

loading 分享 2026-11-11 下载文档

Set pFLyr = aa.FocusMap.Layer(0)

Dim pFCsr As IFeatureCursor

Dim pFt As IFeature

Set pFCsr = pFLyr.FeatureClass.Update(Nothing, False)

Set pFt = pFCsr.NextFeature

Dim pPoint As IPoint

Set pPoint = pFt.ShapeCopy

Dim pNewPoint As IPoint

Dim X0 As Double, Y0 As Double

Dim X As Double, Y As Double

Dim dAngle As Double

Dim i As Long

For i = 0 To UBound(dPoint, 1)

Set pFt = pFLyr.FeatureClass.CreateFeature

Set pNewPoint = New Point

dAngle = dPoint(i, 0) * 3.14159263579893 / 180

pNewPoint.X = dPoint(i, 1) * Cos(dAngle) + pPoint.X

pNewPoint.Y = dPoint(i, 1) * Sin(dAngle) + pPoint.Y

Set pFt.Shape = pNewPoint pFt.Store

Next

Set pFLyr = Nothing

Set pFCsr = Nothing

Set pFt = Nothing

Set pPoint = Nothing

Set pNewPoint = Nothing End Sub Sub bbb()

'定义新加三个点的角度和距离

dPoint(0, 0) = 10

dPoint(0, 1) = 150

dPoint(1, 0) = 30

dPoint(1, 1) = 170

dPoint(2, 0) = 120

dPoint(2, 1) = 200 End Sub

这中方法做起来需要一点编程经验,但是比上面那中一个一个的画的方法要先进多了,可以把所有的点录入同时画出来。

如果你不会VBA编程,请看下面:

这是ArcGIS VBA的程序,运行的方法:

1),运行ArcMap,加载所需图层;

2),Tools菜单/Macros(宏)/Visual Basic Editor(VB编辑器),这样打开


Arcgis中工具总结.doc 将本文的Word文档下载到电脑
搜索更多关于: Arcgis中工具总结 的文档
相关推荐
相关阅读