Professional Documents
Culture Documents
Kode Mencari Arah Garis
Kode Mencari Arah Garis
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