Skip to main content

Hi fellow FME enthousiasts,

Another case i'm struggling with today.

I have a list of parcels that need to be added into a Excel template. In most cases I can sort the parcels by parcelnumber and concatenate them grouped by the Section number and write them to the Excel.

But the field in the template can fit a maximum of 5 parcel numbers. So if there are more then 5 parcels they need to be split in groups of 5. 

So say i have a file with 13 parcels, I would need to split them into 3 groups (2 of 5 parcels and 1 of 3 parcels). 

I can get the number of parcels with a StatisticsCalculator, but i struggle with the part where i have to split them into groups to write to the Excel. How would you do this?

 

Cheers!

many ways to achieve this I think, but for example:

  • use a counter to calculate a number but do it per section (Count Domain → Section, let’s call the resulting attribute SectionCounter)
  • create a new attribute ‘ParcelGroup’ and calculate it as:
@Evaluate(@floor(@Value(SectionNumber)/5,0))

this ParcelGroup will be 0, 1, 2, … per 5 occurences in a Section


many ways to achieve this I think, but for example:

  • use a counter to calculate a number but do it per section (Count Domain → Section, let’s call the resulting attribute SectionCounter)
  • create a new attribute ‘ParcelGroup’ and calculate it as:
@Evaluate(@floor(@Value(SectionNumber)/5,0))

this ParcelGroup will be 0, 1, 2, … per 5 occurences in a Section

Thank you, this is what i was looking for!

 

Cheers and happy easter!


Reply