Howto: 计算度方位角
文章编号 : 15556
软件: ArcGIS - ArcInfo 8.0.1, 8.0.2 MapObjects LT 1.0, 2.0, 2.0a MapObjects-Windows 1.2, 2.0, 2.0a
操作系统: Windows 95, 98, NT 3.51, NT 4.0 Windows (Alpha) NT 4.0
软件: ArcGIS - ArcInfo 8.0.1, 8.0.2 MapObjects LT 1.0, 2.0, 2.0a MapObjects-Windows 1.2, 2.0, 2.0a
操作系统: Windows 95, 98, NT 3.51, NT 4.0 Windows (Alpha) NT 4.0
1 个回复
易智瑞技术支持
赞同来自:
内容: Private Function ReturnAzimuth(pt1 As MapObjects2.Point, _ pt2 As MapObjects2.Point) _ As Double '-- Enter two points. Function returns the azimuth '-- in degrees from Point 1 to Point 2. Dim x1 As Double, y1 As Double Dim x2 As Double, y2 As Double x1 = pt1.X y1 = pt1.Y x2 = pt2.X y2 = pt2.Y Select Case True Case ((x1 = x2) And (y1 < y2)) ReturnAzimuth = 0 Case ((x1 = x2) And (y1 > y2)) ReturnAzimuth = 180 Case ((y1 = y2) And (x1 < x2)) ReturnAzimuth = 90 Case ((y1 = y2) And (x1 > x2)) ReturnAzimuth = 270 Case ((x1 < x2) And (y1 < y2)) ReturnAzimuth = 180 * ((Atn(Abs(x1 - x2) / Abs(y1 - y2))) / 3.14159) Case ((x1 < x2) And (y1 > y2)) ReturnAzimuth = 180 * ((Atn(Abs(y1 - y2) / Abs(x1 - x2))) / 3.14159) + 90 Case ((x1 > x2) And (y1 > y2)) ReturnAzimuth = 180 * ((Atn(Abs(x1 - x2) / Abs(y1 - y2))) / 3.14159) + 180 Case ((x1 > x2) And (y1 < y2)) ReturnAzimuth = 180 * ((Atn(Abs(y1 - y2) / Abs(x1 - x2))) / 3.14159) + 270 End Select End Function
创建时间:2000-10-31
最近更新: 2006-06-06
【原文链接】
http://support.esrichina.com.c ... .html
要回复问题请先登录或注册