ADD GEOMETRY ATRIBUTES "line bearing"
and than if you want azimuth in arthitimatic you can do this [(450- !BEARING! ) % 360] in python calc field
Yes, since % represents the modulus which can be expressly stated in the math and numpy module.
This has been used many times in scripts, and it is sometimes safer to use the expressly stated version rather than relying on short form operators like %
angle <SPAN class="operator token">=</SPAN> <SPAN class="number token">135</SPAN> math<SPAN class="punctuation token">.</SPAN>fmod<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">450</SPAN> <SPAN class="operator token">-</SPAN> angle<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">360</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="number token">315.0</SPAN> np<SPAN class="punctuation token">.</SPAN>mod<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">450.0</SPAN> <SPAN class="operator token">-</SPAN> angle<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">360</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="number token">315.0</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.