Incidence angle between line segments

1077
15
Jump to solution
11-15-2018 12:46 PM
JimFritz
Occasional Contributor

Does anyone have a script or know of a tool that can calculate incidence angle between line segments?  I've done some searching and there does not appear to be a tool that can do this.  Also, there are other solutions but none that compare line segments that are coincident to each other.  In this case, it is a collection of transmission lines that are separated by poles (nodes) and need to know when an incidence angle is greater than 30 degrees between one arc (line segment) and the next coincident arc (line segment).

Thank-you,

Jim Fritz

0 Kudos
15 Replies
RichardFairhurst
MVP Honored Contributor

You did not check the Python option at the top of the Field Calculator.  The code will definitely not work if the VB Script option is checked.

0 Kudos
DuncanHornby
MVP Frequent Contributor

Python is case sensitive. I would have written it as:

shape.firstPoint.X

Note P and X are upper case.

JimFritz
Occasional Contributor

OK, that's the first part of my original question:  how to assign the incidence angle between adjacent vectors to the point in-between both?

incidence angle

0 Kudos
JimFritz
Occasional Contributor

Re-thinking what is needed is not necessarily the point receiving the incidence angle but instead assigning the polyline layer an attribute with the value of the difference between  adjacent vector angles.  So, in the example above, without doing the math it appears that the incidence angle would be nearly 90 degrees.  (The angle measurements appear to be from the X-axis.)  Once that value is computed a query showing which vectors have an incidence angle greater than or equal to 30 degrees could be made. 

Any thoughts about the math needed to compute this value would be appreciated.  High school geometry re-visited!

0 Kudos
AnaDeniston
New Contributor II

Hi Ducan, 
I know this problem is pretty old, but I develop a tool that extracts inflection points. I will attach a toolbox here in case anyone comes across this issue again. 

0 Kudos
Scott_Harris
Esri Regular Contributor