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 2 vector layers of points:

  • one with a point for each house in the city (thanks to osm.org), roughly equivalent to population
  • one with a point for each case of cholera in the city

I'm trying to define in which locations I should site new water supply points based on a local attack rate (ie: number of cholera cases / local population). I've built separate heat maps for each layer (using QGIS heat map plugin), but it's hard to visually figure out hot spots.

So I'm looking for a way to calculate this local attack rate, ideally something like (number of cases within X meters radius / number of houses within same radius) and spit that out as a raster layer. Basically just like a heat map, but using a ratio rather than a simple count.

I'm guessing there's some magic keyword I don't know that will open a swath of solutions. Can anyone point me in the right direction? I'm using QGIS.

share|improve this question
    
The magic word may be "density": you are asking for the ratio of two density maps. –  whuber Oct 11 '13 at 16:40
add comment

1 Answer

up vote 0 down vote accepted

Here's what I found:

  • make a heatmap of each layer using the Raster->Heatmap plugin.
  • use raster->raster calculator to compute the ratio

this seems to give me what I want, the only caveat being that I'm not 100% sure how the calculation is done, considering that my two heatmaps pixels don't perfectly overlap. I read something hinting at "nearest neighbour" algorithm being used in such situation, but I'm not sure how that would affect my result.

share|improve this answer
1  
You need to control the output. Most software computes defaults for the kernel and its radius based on the number of data points and their extent; you probably should override at least one of those defaults if you would like the results to overlap. –  whuber Oct 14 '13 at 14:35
    
Yes, I saw the pixel size settings, but I'm still unsure about shifting the grid so that both rasters actually overlap. Or maybe it doesn't matter if pixels are the same size? –  Laurent S Oct 14 '13 at 15:42
add comment

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.