I am working in QGIS. I have 2 polygon layers,

  1. One layer is the parcel polygons layer for a county called "Parcel"
  2. The other layer is the building footprints polygon layer for the same county called "BuildingFootprint"

The building footprints features overlap multiple parcel polygons. I want to select the parcel polygons that the building footprint overlaps the most (majority). So for example, if I have two parcel polygon features overlapped by one building footprint feature, I want to select the parcel polygon that is covered by 90% of the building footprint feature and not select the parcel polygon feature that is covered by 10% of the building footprint.

Uncovering a way to select the parcel that is covered by majority of the building footprint will then allow me to join that particular parcel feature's number to the building footrpint feature's attribute table.

  • Could you add information (1) layer names, and (2) the name of unique id field for each layer?
    – Kazuhito
    Commented Sep 13, 2018 at 11:30
  • Hi Kazuhito. The two layer names are "Parcels" and "BuildingFootprints". The unique ID for the Parcel layer are individual parcel numbers. Example "16 28 09 23925 000 1910". The reason why I want to find a way to select the parcel that is covered by majority of the building footprint is because I want to then join that particular feature's parcel number to the building footprint feature's attribute table. Does this help? Commented Sep 13, 2018 at 12:09
  • Thanks James. Sorry I was not clear about the ID. Would the Parcels and BuildingFootprints layers have id field, something like ID or fid?
    – Kazuhito
    Commented Sep 13, 2018 at 12:13
  • No worries! And yes each layer has unique ID's for it's features. For the parcel layer it is under the column labeled "PARCELNO" and for the building footprint layer the unique ID's are under the column labeled "Florida_ID" Commented Sep 13, 2018 at 12:19

1 Answer 1


QGIS 3.2

(0) Prepared a test dataset:

  • Parcels polygon layer (3 features): unique id field= PARCELNO
  • BuildingFootprints layer (3 features): unique id field= Florida_ID

enter image description here

(1) Join attribute by location tool (QGIS processing toolbox | Vector general)

Make sure to choose Create separate feature for each located feature (one-to-many) option. This is the important tool newly available in QGIS 3.2 to produce all combinations of polygon overlay.

enter image description here

(2) Now you will have Joined layer layer with Florida_ID and PARCELNO fields. Then open the attribute table of this Joined layer and start the Field Calculator.

(2a) First, calculate overlapping percentage for each row.

enter image description here

Expression is:

area(intersection($geometry, geometry(get_feature('Parcels', 'PARCELNO', "PARCELNO")))) 
/ area($geometry) * 100

(The first line is calculating the area, while the second line / area($geometry) * 100 is just turning it into the percentage.)

enter image description here

(2b) And add another field to pick the polygon which overlapping percentage is the biggest among the Building group.

enter image description here

Its expression is "overlap" = maximum( "overlap", group_by:= "Florida_ID")

enter image description here

(3) Lastly, select the value 1 from the above calculated field (Best). They are the combination you need, I mean, the "most overlapping" Building-Parcels polygons. (Or, you may simply delete Best=0 rows).

  • Kazuhito you're a beast. Thank you so much for finding me a solution to this problem! Commented Sep 13, 2018 at 17:10
  • Wow, thanks @JamesCooper ! I'm glad to know it worked. :)
    – Kazuhito
    Commented Sep 14, 2018 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.