Skip to main content
Question

How to convert Arithmetic Angles to Geographic Angles

  • December 2, 2020
  • 3 replies
  • 477 views

bwn
Evangelist
Forum|alt.badge.img+26

Not a question, but a Tip.

 

Sometimes there is a need to convert angles measured in Arithmetic convention (counter-clockwise from the X-Axis) to Geographic convention (clockwise from North/Y-Axis).

 

capture 

For example, Transformers like TopologyBuilder output Edge angles in Arithmetic degree angles whereas Desktop GIS systems like ArcGIS can sometimes default to Geographic degree angles.

 

Instead of using complicated Conditional Value formulae to translate angles quadrant by quadrant with different formulae, searching the internet came up with a genius single formulae that converts angles back and forth, no matter what quadrant the calculated angle is in.

Geographic Angle = (450 - Arithmetic Angle) mod 360

 

Rewriting the formula into FME Maths function format it becomes this

Geographic Angle = @fmod((450 - @Value(Arithmetic Angle)),360)

It also works in reverse:

Arithmetic Angle = @fmod((450 - @Value(Geographic Angle)),360)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+62

Great piece. This should be a transformer.


david_r
Celebrity
  • December 2, 2020

Great tip, thanks for sharing. I agree that it would make for a great contribution to the FME Hub.


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • December 2, 2020

Thanks for the tip!