I have two polygons layers, and I'm looking to find the % Area of layer A polygons that are placed inside layer B polygons. (some of them are totally inside ,so I expect to get the result "1", and some of them are half in and half in other polygon, so I expect to get "0.5" for both polygons of layer B)

When i'm using the Intersection tool (Vector->Geoprocessing tools), I get the following error: "Input layer A contains invalid geometries (Feature 1426). Unable to complete intersection algorithm."

When I try to use the "Join Attributes by Location" tool (Vector->Data Management Tool),using "Intersects" Geometric Predicate, I get a table with all layers A that intersect layer B, that's great but I can't calculate the % area of layer A polygons that are inside layer B polygons.

I'm using QGIS 2.18.4. Both layers are CRS EPSG:4326, WGS 84. Any advice?

  • 1
    Can you add an image in your post to show the table that contains all layers A that intersect layer B?
    – whyzar
    May 23, 2017 at 18:57
  • Can you please tell me what info you are missing? I'm not allow to share these layers.
    – Barak Alon
    May 23, 2017 at 19:24
  • 1
    The table that you where able to generate using the Join Attributes by location tool. It would help to see how your data rows come out and perhaps I could recommend an option to solve your issue in determining the % area. However, if you are unable to share the layers, that's fine.
    – whyzar
    May 23, 2017 at 19:25
  • The main issue with Join Attributes by location tool is when I get the new intersected layer, and I calculate the "new" area, I get the exact same layer A polygons area, and not only the intersected part of the polygon.So I wonder if that's the right tool to use here.
    – Barak Alon
    May 23, 2017 at 19:36

1 Answer 1

  1. Make sure all polygons on layers A and B have unique IDs (e.g. A1, A2, ..., B1, ...) so that you can easily identify the output.
  2. Run Vector | Geoprocessing Tools | Union which returns Union layer
  3. Open attribute table of Union. Each row corresponds to A~B combination.
  4. Open Field Calculator and calculate AREA by $area.
  5. Export Union attribute table as CSV.
  6. Separately, calculate AREA ($area) of original polygons on layer A.
  7. Use Excel or any spreadsheet software to find % area by (Union polygon) / (original polygon) * 100

enter image description here

Your AREA is calculated on EPSG:4326 and may not be accurate enough, but the ratio (%) would be okay.

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.