sim писал(а):Gauss_Kruger
Ну вот вам и ответ.
На сколько мне известно, то проекция Гаусса-Крюгера, является равноугольной - т.е. не искажает углы.
я получаю все таки скорее всего начальный азимут, а мне нужен постоянный.
Мне кажется, что задача решаема.
Применительно к выражению Azimuth2
'polyline_Get_Azimuth2.cal
'Author: Ianko Tchoukanski
'
http://www.ian-ko.com
'=========================
On Error Resume Next
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pCurve As ICurve
Dim pPoint1 As IPoint, pPoint2 As IPoint
Dim dDistance1 As Double, dDistance2 As Double
Dim bAsRatio1 As Boolean
Dim pVector As IVector3D
Dim dAzimuth As Double
Dim dDelta As Double
Dim Pi As Double
Dim bSrefFromMap As Boolean
'=======================
'adjust the parameters below
'bSrefFromMap = True ==> the length will be calculated in the projection of the Map
'bSrefFromMap = False ==> the length will be calculated in the projection of the data
'bSrefFromMap needs to be True only if a real distance in Map units will be used - bAsRatio = False
bSrefFromMap = False
dDistance1 = 0# 'Indicates the start point of the line. Change the value to perform calculations for a different point.
bAsRatio = True ' the distance above will be used as a ratio from the total length. Change to false to input an absolute distance.
dDelta = 0.000001 'A small tolerance - no change of direction expected within this tolerance
'========================
dDistance2 = dDistance1 + dDelta
Pi = 4 * Atn(1)
If (Not IsNull([Shape])) Then
Set pCurve = [Shape]
If (Not pCurve.IsEmpty) Then
If (bSrefFromMap) Then
Set pMxDoc = ThisDocument
Set pMap = pMxDoc.FocusMap
pCurve.Project pMap.SpatialReference
End If
Set pPoint1 = New Point
pCurve.QueryPoint 0, dDistance1, bAsRatio, pPoint1
Set pPoint2 = New Point
pCurve.QueryPoint 0, dDistance2, bAsRatio, pPoint2
Set pVector = New Vector3D
pVector.ConstructDifference pPoint2, pPoint1
dAzimuth = pVector.Azimuth
dAzimuth = dAzimuth * 360 / (2 * Pi)
End If
End If
Нам мой взляд в место мизерного приращения из начальной точки (dDelta = 0.000001 )
надо использовать конечную точку линии.
А вот как ее извлечь пока незнаю.
данная команда:
Set pCurve = [Shape]
выгружает данные из поля "Shape" в массив? а где там что сидит? ( во блин, предложение из одних союзов получилось

)
или может я иду не в том направлении?