Skip to main content

I am trying to do a concatenate merging two text attributes via SpatialRelator (parcel boundaries and flooding depths) and ListConcatenator. The concatenated field contains duplicate values (eg multiple areas of 0.1-0.5m flooding). I am looking for a way to delete the duplicate value so only the value only appears once.

Example:

Concatenate Field Result: Above 1m, 0.1-0.5m, 0.5-1m, 0.1-0.5m, Above 1m

Desired Result: Above 1m, 0.5-1m, 0.1-0.5m

Can anyone suggest a way to do this?

Ideally I'd like to also identify the maximum flooding depths on a property (eg Above 1m) but to get the concatenated field working would suffice for now.

Thanks in advance...

Hi @anne_shanahan, consider using the ListDuplicateRemover before concatenating the elements.

To identify the maximum,

  1. Before creating the list, map the strings indicating depth class to numbers in the ascending order. e.g. "0.1m-0.5m" -> 1, "0.5m-1m" -> 2, "Above 1m" -> 3. The AttributeValueMapper can be used do do that.
  2. After creating the list, sort its elements by the number (numeric descending) with the ListSorter. The first element of the list would be the maximum.

Hi @anne_shanahan, consider using the ListDuplicateRemover before concatenating the elements.

To identify the maximum,

  1. Before creating the list, map the strings indicating depth class to numbers in the ascending order. e.g. "0.1m-0.5m" -> 1, "0.5m-1m" -> 2, "Above 1m" -> 3. The AttributeValueMapper can be used do do that.
  2. After creating the list, sort its elements by the number (numeric descending) with the ListSorter. The first element of the list would be the maximum.

thank you @takashi, the ListDuplicateRemover worked great. I had tried putting it after the ListConcatenator rather than before. I also got the highest value from your instructions, some problems with AttributeValueMapper (user error no doubt as I'm new to FME) so I used Testers and AttributeCreator instead but overall solution worked great. Thank you


Reply