Skip to main content
Solved

Feature Count Problem

  • November 17, 2017
  • 6 replies
  • 63 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

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.

6 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3433 replies
  • 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+22
  • Contributor
  • 2179 replies
  • 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+56
  • Safer
  • 2554 replies
  • Best Answer
  • November 17, 2017

Use the FeatureCounter transformer from the FME Hub


Forum|alt.badge.img
  • Author
  • 45 replies
  • November 17, 2017

Use the FeatureCounter transformer from the FME Hub

Thanks @Mark2AtSafe

 

It works

 

 


darkspatiallord
Contributor
Forum|alt.badge.img+7
  • Contributor
  • 60 replies
  • January 3, 2018

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+56
  • Safer
  • 2554 replies
  • January 5, 2018
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!