Skip to main content
Solved

reorder points -shortest path finder ?

  • February 6, 2025
  • 4 replies
  • 92 views

jokerfme
Contributor
Forum|alt.badge.img+1

Hello ,

 

I'm working on finding the path for specific lines and reorder points .I have several lines, each defined by a start and end point, but these lines also contain intermediate points. Should I merge the intermediate points with the lines before using a shortest path finder, or how will the transformer know which intermediate points belong to each line if I don't provide them? My goal is to reorder all points, including the intermediate ones, to find the correct sequence from point A to the final point, such as A, B, C, D, E, F, G.
 

Thanks in advance 

Best answer by bwn

You could potentially rely on TopologyBuilder

It will split a line in the order it encounters overlaying points along it, and can output each split Edge ID as an attribute of the Node.  This allows the Nodes to be sorted by the Split Edge IDs which will be the order they exist along the original Line.

Use something like AnchoredSnapper as an addition to this to snap the Nodes to the Lines if need to before TopologyBuilder.

 



In sample data, I used a random order of Points on a Line, but the Sorter by Edge(0) ID has reordered the points such that the Eg. 2nd Feature out of the Sorter is the 2nd Point along the Line.

So even though Point “E” was the 5th Feature that entered the TopologyBuilder, it became the 2nd Feature that exited the Sorter, which corresponds to the order it existed on the line.

 

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

4 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • Best Answer
  • February 7, 2025

You could potentially rely on TopologyBuilder

It will split a line in the order it encounters overlaying points along it, and can output each split Edge ID as an attribute of the Node.  This allows the Nodes to be sorted by the Split Edge IDs which will be the order they exist along the original Line.

Use something like AnchoredSnapper as an addition to this to snap the Nodes to the Lines if need to before TopologyBuilder.

 



In sample data, I used a random order of Points on a Line, but the Sorter by Edge(0) ID has reordered the points such that the Eg. 2nd Feature out of the Sorter is the 2nd Point along the Line.

So even though Point “E” was the 5th Feature that entered the TopologyBuilder, it became the 2nd Feature that exited the Sorter, which corresponds to the order it existed on the line.

 

 


jokerfme
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • February 7, 2025

@bwn 

I believe your idea works well.
Does this mean that later I should use feature merger to get point id (output of sorter) on  the edge ?
 

First Feature merger : Requester ( from node ) ,Supplier ( node_number) 

then connect merge output to second feature merger ( Requester to_node  , supplier node number) ?
Is that correct, or is there another method to obtain the reordered point ID on lines and determine which point is located on each line?

 

I believe , your solution will provide me what I want and thanks you for your solution and explanation and i just want to gain more knowledge.

If I use a shortest path finder, how can I reorder points on a line and determine which points are located on each line?

 

Thanks in advance 

 

 

 


AliAtSafe
Safer
Forum|alt.badge.img+22
  • Safer
  • February 11, 2025

Hi ​@jokerfme,

Suggestion on what you could do as well is, in these transformers suggested, a lot of them have the option to generate lists which can provide additional information on order and placement.


jokerfme
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • February 15, 2025

Thanks for reply ​@AliAtSafe 


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