3

Working in QGIS, I have two polygon layers:

  • Building Footprint Polygon Layer
  • Parcel Polygon Layer

These two layers have a matching field in the attributes known as "Parcel Number". I would like to clip the building footprint features to be within the parcel polygon features based on matching parcel numbers. So if I have a building footprint feature that overlaps two parcel polygons, I would like to clip the building footprint to be within the parcel polygon that has the same parcel number as the building footprint.

2

QGIS3.0+

Let us assume we have a buildings layer (orange polygons: A, B, C) which is linked to another layer parcel (gray polygons: 101, 102, 103) by Parcel_Num attribute field.

enter image description here

We can use Geometry by Expression tool in Processing Toolbox | Vector geometry.

Click on the large Epsilon mark to open an expression dialog window:

enter image description here

Expression is:

intersection($geometry, geometry(get_feature('parcel', 'Parcel_Num', "Parcel_Num")))

And we will get red dashed polygons shown in a picture below, in which we can visually confirm A - 102, B - 101, C - 103 pairs.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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