Solved

create group from numeric value


Badge +1

Hi !

I have an xls file with 2 columns. One contains a code and the other contains numerics values.

I would like to create an attribute that group my data when there are a break on the values and group by code. For example :

 

code value

a 1 => group 1

a 2 => group 1

a 3 => group 1

a 10 => group 2

a 11 => group 2

b 1 => group 3

b 2 => group 3

 

I saw "AttributeRangeMapper" but I have to indicate the bounds. In my case I would like that the bounds are create automatically because my datas change every time.

My values can be integer or decimal.

 

Thanks !

 

icon

Best answer by geomancer 18 May 2022, 13:54

View original

3 replies

Userlevel 3
Badge +33

Use the 'Adjacent Feature Attributes' option of the AttributeManager. When 'Code' does not change, and 'Value' increases by 1, use the current group number. In all other cases increase the group number by 1.

Grouping

Badge +1

Great!

I didn't know this option.

Thank you! It works very well!

Userlevel 3
Badge +33

That's what I like most about this community: is a great place to learn something new about FME. Every day!

Reply