More

Find the population density of some points in qgis/postgis

Find the population density of some points in qgis/postgis


I have the tiger census data of population density in each block group. I also have a different kind of data: traffic accident data, where an accident has a lat/lon pair. My goal is to find the population density of each accident location.

How can I match the accident to the block groups?


You could use the ST_Intersects function, and use a query like this:

select acc.[column] , bg.[population] from accidents as acc join blockgroups as bg on ST_Intersects(acc.geom, bg.geom)

Watch the video: Using QGIS with PostGIS