Skip to main content
Question

count objects with the same attribute

  • July 24, 2013
  • 2 replies
  • 96 views

hello,

 

 

I have 2 CSV files with 5 columns each: ID_region, ID_point, X,Y,Z

 

I wan't to count and to put in a file the number of points for each ID_region.

 

 

Afterwards, I want to compare the 2 files to have the proportion of points for each ID regions.

 

 

(I think I should use Counter or ListElementCounter or ExpressionEvaluator or some thing like that, but I don't now how to have the informations not on each lines.)

 

 

Thanks a lot
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

takashi
Celebrity
  • July 24, 2013
Hi,

 

 

I would use the StatisticsCalculator transformer with specifying ID_region to "Group By" parameter.

 

 

Takashi

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • July 24, 2013
Hallo,

 

 

You can read both csv files and adding the fme_feature_type attribute to the group by parameter in the statistics calculator, will result in a count per region for each file. After that you can use the tester/testfilter to compare.

 

 

Hope this helps,

 

Itay