Skip to main content
Solved

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

  • October 19, 2016
  • 2 replies
  • 16 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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

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