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?