Thanks! That make sense, I'll try and I will let you know.<br><br><div class="gmail_quote">El mar., 4 de noviembre de 2014 15:26, enricofer <<a href="mailto:enricofer@gmail.com">enricofer@gmail.com</a>> escribió:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I suggest you to put everything in spatialite database and, assuming that<br>
1) GRID is the polygon layer with grid definition<br>
2) POINTS is the point layer with population data<br>
3) POINTS has a field "pop" with population data<br>
4) both layers have a keyfield named "id"<br>
5) both layer have "geom" as geometries field<br>
<br>
Run the following query with dbmanager:<br>
<br>
SELECT DISTINCT GRID.id, SUM(POINTS.pop) AS POPxGRID<br>
FROM POINTS<br>
INNER JOIN GRID ON ST_Within(POINTS.Geometry,<u></u>GRID.geom)<br>
GROUP BY <a href="http://GRID.ID" target="_blank">GRID.ID</a><br>
<br>
you will get a table with a reference to a grid feature ID and the sum of<br>
the population of the points that are within the grid feature<br>
<br>
I hope this help you.<br>
<br>
Enrico Ferreguti<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/QGIS-Analytical-combinations-tp5171127p5171139.html" target="_blank">http://osgeo-org.1560.x6.<u></u>nabble.com/QGIS-Analytical-<u></u>combinations-<u></u>tp5171127p5171139.html</a><br>
Sent from the Quantum GIS - User mailing list archive at Nabble.com.<br>
______________________________<u></u>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-user</a><br>
</blockquote></div>