Solved

Shortest path from vertex, not end-pont

  • 4 November 2019
  • 2 replies
  • 3 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.

 

icon

Best answer by fmelizard 4 November 2019, 17:41

View original

2 replies

Userlevel 4
Badge +13

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

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?

 

 

Reply