Skip to main content
Question

count objects with the same attribute


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

2 replies

takashi
Evangelist
  • 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+19
  • 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

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