Skip to main content
Solved

Extract all line segments between many pairs of points


ldreyfuss
Contributor
Forum|alt.badge.img+2

Hello,

I have a set of pairs of points that each have a uniqueID_start and unique_end field. I am trying to extract all of the line segments between each pair of points. The tricky thing is that the pairs can be several line segments long, and have other pairs intersecting them:

There could also be several points on a single spot, but corresponding to different pair sets.

It’s a mess! Any help would be wonderful!

Best answer by DanAtSafe

Hi @ldreyfuss I think you’ll want to create 2-point line segments from those pairs of points with a FromToBuilder or by some other means, then direct those and the entire network of line segments into a ShortestPathFinder.  The result will be a path of line features between each pair of points.

View original
Did this help you find an answer to your question?

2 replies

DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • Best Answer
  • October 3, 2024

Hi @ldreyfuss I think you’ll want to create 2-point line segments from those pairs of points with a FromToBuilder or by some other means, then direct those and the entire network of line segments into a ShortestPathFinder.  The result will be a path of line features between each pair of points.


ldreyfuss
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • October 17, 2024

This essentially worked! I used the LineBuilder, grouped by the shared attribute, then fed that into the ShortestPathFinder. Thanks so much for your response, I appreciate it!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings