Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to GIS and hope this is not too basic. I am using QGIS.

Say I have two shapefiles: SHP1, with attributes allocated to municipalities, and another shapefile I built from a wkt file, SHP2, which is an orthogonal 60 by 60 grid.

I wish to do the following: add an attribute column to SHP which reflects the weighted average of an attribute from the underlying SHP1.

thanks for any help


share|improve this question
Will your column have the same weighted value for each row? Also, is there a common attribute between the shapefiles you can use to join them? Or were you hoping to do a spatial join where the connection is location, rather than attributes? – Baltok Feb 6 '13 at 19:29
you speak of weighted average. Weighted by what? Do you already calculated this attribute? – Curlew Feb 6 '13 at 19:31
hello, the average for each cell should be an attrabitue from the underlying shapefile, weighted by the respective area of each attribute present in the cell. – Alex Caseiro Feb 8 '13 at 10:01
An image might be more likely to better explain what I intend to do: Purple lines delimitate municipalities. Each municipality has an attribute (a real number). What I wish to do is to get the value of that attribute with the space definition of the green grid. For a cell over only one municipality, it will be the value from that municipality. For a cell lying over parcels of different municipalities, the value shall be an average of the underliying municipalities, weighted by the respective municipalities areas. I hope I can get help. Many thanks. – Alex Caseiro Feb 8 '13 at 15:49

Your Answer


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

Browse other questions tagged or ask your own question.