Skip to main content

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!

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


@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