Skip to main content

I have some data similar to the following

I would like to be able to assign a group to this data as follows

I can half achieve this spatially, by dissolving the geometries, assigning a unique ID, exploding a list and then assigning that ID back to the original geometries. This isn't entirely satisfactory due to the need to ignore some areas of overlap, e.g. B & D might overlap spatially but if they're not in my report as overlapping I wish to ignore these.

Any suggestions to do this in a non-spatial way, looping perhaps?

Hi @egomm, this workflow might help you.

  1. AttributeExposer: Expose "Group".
  2. AttributeManager or AttributeCreator: Assign group ID value to the "Group" with the conditional value setting illustrated in this screenshot.

Note that you have to sort the features beforehand if they are not ordered by group. e.g.

  1. AttributeManager or AttributeCreator: Create a list attribute containing two elements - ID and OVERLAP_ID values. e.g. "_id{}".
  2. ListSorter: Sort the order of the list elements by alphabetic ascending.
  3. Sorter: Sort the features by _id{0} alphabetic ascending, _id{1} alphabetic ascending.

Additionally, the ListCombiner (FME Hub) might also be helpful. I designed this custom transformer for the purpose similar to your case.


The groups I've illustrated are simpler than those that exist in reality. It is not possible to sort the features into logical groupings and then assign a value, e.g. the following is also a valid scenario

A overlaps B Group 1

B overlaps A Group 1

B overlaps D Group 1

D overlaps B Group 1

C overlaps E Group 2

E overlaps C Group 2

D overlaps A Group 1


OK. Try the ListCombiner from the FME Hub.


OK. Try the ListCombiner from the FME Hub.

Perfect!!!

Reply