4

I have two data sets:

I would like to calculate the number of people within for example 50 km from each point. What would be the best way of doing this in QGIS?

3
  • 1
    I recommend reading about PostGIS (SQL) and R, might come handy if you need do more spatial analysis in future Commented Jan 28, 2013 at 8:41
  • ST_Contains postgis.net/docs/manual-2.0/ST_Contains.html source: postgis.net/docs/manual-2.0/…
    – Mapperz
    Commented Jan 28, 2013 at 14:52
  • perhaps an answer to overlapping buffers could be to store the non-buffered area as a shape and subtract the population in the non-buffer area from the total
    – doug
    Commented Nov 16, 2018 at 23:19

1 Answer 1

1

Use Vector > Geoprocessing Tools > Buffer on your point shapefile to create a 50km radius circle around each point.

Use the Zonal Stats plugin (its a core plugin, but must be activated in Manage Plugins) to calculate the sum (among other stats) of the raster cells inside of each polygon of the resulting shapefile.

6
  • 1
    This only works provided no two points are closer than 50 km: when the buffers overlap, zonal stats will not be able to obtain the correct answer. Instead, compute a focal sum (with a 50 km radius circular neighborhood) and extract its values at each of the points in the shapefile.
    – whuber
    Commented Jan 27, 2013 at 23:40
  • Thank you for the answers. Two questions: - Since the data is in lat/long and I will use meters for the analysis, I will have to reproject the data to suitable coordinate system. Any suggestions on which one to use for a global data set? - The buffer zones will probably overlap. Can you tell me a bit more about how to compute a focal sum? Magnus
    – johnrobot
    Commented Jan 28, 2013 at 6:58
  • @whuber, I have never noticed problems using QGIS Zonal Stats plugin with overlaping polygons, but I know that it's a Problem in ArcGIS (9.3). I made a small test, using two polygons with the same shape\size, and overlap them. Using the QGIS plugin and the resulting count, sum and mean for each polygon was the expected. Commented Jan 28, 2013 at 11:39
  • Very interesting! That's nice to know, and I am pleased to have been wrong about QGIS in this regard. Based on what you say, it sounds like the zonal stats solution should be preferred unless there are a very many points with very many overlaps, in which case the focal stats solution--with its much greater computational efficiency--may have some merit as an option.
    – whuber
    Commented Jan 28, 2013 at 17:14
  • Johnrobot, your query about a suitable global projection needs some careful thought. I would like to suggest you review similar questions on this site and then, if they do not indicate a solution, post that as a separate question. It looks like you could compute a variable distance buffer in a conformal projection, varying the radii with the scale.
    – whuber
    Commented Jan 28, 2013 at 17:21

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.