I am looking to select a segment of a polyline that is between two GPS points in ModelBuilder. The line segment is created by enabling a user to define his/hers begin end point, and then using the split line at point tool to split out the appropriate line segment.

I am struggling to find a way to select this newly defined segment once I get to this point. I would like to select and export this segment out so I can run further analysis for the user.

Does anyone have a solution that can be shared?

enter image description here

  • 1
    Is the line that the gps points are used to split a straight line? Suggest you edit your question with a sketch showing what the inputs as there are multiple solutions to this problem.
    – Hornbydd
    Mar 18, 2019 at 16:40
  • 1
    The lines will never be straight for this purpose. I have attached a picture, showing the piece of the line in red I would like to select between the two input points.
    – Ash
    Mar 18, 2019 at 20:16
  • 1
    OK, need more info, add this to the question: How many pair of points are you processing, can you have multiple pairs on a line, is it always a single line that the pairs are on or are these lines part of a network and therefore the paired points can actually be on different lines, if you have multiple paired points, do they "over lap" or are they nested, do you have stacked paired points?
    – Hornbydd
    Mar 18, 2019 at 21:02
  • 1
    There will be a single pair of points that the user will input, and they will be used on a single line. These lines are not part of a network, nor do they overlap, not nested, and not stacked.
    – Ash
    Mar 19, 2019 at 12:11

1 Answer 1


The model you require is shown below:

Click to enlarge Model

The end result is the middle segment selected:


The model works by adding XY to GPS points, splits line at GPS points and then uses add geometry tool to add start and end coordinates. For both of these datasets the XY values are converted to a string and concatenated into a single text, eg. "100,200". The split line has a startxy and endxy. The GPS data is copied into in_memory and then the in_memory and original gps data are joined back to the split line. One join to startxy the other to endxy. The resulting combination of joins identifies that line because it is the only line where its joined data for start and end are not null.

I've suggested this approach as this is the path you have started down. A completely alternative approach is to use linear referencing, where you convert your line to a measured route, then you locate your gps points as events then you build linear route events along the route. This takes less steps, probably quicker but relies on you understanding what a measured (polylineM) dataset is and how to handle it, that's all in the help file.

  • Great this method worked. You also sparked my mind to try the other method of using linear referencing. Thanks!
    – Ash
    Mar 20, 2019 at 13:46
  • 1
    @Ash, if this answer was helpful, please upvote it by clicking on the upper arrow; and if it solved your Q accept it clicking in the green checkmark beneath the votes arrows. This is explained here: gis.stackexchange.com/help/someone-answers. Thank you and welcome to GIS SE. Mar 24, 2019 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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