Linear Referencing - Roads - Setting "Begin" and "End" fields

1250
1
Jump to solution
05-14-2014 11:47 PM
IonutAlixandroae
Occasional Contributor
Hello,
I have a question regarding adding and calculating "Begin" and "End" fields to some routes.
The routes were created using 'Linear referencing', but the segments that are forming the routes do not have fields to inform were do they begin and end. I want to know if i can create and calculate them and how?

Also, how can I calculate the difference in minutes in "From-To" and "To-From" on those routes; for the moment I have only a field that contains the minutes to travel, this applies both from A->B and from B->A, but the time travel is different and I need to know how to calculate depending on direction?

Thank you,
Ionut Alixandroae
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JoshPotter
New Contributor
If your route has been calibrated (meaning it has M values), you can use a simple piece of code in field calculator to get the minimum and maximum M values for each line segment. Create a double type field for the begin value and the end value. Enter the calculate field dialog box for the fields, choose the Python parser (instead of VBScript), and input the following:

For Begin Value:  !shape.extent.mmin!
For End Value:    !shape.extent.mmax!

I hope this helps!

View solution in original post

0 Kudos
1 Reply
JoshPotter
New Contributor
If your route has been calibrated (meaning it has M values), you can use a simple piece of code in field calculator to get the minimum and maximum M values for each line segment. Create a double type field for the begin value and the end value. Enter the calculate field dialog box for the fields, choose the Python parser (instead of VBScript), and input the following:

For Begin Value:  !shape.extent.mmin!
For End Value:    !shape.extent.mmax!

I hope this helps!
0 Kudos