Skip to main content
Solved

Conditional Aggregating


fmenco
Contributor
Forum|alt.badge.img+5

Is there a way to aggregate based on a condition?

I have a set of polygons that I want to aggregate based on the distance. That has worked with the workaround @takashi has posted numerous times (with the buffer, en the count etc). But now I end up with aggregates that have a larger summed attribute value than I would like. Is there a way to add conditions to the aggregating proces? As in, form an aggregate based on distance, but if the summed attribute value exceeds a certain amount, further separate the aggregates.

Best answer by takashi

You can use the Attributes to Sum parameter in the Aggregator to get the sum of the attribute from all the parts in the aggregate feature, test if the sum is greater than a certain attribute with the Tester, and then decompose each Passed feature into individual parts (i.e. original features) with the Deaggregator.

If necessary, you can store the attributes of original features using the Generate List option in the Aggregator, and restore them by specifying the list to the List Attribute to Explode parameter in the Deaggregator.

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

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

There's a custom transformer, the SpatialSorter that might be useful. I must admit I've only used it in the context of the FME Desktop Basic training course.


takashi
Influencer
  • Best Answer
  • August 24, 2018

You can use the Attributes to Sum parameter in the Aggregator to get the sum of the attribute from all the parts in the aggregate feature, test if the sum is greater than a certain attribute with the Tester, and then decompose each Passed feature into individual parts (i.e. original features) with the Deaggregator.

If necessary, you can store the attributes of original features using the Generate List option in the Aggregator, and restore them by specifying the list to the List Attribute to Explode parameter in the Deaggregator.


fmenco
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 25, 2018
takashi wrote:

You can use the Attributes to Sum parameter in the Aggregator to get the sum of the attribute from all the parts in the aggregate feature, test if the sum is greater than a certain attribute with the Tester, and then decompose each Passed feature into individual parts (i.e. original features) with the Deaggregator.

If necessary, you can store the attributes of original features using the Generate List option in the Aggregator, and restore them by specifying the list to the List Attribute to Explode parameter in the Deaggregator.

Yes, I started doing that.., but I want to aggregate everything, not just create aggregate smaller than the summed attribute. With this solutuion I would end up with aggregates and deaggregates. I could aggregates the deaggregates again, but on a different group by setting, because I would end up with the same large aggregate otherwise. I don't want this.

 

I want to aggregate everything, but with conditions to make sure that I do;t end up with ggregates that are too large in summed attribute value.

 

 


fmenco
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 25, 2018
redgeographics wrote:

There's a custom transformer, the SpatialSorter that might be useful. I must admit I've only used it in the context of the FME Desktop Basic training course.

 

I'll try this

 


takashi
Influencer
  • August 25, 2018
takashi wrote:

You can use the Attributes to Sum parameter in the Aggregator to get the sum of the attribute from all the parts in the aggregate feature, test if the sum is greater than a certain attribute with the Tester, and then decompose each Passed feature into individual parts (i.e. original features) with the Deaggregator.

If necessary, you can store the attributes of original features using the Generate List option in the Aggregator, and restore them by specifying the list to the List Attribute to Explode parameter in the Deaggregator.

Sorry, I'm unclear the situation. Could you please post a small sample dataset and your desired result?

 

 


fmenco
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 5, 2018

Bump.... I still need help with this..:-)


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