0

In FME, I am wondering what would be the best way to, within a field, sort a list of previously concatenated attributes?

I have two fields of previously concatenated values that I want to dissolve and then aggregate into a single polygon.

For instance:

DOG; CAT; FLOWER | ANIMAL; ANIMAL; PLANT

CAT; DOG; FLOWER | ANIMAL; ANIMAL; PLANT

The above setup will result in two polygons even though they should actually be one entity.

Is there an easy way to do this in FME? The tricky part is that I have two fields which can't be sorted independently of each other.

2
  • That's what I was doing, a dissolve followed by an aggregate, but the problems lies in having a single attribute of previously concatenated fields (e.g. the example above). I will try to explode, sort and recombine the attributes to see if that works.
    – smh
    Mar 4, 2018 at 22:21
  • Thank you. The following process flow now appears to be generating a suitable output: ... AttributeSplitter > ListSorter > ListConcatenator > Dissolver > Aggregator ...
    – smh
    Mar 5, 2018 at 2:51

2 Answers 2

3

Have a look at the AttributeSplitter transformer. It will allow you to split by a character - looks like it could be a semicolon in your case. This will then put all the attributes into a list attribute.

You could then use a ListSorter transformer to sort them all.

Then, pass that List into a ListConcatenator transformer which will combine all the list attributes into a single attribute.

Finally, you can use the Aggregator transformer and ensure you set your GroupBy attribute to your new concatenated attribute.

1

If what you want is a multipart polygon (2 polygons 1 entitiy) as you said, then i suppose you are looking for the aggregator transformer using the groupby attribute set to your concatenated field.

'An aggregate is a collection of geometries of any type that is treated as a single unit. Aggregates may or may not be homogenous and/or hierarchical.'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.