Skip to main content
Question

Shortest Path Finder - Problem 4


Forum|alt.badge.img

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

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • July 5, 2017

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.


Forum|alt.badge.img
  • Author
  • July 5, 2017
erik_jan wrote:

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?

 

 


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • July 5, 2017
gsgoraya wrote:
Thank you Erik for the reply. So what are your ecommendations?

 

 

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

 

 


Forum|alt.badge.img
  • Author
  • July 5, 2017
erik_jan wrote:
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.

 

 


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • July 5, 2017
gsgoraya wrote:
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.

 

 


takashi
Influencer
  • July 5, 2017

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.


david_r
Celebrity
  • July 6, 2017

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.


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