Skip to main content

Hello there

the data we have looked like this as a sample

steaure calssificationas you can see each end value of the r-name is the start of the next feature

the goal is to group them based on this relationship

end result should look

fature_grupingThanks

 

 

You can do this with adjacent attribute mapping. If you split r_name by the hyphen, you can then use a conditional statement to assess whether the end of the previous value matches the start of the current value. If there is a match, use the group id from the previous value, otherwise increment by 1

image


You can do this with adjacent attribute mapping. If you split r_name by the hyphen, you can then use a conditional statement to assess whether the end of the previous value matches the start of the current value. If there is a match, use the group id from the previous value, otherwise increment by 1

image

@ebygomm​ 

Thanks for your replay

I cant find the transformer could u please share the complete name

just a note the features are not coming in order all the time, is this will work

Thanks


@ebygomm​ 

Thanks for your replay

I cant find the transformer could u please share the complete name

just a note the features are not coming in order all the time, is this will work

Thanks

The transformer is an AttributeCreator, you could also use an AttributeManager. This workflow would rely on the features coming through in order.


If you can't rely on order this is another approach using the excellent ListCombiner custom transformer. You would need to add 1 to the Group ID if you wanted group numbering to start from 1 instead of 0

 

image


Example

 


Reply