Skip to main content
Solved

Shortest path from vertex, not end-pont

  • November 4, 2019
  • 2 replies
  • 36 views

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).

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

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • 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
  • 8 replies
  • November 5, 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).

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?