Skip to main content
Question

Atomise records

  • January 8, 2014
  • 2 replies
  • 26 views

Forum|alt.badge.img
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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • January 8, 2014
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

Forum|alt.badge.img
  • Author
  • January 8, 2014
Hi Takashi,

 

 

Easy when you know how!

 

 

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

 

 

 

Best wishes,

 

 

Rob