Parser: Python Expression: GetAzimuthPolyline( !Shape!) Code Block: import math def GetAzimuthPolyline(shape): radian = math.atan((shape.lastpoint.x - shape.firstpoint.x)/(shape.lastpoint.y - shape.firstpoint.y)) degrees = radian * 180 / math.pi return degrees
radian = math.atan((shape.lastpoint.x - shape.firstpoint.x)/(shape.lastpoint.y - shape.firstpoint.y))
radian = math.atan((shape.lastpoint.y - shape.firstpoint.y)/(shape.lastpoint.x - shape.firstpoint.x))
How do I modify the Python code so that it returns the angle in a different projection? I want to use the code in the Field Calculator in ArcMap. My data is in BC Albers and I want to return the angle in UTM Zone 11N.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.