Skip to main content
Question

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

  • August 21, 2019
  • 5 replies
  • 591 views

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?

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • August 21, 2019

Have a look at the AreaonAreaOverlayer transformer.

That is built for cases like this.


arnovananrooij
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 73 replies
  • August 21, 2019

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


brian_
Contributor
Forum|alt.badge.img+4
  • Contributor
  • 4 replies
  • 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
Celebrity
  • 7843 replies
  • August 22, 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

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
  • 1 reply
  • August 22, 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

Thanks, this accomplished what I needed