1

I have two polygon shapefiles which contain about 30 features. These features have different boundaries in both shapefiles so the areas are different too.

I want to calculate that difference in the area for each feature using QGIS. Shall I use the intersection tool for that?

4
  • 1
    you should use 'difference' instead of intersect.
    – eurojam
    Apr 15, 2019 at 20:27
  • @eurojam But how I can know difference between each feature if I use difference tool. That will just delete intersecting areas and keed the rest.
    – user122678
    Apr 15, 2019 at 20:33
  • 1
    I would compute the areas, join the two datasets on your common key field, and then subtract that the two area columns from each other.
    – Paul H
    Apr 15, 2019 at 21:02
  • Do you have access to geopandas? This is very easy in geopandas.
    – Paul H
    Apr 15, 2019 at 21:04

1 Answer 1

2
  1. Use the Field Calculator to calculate the area in each layer (we'll call them Layer 1 and Layer 2). Store these value as attributes, eg "L1_area" for the area of Layer 1, and "L2_area" for the area of Layer 2.
  2. Join the "L2_area" attribute to Layer 1.
    • If your layers have an attribute with shared values, you can achieve this with a table join.
    • If your layer doesn't have a shared attribute, AND corresponding features overlap each other (but not other features), you can do a spatial join instead (join attributes by location tool).
  3. Calculate the difference between "L1_area" and "L2_area"

    "L1_area" - "L2_area"
    

Your Answer

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

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