I am trying to calculate the From and To fields in the line table. I have got a points shape and i have got a line shape. ( see for example the figure bellow.) The points( in red ) intersect with lines. My plan is to get the distance from points for the begin and end of the each line segment. I have tried spatialjoin but it gives only the distance but not giving +/- form the points location. I need to update each line with the 'ID'of the point + begin and end distance from that 'ID'point ( see the figure : in table i have updated 2 records manually). I think i am clear about what i want to do. What i have done is just measured the distance with measuring tool and updated the fields manually. I have more than 500 line segemnts. I think there must be a better way than this.
I am working with ArcMap 10.6

figure ( it's an example) : enter image description here

1 Answer 1


This might solve it.

Run Feature Vertices To Points with the following parameters: in_features: your lines, out_featureclass: path to a fc with name like 'pts_start', point_location: 'START'

Run Generate Near Table in_features: your points, and near_features 'pts_end', out_table to 'pts_end_dist'

I think all the data you need to get the END point data is spread across the 4 datasets. Then it's a matter of joining the data (with the Add Join tool or the layer context menu) and running a Calculate Field to create a single value and put it into your field named 'TO'.

If that works, repeat for the FROM value.

  • Thanks for trying to solve the issue. I tried your solution but its not producing the desired results to me. Genearate Near Table gives the distances(start_pts and end_pts) but not gives the + or - from the points ( red in figure ). For example for start_pts line 4 ( green line in figure ), i am getting distance from point "ZCA2". But instead i want to get from "ZBA1" .
    – Ram
    Commented Mar 22, 2020 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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