Skip to main content
Solved

Feature Count Problem

  • November 17, 2017
  • 6 replies
  • 53 views

Forum|alt.badge.img

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

Best answer by mark2atsafe

Use the FeatureCounter transformer from the FME Hub

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

6 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • November 17, 2017

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


erik_jan
Contributor
Forum|alt.badge.img+19
  • Contributor
  • November 17, 2017

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.


mark2atsafe
Safer
Forum|alt.badge.img+49
  • Safer
  • Best Answer
  • November 17, 2017

Use the FeatureCounter transformer from the FME Hub


Forum|alt.badge.img
  • Author
  • November 17, 2017
mark2atsafe wrote:

Use the FeatureCounter transformer from the FME Hub

Thanks @Mark2AtSafe

 

It works

 

 


darkspatiallord
Forum|alt.badge.img+6
mark2atsafe wrote:

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

 

 


mark2atsafe
Safer
Forum|alt.badge.img+49
  • Safer
  • January 5, 2018
darkspatiallord wrote:
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!

 

 


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