Skip to main content
Question

How do I perform a spatial join that merges attributes based on the area of overlap?


I have two polygons, one of parcels and one of building footprints. I am trying to merge the attributes of the parcels to the buildings. A Spatial Relator or Filter would be the obvious answer, but some of the building footprints overlap more than one parcel. I want to merge the attributes of the parcel the building is found MOSTLY within. In the case of the below picture, the red building is adopting the parcel attributes of #2. Is there a way I can prioritize the amount of overlap determining which attributes are joined, therefore adopting parcel 1?

 

5 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • August 21, 2019

Have a look at the AreaonAreaOverlayer transformer.

That is built for cases like this.


arnovananrooij
Contributor
Forum|alt.badge.img+5

You might want to try the MaxOverlappingFeatureMerger transformer from the FME hub.


brian_
Contributor
Forum|alt.badge.img+4
  • Contributor
  • August 21, 2019

Another way to do a max area based spatial join is to use a clipper>sort it by descending area>filter the duplicates. So,

1. Clipper (Merge Attributes) - Clipper: red polygon building

2. AreaCalculator (from Inside port)

3. Sorter - _area by Numeric, Descending

4 DuplicateFilter - by unique id of building

So from the Unique port you should have the parcel (by largest area) attributes attached


takashi
Influencer
  • August 22, 2019
brian_ wrote:

Another way to do a max area based spatial join is to use a clipper>sort it by descending area>filter the duplicates. So,

1. Clipper (Merge Attributes) - Clipper: red polygon building

2. AreaCalculator (from Inside port)

3. Sorter - _area by Numeric, Descending

4 DuplicateFilter - by unique id of building

So from the Unique port you should have the parcel (by largest area) attributes attached

Good suggestion. In addition, if you need to preserve the original geometry of the building, you can use a pair of GeometryExtractor (before Clipper) and GeometryReplacer (after DuplicateFilter) to save and restore the geometry.


  • Author
  • August 22, 2019
brian_ wrote:

Another way to do a max area based spatial join is to use a clipper>sort it by descending area>filter the duplicates. So,

1. Clipper (Merge Attributes) - Clipper: red polygon building

2. AreaCalculator (from Inside port)

3. Sorter - _area by Numeric, Descending

4 DuplicateFilter - by unique id of building

So from the Unique port you should have the parcel (by largest area) attributes attached

Thanks, this accomplished what I needed


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