TransWikia.com

Calculate area of intersecting polygons in QGIS

Geographic Information Systems Asked by tomchance on December 20, 2020

I have two collections of shapefiles:

1 – postal codes, administrative and political areas

2 – various land use categories like parks & allotments, and points like trees

I want to produce statistics on the area of those land use categories broken down by postal code, admin & political area, and the number of points by the same means. For example, there are 4.1ha of park in SE15, 879 trees in SE22, and so on.

I am using QGIS. I’ve processed my raw data to get all the shapefiles ready, but after much fruitless searching around on this and other web sites I can’t see a way to do this.

3 Answers

The "Join Attributes by Location" is quite suitable for this purpose.

Suppose we have a Parks and PostCodes shapefiles in the map as shown in display. Parks have an "Area" field and PostCodes have "ZipCode" field. The values are as per the labels displayed in map. We will try to find the sum of area of parks in every zip polygons.

enter image description here

From Vector > Data Management Tools > Select "Join Attributes by Location" tool

Set parameters as shown in figure so that we can find the sum of area of Parks in every PostCode Polygons and also find the sum of Parks in every Polygons.

see field structure below..

enter image description here

From Vector > Data Management Tools > Select "Join Attributes by Location" tool

give attributes as shown in figure so that we can find the sum of area of Parks in every PostCode Polygons and also find the sum of Parks in every Polygons.

enter image description here

The output will be a shapefile identical to the PostCodes shapefile in geometry, but the attributes will be reflect the output of the previous operation.

enter image description here

Answered by vinayan on December 20, 2020

To calculate the area of intersecting polygons:

  1. Vector|Geoprocessing Tools|Union and select the two layers and and output filename, then OK to calculate. Confirm 'yes' to add the new layer to the TOC.
  2. The new layer will show all the areas of each layer, cut by all overlapping edges, and all the attributes of each layer will be included where they overlap (and NA where not).
  3. Calculate the areas of the polygons - you may need to use UTM or another appropriate projection - using the field calculator ($area / 1000000).
  4. I'd then open the DBF file in a spreadsheet and use a pivottable to look at the sum of areas for each of the characteristics you are interested in - for example, using postcodes as columns and land use as rows, with 'sum of area' as the value.

enter image description here

To get points contained in polygons:

  1. Do a spatial join - Vector|Data management tools|Join by location, selecting the points layer as the target and the polygons as the join vector layer;
  2. The resulting layer will attach the attributes of the polygons to the points which they overlap;
  3. Again, open in a spreadsheet and use a pivottable, using 'count' instead of 'sum' for any of the point attributes to show how many points lie within each type of area.

Answered by Simbamangu on December 20, 2020

Here is a very simple way of doing this with QGIS 3.14

  1. Vector|Geoprocessing Tools|Union | and select the two layers and and output filename, then OK to calculate. Confirm 'yes' to add the new layer to the TOC.
  2. Vector | Geometry Tools | Add Geometry Attributes | and select the unioin layer created in 1st step.
  3. Open Attribute layer and see the area column. Thats the intersecting area.

You can use the Intersection tool and follow same procedure to avoid null values. enter image description here

Answered by Gayan Kavirathne on December 20, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP