Skip to main content
Question

dynamic publish parameter in loop


Hi,

i want to find objects by tracing a route.

But sometimes there are more than one route because of branches and to not get into an endless loop i need to save the ID of the segments which is already used.

I couldn't find a solution to save an attribute value temporary in a loop, so I created a list (in the form of all relevant IDs, comma separated) an for every iteration where a segment with the ID is used, the ID should be deleted in the list.

And because this List counts for every feature, I need something like a (published) parameter, which is dynamic. How can I do this?

thanks,

 

keough

2 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • January 11, 2019

Have you considered using python?

 

 

I have a lot of success using the TopologyBuilder (to get edge and node id) and then a PythonCaller using graph theory (Breadth First Search, or Depth First Search) to loop through the dataset.

 

 

 

That said, in pure FME, you can store temporary values using VariableSetter/VariableRetriever combos.

mark2atsafe
Safer
Forum|alt.badge.img+45
  • Safer
  • January 11, 2019

Ah, I think I see what you need. You want to process a feature and then pass the list back to the next feature. As jdh says, you could use the VariableSetter/Replacer. You could also write the data to a temporary file (AttributeFileWriter) and have the next feature read it back with (AttributeFileReader).

I am interested to know what you're doing in the loop to trace the route. Which transformers are you using?


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