Skip to main content

Hello, probably this is something easy to achieve but I'm still new to FME. 

I'm reading a set of points from a DWG file. These are definition points from a dimension feature. Each dimension object has 3 definition points, but there is no dimension ID. All that I have is a set of points listed consecutively; the first 3 points belong to one feature, the next 3 points belong to another feature and so on. I want to group all points using a count or split rule but so far I can't find a way to implement it. 

Here is an example of what I want to accomplish. 

Count   fme_feature_type
1  Dimension |
2  Dimension      |--> Group 1 
3 Dimension |

4 Dimension | 
5 Dimension |--> Group 2 
6 Dimension |

Thanks 

group = ceiling (count/3).


group = ceiling (count/3).

Thanks for the reply, but could you tell me what type of transformer should I use?


Use an attributecreator you can set the attribute value of a new attribute called group using ceil(@Value(count)/3)


Use an attributecreator you can set the attribute value of a new attribute called group using ceil(@Value(count)/3)

Nice solution, thanks much!


The other way would be to use a Counter and a ModuloCounter. Take the modulo count away from the full count (ExpressionEvaluator) and you get a unique ID for that group (the ID would be 3, 6, 9, 12, etc instead of 1, 2, 3, 4; but it will be unique for that group)


Reply