Skip to main content
Solved

Clipping strategy for donut polygons when some features are missing


mk-det
Contributor
Forum|alt.badge.img+1

Hi all,

I’m trying to create clean cutouts (like donut shapes) from overlapping polygons in FME.

For example, lets say I have four geometries A, B, C, and D, with each progressively larger and fully containing/overlapping the smaller ones. I want to subtract the inner shapes from the outer ones (e.g. D minus C, B, A; C minus B, A; etc.) so that only the ring-like areas remain.
 

 

I’ve previously used the AreaOnAreaOverlayer with overlap counts to determine hierarchy (e.g. a shape with 1 overlap is the largest, and one with 3 overlaps is the smallest, so I can then figure out what is what).
However, this approach breaks when some of the smaller shapes are missing. I still need the output features to retain their original attributes (e.g. A, B, C, etc.), regardless of which shapes are present. For example, shape A might be missing, or both A and B  but you’d never have A and C without B. So I need a method that can still produce correct results even when some of the smaller shapes aren’t there.

I’m exploring the Clipper transformer to do the subtraction. I suspect grouping might help (e.g. by ID or level), but I’m unsure how best to structure it so each larger shape clips against all smaller ones within the same group.

Any tips or examples would be much appreciated!

Best answer by ebygomm

Although i think this approach with the areaonareaoverlayer could work too

 

 

View original
Did this help you find an answer to your question?

3 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • May 30, 2025

How about something like this? Use the spatial relator to determine shapes which contain other shapes and build a list, sort that list in size order largest to smallest, keep the first item in the list and then use the geometry from that in the donut builder with a group by on whatever is the unique identifier

 


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • May 30, 2025

Although i think this approach with the areaonareaoverlayer could work too

 

 


mk-det
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • June 3, 2025

Awesome! Thanks so much ​@ebygomm that works perfectly and is such as elegant and straightfoward solution. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings