Skip to main content
Solved

Extract all line segments between many pairs of points

  • October 3, 2024
  • 2 replies
  • 146 views

ldreyfuss
Contributor
Forum|alt.badge.img+3

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

DanAtSafe
Safer
Forum|alt.badge.img+21
  • 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+3
  • 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!