Skip to main content
Solved

How to create a for loop


Forum|alt.badge.img

How can I define a for loop, that count the average one after an other point. I sorted the point list, so now they are in ascending numeric order, and I want to calculate get a values that comes from the average of the points . For example: the fifth elements average is counted from the first five data, the sixth is from the 1,2,3,4,5,6th element?

Best answer by gazza

You might not need a loop, the Cumulative output of the StatisticsCalculator may give you the result you are after.

View original
Did this help you find an answer to your question?

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

You can only do loops inside a custom transformer. Check out the FME Desktop Advanced training, it has a section on custom transformers that includes loops.


gazza
Contributor
Forum|alt.badge.img+6
  • Contributor
  • Best Answer
  • August 6, 2019

You might not need a loop, the Cumulative output of the StatisticsCalculator may give you the result you are after.


david_r
Evangelist
  • August 7, 2019

If you're comfortable writing some lines of Python, then the PythonCaller could also be a fast and efficient solution.


Reply


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