I'm not sure if this is the right place to put this question. If not, please let me know.

I am trying to find the angle between adjacent lines in a single layer. I plan to accomplish this by subtracting the incidence angle of one line from that of its adjacent line. The lines come from polylines split at vertices, so the start coordinates of one line exactly match the end coordinates of another line.

I have a field with the incidence angle for each line, a field with the begin xy of the line, and a field with the end xy of the line. I am trying to figure out how to have a script loop through the table, find the line whose beginningxy matches the endxy of the current line, and subtract the angles. I am not very familiar with Python so I would greatly appreciate guidance.

Thanks!

I am trying to find the angle between adjacent lines in a single layer. I plan to accomplish this by subtracting the incidence angle of one line from that of its adjacent line. The lines come from polylines split at vertices, so the start coordinates of one line exactly match the end coordinates of another line.

I have a field with the incidence angle for each line, a field with the begin xy of the line, and a field with the end xy of the line. I am trying to figure out how to have a script loop through the table, find the line whose beginningxy matches the endxy of the current line, and subtract the angles. I am not very familiar with Python so I would greatly appreciate guidance.

Thanks!

The new lines will still have any original line ID you may have used

and be in order in the table from original from onwards.

You can identify the individual parts in order and add a segment ID.

For example, add an integer segID field to your table

and you already have your origLineID field:

Use an update cursor to run through the table and for each new origLineID,

you start with a segID of 1, and each time the origLineID stays the same, you increment the segID.

With line and segment ids, you can create a dictionary of a list of

incidence angles, in segment order, for each original line

Then it is always differences between adjacent pairs of angles.

This is all just off the cuff: no warranties...