Solved

Fanning out a feature based groups of a set number

  • 10 August 2018
  • 4 replies
  • 4 views

Badge

Hi there,

I've been trying to find answers all over the internet, but no results.

In short, I'm generating a CSV output where my input is an unknown amount of entries (workbench will be run several times and input varies each time), but I want to generate a separate CSV for a maximum of 500 entries found.

So as some examples, based on hypothetical inputs, this is the output I want:

350 entries - 1 output sheet

1700 entries - 4 sheets (3 with 500 each and one with 200)

502 entries - 2 sheets (one with 500, another with 2)

I'm not particularly concerned about the order of these features. I tried the ModuloCounter, but instead of splitting up my input per 500, it splits up my input into 500 equally sized groups, which won't do.

Thanks in advance,

icon

Best answer by ebygomm 10 August 2018, 13:15

View original

4 replies

Userlevel 1
Badge +10

If count your attributes then you can create a group in the AttributeCreator with the following formula

@Evaluate(@floor(@Value(_count)/500))
Badge

@egomm,

Works perfectly, thanks a million!

Best regards,

Badge +4

I'm trying to figure out how to split a list into smaller segments. I assume this would work the same but I don't understand how you are using the formula. Do you have a visual?

thanks

Userlevel 1
Badge +10

I'm trying to figure out how to split a list into smaller segments. I assume this would work the same but I don't understand how you are using the formula. Do you have a visual?

thanks

This assigns a common attribute to features so that each group contains a specified number of features (in this case 100) . The common attribute can then be used in a fanout

The workflow to split a list into smaller segments would be quite different.

Reply