linear referencing return route from given measures

793
2
10-04-2016 06:26 AM
MikeWelch
New Contributor II

Background: I have thousands of measured 3-D polylines (have M and Z values) that all have differing lengths. I want to return the portions that start at Measure 0 and end at Measure 95%, but I don't see any tools that will work on the whole dataset or iteratively via arcpy. I want to say that AV 3.2/Avenue had a function called ALONG(startMeasure, endMeasure) that would do this.

Thanks in advance for any help that you can provide.

0 Kudos
2 Replies
ChrisDonohue__GISP
MVP Alum

I suspect this gentleman would have some ideas:Richard Fairhurst 

https://community.esri.com/community/developers/gis-developers/python 

Chris Donohue, GISP

0 Kudos
RichardFairhurst
MVP Honored Contributor

Assuming your routes do not measure gaps and all start at measure 0 you can create an event table in a few minutes that would create the segments for you.  First calculate a FROM field with 0, a TO field with (Python calculation) !Shape.LastPoint.M! to get the end measure and finally a TO_95_PCT field with !TO! * 0.95 to get the TO measure of the Route at 95%.  Then export the Table View of your routes to create an event table.

You can now use the Make Route Event Layer tool with this event table with the FROM field as the FROM measure and the TO_95_PCT field as the TO measure of a line event to see every line segment you want and you will already know the 95% length values of every route in the table.  You can use this same event table to work with the last 5% of the line by using the TO_95_PCT measure as the FROM field and the TO measure field as the TO field for a line event layer.  If you export these events to create actual Polylines they will have the same geometry as your routes, so they should contain XYMZ coordinates (including the interpolated 95% measure and Z value).