Skip to main content

Hi,

I want feature count in a variable, I am using statistic calculator for this purpose but it ask me for attribute to analyze but i want count for all features.

I guess the below links are explaining my requirement.

https://knowledge.safe.com/idea/45903/add-a-count-attribute-to-the-featureholder.html

https://knowledge.safe.com/idea/48591/save-feature-count.html

Regards,

Dheeraj

Just use any attribute in the attribute to analyse, the count will still count all features


If you could use a FeatureWriter instead of the Writer, you could use the information in the Summary to get the feature count (per writer feature type) without using additional transformers.


Use the FeatureCounter transformer from the FME Hub


Use the FeatureCounter transformer from the FME Hub

Thanks @Mark2AtSafe

 

It works

 

 


Use the FeatureCounter transformer from the FME Hub

Hey Mark

 

The domain setting used to be in the Counter but this was removed. Maybe we need a domain counter

 

 


Hey Mark

 

The domain setting used to be in the Counter but this was removed. Maybe we need a domain counter

 

 

I think that's now just the Counter Name parameter. You can select an attribute there and it counts per unique value (like a group-by). But that still gives you 1,2,3,4,etc for each group.

 

The old way we used to get the result (I remember a specific training exercise) was to apply a Counter, sort by count (descending), and then take the first feature (which we might have had to do by creating a second count and testing for count2=0). Luckily things are way easier today!

 

 


Reply