Question

Shortest Path Finder - Problem 4


Badge

Hello All,

I am trying to create the shortest path between 48 points, but FME workbench does not display the path but at the end, I get a spider-like path (No Path) on a map. Please see image below. Thanks


7 replies

Userlevel 2
Badge +16

I believe the From_To is supposed to be a line with just two points (start and end of the Path that is to be calculated). The Network needs to be a set of connected line strings.

IN this case the From_To is a line string with 48 vertices. That might cause the issue.

Badge

I believe the From_To is supposed to be a line with just two points (start and end of the Path that is to be calculated). The Network needs to be a set of connected line strings.

IN this case the From_To is a line string with 48 vertices. That might cause the issue.

Thank you Erik for the reply. So what are your ecommendations?

 

 

Userlevel 2
Badge +16
Thank you Erik for the reply. So what are your ecommendations?

 

 

Use only the first and last point of the line like this:

 

 

Badge
Use only the first and last point of the line like this:

 

 

Thanks again Erik, I am using 2016.1 version, I do not have line builder transformer. Also If I use the first and last point, the other points will be excluded from the route.

 

 

Userlevel 2
Badge +16
Thanks again Erik, I am using 2016.1 version, I do not have line builder transformer. Also If I use the first and last point, the other points will be excluded from the route.

 

 

The LineBuilder is called PointConnector in FME 2016. And yes, this example is creating the shortest path between two points, losing the other points.

 

The ShortestPathFinder transformer is a transformer to find the shortest path between two points using a network of lines.

 

 

Userlevel 2
Badge +17

Hi @gsgoraya, The current ShortestPathFinder (at least in FME 2016.1+) accepts a polyline (i.e. a line having intermediate vertices) as a From-To line, but every vertex of the line has to match a node of the Network (exact match by default, or within a tolerance if you have specified the Snapping Tolerance parameter).

Firstly make sure if every vertex of the From-To line match a network node.

Userlevel 4

Also, remember that the ShortestPathFinder expects the lines to be properly noded, meaning that it won't route over crossing lines unless there's a node at the intersection. You can use the TopologyBuilder if you need to fix that.

Reply