Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How can I calculate the angle of each polyline in ArcGIS?

share|improve this question
add comment

1 Answer

I found a similar question on an ESRI forum that had a good answer. The image below shows a sample polyline dataset to test the field calculator on. The attached code block below calculates the degrees from the x-axis. Try the following steps:

  1. Use the Split Line at Vertices tool to create individual line segments from your poly line.
  2. Add a field in your attribute table called "angle"
  3. Right-click the "angle" field name header and open the field calculator
  4. Add the python code to the code block as in the example and click OK
  5. You may need to alter the code to meet you specific needs, but this will get you started.

enter image description here

enter image description here

share|improve this answer
    
You should be using atan2 –  Mike T Dec 16 '12 at 20:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.