Skip to main content
Question

Filtering polygons that are completely contained within another polygon

  • September 7, 2022
  • 5 replies
  • 511 views

Hello,

 

I want to select building polygons that are completely contained by an agglomeration boundary polygon - I have been trying this with SpatialRelator and SpatialFilter, however whatever setting I try the transformers always seems to split the buildings that cross over the agglomeration boundary, separating them into two features.

 

Really, what I am attempting to do is just filter through those building polygons that are completely contained within the agglomeration boundary, and disregard those that are partially within and partially outside of it.

 

Appreciate any advice on how to facilitate this.

5 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • September 7, 2022

I would try sending the polygons to an AreaOnAreaOverlayer. This should create donuts where polygons are completely within the agglomeration. Then, send the features to a DonutHoleExtractor which should output your desired results to the Hole port.


  • Author
  • September 7, 2022
dustin wrote:

I would try sending the polygons to an AreaOnAreaOverlayer. This should create donuts where polygons are completely within the agglomeration. Then, send the features to a DonutHoleExtractor which should output your desired results to the Hole port.

Thanks ddbrocato - I assume however that this would mean that the attribution of the original building poly dataset would be removed (in addition to where buildings are split into several distinct features sharing boundaries - these would then be represented by a single poly)?


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • September 7, 2022
chris_y wrote:

Thanks ddbrocato - I assume however that this would mean that the attribution of the original building poly dataset would be removed (in addition to where buildings are split into several distinct features sharing boundaries - these would then be represented by a single poly)?

That is true, but you could use a SpatialRelator with predicate set to Equals to retrieve the original attributes. It would look something like this.

image


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • September 7, 2022

Both the spatial filter and the spatial relator should leave polygons untouched.

 

Are you able to share some sample data and your workflow


  • Author
  • September 7, 2022
ebygomm wrote:

Both the spatial filter and the spatial relator should leave polygons untouched.

 

Are you able to share some sample data and your workflow

Ah - I've found out the issue! There was an AreaOnArea overlayer buried in a custom transformer I hadn't clocked before (input by a colleague who was working on this tool previously)! I removed that and then spatial relator is working fine now. That's a couple of hours of my life I won't get back!

 

Thanks all for the help (apologies for wasting your time)!


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