Skip to main content
Question

FME loop returned 0 for further iteration

  • February 28, 2018
  • 3 replies
  • 20 views

I have a copper cable table which has attributes of startjoint and endjoint. I would like to build a cable path from the lead-in cable to the copper pillar. The logic to build the path is based on the startjoint and endjoint. The cable whose endjoint = startjoint of another cable is the upstream cable. By joining them, a complete path can be built.

Due to the uncertainty of the numbers of cables between the lead-in to the pillar, I would like to use Loop to achieve this. I have used inlinequerier to join the cables and any result returned will go back to the loop. The loop will stop when there is no feature returned where endjoint = startjoint. However, the iteration only occurs 1 and no feature is returned for iteration even there are 11 features output from the result.

Any suggestion what is the best approach to achieve this? Thanks.

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.

3 replies

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • February 28, 2018

This is a basic connected component graph problem (https://en.wikipedia.org/wiki/Connected_component_(graph_theory))

 

 

While I would solve this in python, David MacIver wrote a blog post about doing so in SQL.

 

https://www.drmaciver.com/2008/11/computing-connected-graph-components-via-sql/

 


thanks @jdh, your answer is very helpful. But one more question, what is the reason which stops the iteration in the loop. There are 11 features but none of them was sent back to iteration.

Thanks.


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • March 1, 2018

At a guess, the inlineQuerier has two input ports, but only one of them has a loop input, so there are no results to the query the second time around since there are no cables for the inner join.