Skip to main content
Solved

Reclassification of attributes into groups

  • August 19, 2015
  • 3 replies
  • 42 views

arnold_bijlsma
Enthusiast
Forum|alt.badge.img+15
I have an address table where each address point is classified into 1 of about 500 classification codes. I need to reclassify / condense this into just 10 codes:

 

1 = Code R% = Residential

 

2 = Code C% = Commercial

 

3 = Code CE% = Educational

 

4 = Code CX% = Emergency Services

 

...etc.,

 

where % is a wildcard character

 

 

I have tried a couple of transformers, but most don't support wildcards, so the 'best' option so far I have come up with is 10 pairs of Tester+AttributeCreator transformers in sequence.

 

My feeling is that there may be an easier way. Is there?

 

 

(Note: I am aware of the overlap in codes. The second line classes all lines starting with C as Commercial, but then the third line reclassifies those starting with CE as Educational)

Best answer by fmelizard

Hi,

 

Yes there is, one AttributeCreator in which you make use of the conditional values definition.

 

http://blog.safe.com/2013/03/fmeevangelist113/
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.

3 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • August 19, 2015
Hi,

 

Yes there is, one AttributeCreator in which you make use of the conditional values definition.

 

http://blog.safe.com/2013/03/fmeevangelist113/

arnold_bijlsma
Enthusiast
Forum|alt.badge.img+15
  • Author
  • Enthusiast
  • August 20, 2015
Hi Itay

 

 

Dankjewel. That was exactly what I was looking for! See below for some screenshots. And also thanks to Mark Ireland for the very well and clear written blog post.

 

 

My AttributeCreator Condition Definition:

 

 

 

My workspace, showing Before in pink and After in green:

 


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • August 20, 2015
Graag gedaan, Its a great addition that I use very frequently wouldnt know what to do wothout it nowdays.