Skip to main content
Solved

Shortest path from vertex, not end-pont


Hi,

 

I have a workspace that snaps my "From-To"-line to the end-point, which is working fine.

However, I have some adresses which I want to route to the nearest object. So therefore I would want to start the line from the nearest position possible in the network, not from end-point (because the distances can vary very much between them).

I´ve tried the "LineDivider" to create more lines and therefore get more end-points, which works, but seems to be a little bit over-worked.

Is it possible to snap the "From-To"-line to a vertex of the network (instead of the end-point) in any other way, run the "ShortestPathFinder" and get a result?

 

(I´ve tried the "AnchoredSnapper" with "Vertex snapping", but that only generates a "NoPath").

It seems odd only to be able to find the shortest path from end-point to end-point.

 

Best answer by fmelizard

Hi @eetmyhouse Unfortunately this is a known limitation of the ShortestPathFinder - the vertices in the From-To lines must be within tolerance of the ends of lines from the network. Try a PointOnLineOverlayer first to create end nodes in the network from the From-To vertices (as points).

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

2 replies

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • November 4, 2019

Hi @eetmyhouse Unfortunately this is a known limitation of the ShortestPathFinder - the vertices in the From-To lines must be within tolerance of the ends of lines from the network. Try a PointOnLineOverlayer first to create end nodes in the network from the From-To vertices (as points).


  • Author
  • November 5, 2019
fmelizard wrote:

Hi @eetmyhouse Unfortunately this is a known limitation of the ShortestPathFinder - the vertices in the From-To lines must be within tolerance of the ends of lines from the network. Try a PointOnLineOverlayer first to create end nodes in the network from the From-To vertices (as points).

Thanks for the clarification @danatsafe. Will try your proposed solution for this.

Maybe an update with more detailed clarification regarding this in the transformers "help"-section would be good?

 

 


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