Skip to main content
Solved

Create a "function group" to run on separated data sets


Forum|alt.badge.img

I have linear spatial data that consists of types (A, B, C, ... J, K) as well as condition (1, 2, 3, 4, 5). I am tasked with creating a list of total length of each type split by condition, ie Length of A1 = 100m, Length of A2 = 30m, ... Length of K5 = 200m.

Is there a way I can create a function that splits the input into condition and then measures it without grouping all the output data? Currently I am splitting the data into types, then splitting each type into condition, then performing measurements, which results in dozens of identical functions being run. It seems that this can be streamlined, but I am somewhat new to FME and I am unsure how to approach this.

I'm currently exporting the resulting data into excel, if that helps.

Thanks in advance!

Best answer by ciarab

@mitchellorchard I would probably create a new attribute based on type and Condition. For example use the attribute creator to produce attribute built up like @Value (type)@Value (Condition). Then use length calculator to calculate length of each line if it's not already in your dataset.

Then use the statistics calculator and set the group by function to be your new created attribute of type and Condition and analyse the attribute of length. The sum value produced out of the summary port should be total length for each type condition.

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

2 replies

ciarab
Contributor
Forum|alt.badge.img+9
  • Contributor
  • Best Answer
  • October 19, 2016

@mitchellorchard I would probably create a new attribute based on type and Condition. For example use the attribute creator to produce attribute built up like @Value (type)@Value (Condition). Then use length calculator to calculate length of each line if it's not already in your dataset.

Then use the statistics calculator and set the group by function to be your new created attribute of type and Condition and analyse the attribute of length. The sum value produced out of the summary port should be total length for each type condition.


Forum|alt.badge.img
ciarab wrote:

@mitchellorchard I would probably create a new attribute based on type and Condition. For example use the attribute creator to produce attribute built up like @Value (type)@Value (Condition). Then use length calculator to calculate length of each line if it's not already in your dataset.

Then use the statistics calculator and set the group by function to be your new created attribute of type and Condition and analyse the attribute of length. The sum value produced out of the summary port should be total length for each type condition.

@ciarab this works perfectly; thank you.

 


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