Solved

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

  • 19 October 2016
  • 2 replies
  • 1 view

Badge

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!

icon

Best answer by ciarab 20 October 2016, 00:47

View original

2 replies

Badge +9

@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.

Badge

@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.

 

Reply