Created
June 7, 2019 17:15
-
-
Save BrunoCaimar/4202116411a7c5f4e566fd051f4ef2da to your computer and use it in GitHub Desktop.
GetGeographicalRadians
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| def GetGeographicalRadians(shape): | |
| radian = math.atan2(shape.lastpoint.y - shape.firstpoint.y, | |
| shape.lastpoint.x - shape.firstpoint.x) | |
| if (radian<0): | |
| radian = (radian+math.pi)*(-1)+math.pi | |
| else: | |
| radian=(radian-math.pi)*(-1)+math.pi | |
| return radian |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment