Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
1  
is it a matter of finding points within polygons, or polygons within polygons? if so you can use the research tools. –  Gerald Oct 30 '12 at 12:37

2 Answers 2

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

share|improve this answer
    
What if parks are not wholly contained within each postcode polygon? –  Simbamangu Oct 30 '12 at 13:16

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.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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