Skip to main content
Hi,

 

 

I have a set of records (no attached geometry) which contain a lower and higher value in addition to several other attributes (see example 1), I want to atomise and split each individual record so that a new incremental record (+1) is created based on the lower and higher range value.  When each new record has been created, I need to move on to the next individual record and repeat (see example 2).

 

 

 

 

Example 1 Input

 

Attr1,Attr2,Lower,Higher

 

AA,1100,10,13

 

AA,1200,201,205

 

BC,2000,31,32

 

 

Example 2 Output

 

AA,1100,10

 

AA,1100,11

 

AA,1100,12

 

AA,1100,13

 

AA,1200,201

 

AA,1200,202

 

AA,1200,203

 

AA,1200,204

 

AA,1200,205

 

BC,2000,31

 

BC,2000,32

 

 

 

 

Please note that the data does not currently exist as a list which can be exploded.

 

 

Can anyone suggest a method to do this?

 

 

Thanks,

 

 

Rob

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Hi Rob,

 

 

I think the Cloner transformer could be a solution. Use a Cloner to create copy features, the number of copies should be "Higher - Lower + 1" for every input feature. Each copied features will have an attribute named "_copynum" (by default), which contains 0-based sequential number. You can then calculate "Output" value as "Lower + _copynum" using an ExpressionEvaluator or an AttributeCreator.

 

 

Hope this helps.

 

Takashi
Hi Takashi,

 

 

Easy when you know how!

 

 

Many thanks that has worked a treat, just what i wanted.

 

 

 

Best wishes,

 

 

Rob

Reply