I successfully created a map of Senegal with several indicators. Now I would like to do a heatmap with the goal to show villages that respect those criteria:

1) high population density;

2) village or town (no city neither hamlet);

3) less then 10km from an electricity grid;

4) low land elevation;

5) no protected area.

To be more clear, I am joining the map I have created with the important indicators:

Senegal map


Population density is the yellow -> red raster; Town are stars; Electricity grid is the red line; Land elevation is the white -> brown raster; Protected areas are the green polygons.

  • 2
    I don't think its a heatmap you're after. Because you wish to identify areas through several criteria you should rather look at doing a weighted overlay analysis. Sadly I've haven't done one, but google around, and there have been some questions on the subject in stack exchange. Jun 3, 2016 at 15:32
  • Thanx for your advice, I've never heard about that analysis..Will google it.
    – Janita
    Jun 3, 2016 at 15:35
  • Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and - if applicable - code so far. For more info, you can check our faq.
    – underdark
    Jun 6, 2016 at 19:43
  • 1
    Anita aka @underdark is one of the top contributors to GIS SE, and acts as a moderator. Just check her profile and you'll understand what I'm talking about. Moderators want to make sure that new members understand how GIS SE works. So there is no need to take offense at what she said.
    – Techie_Gus
    Jun 6, 2016 at 22:22

2 Answers 2


I'm not sure if there is a tool in QGIS that can perform what you want in one simple step but you can solve your problem using a multi-step approach where you use the results of one step to use them in the next. What I'm giving are just pointers and not detailed step by step instructions.

  • Create a feature subset by using query builder for the village layer to exclude both city and hamlet.

  • Buffer the electricity grid by 10km and do a spatial query to select points that are within this buffer and select the result. Create a new layer using the result.

  • Do a spatial query on the newly created layer for villages that are within the protected areas then delete the selection.

  • Using the point sampling tool plugin, give to each village the value from each of the rasters you have and then select by expression the villages that match your criteria.

  • Thanx a lot for your help. Seems not that easy for a beginner. I'll try to do what you described tomorrow in the office.
    – Janita
    Jun 6, 2016 at 21:59
  • I am wondering if that would be possible if one of the criteria totaly change: to target villages that are MIN 10km FAR FROM the electricity grid. All the other criteria stay the same.
    – Janita
    Jun 9, 2016 at 20:34

After the electricity buffer is performed for the area on the map that encompasses 10 km around the electricity grid and then the Selection => Select by Location is performed you can then right click the "Villages" layer and scroll to Data => Export Data and hit Ok to create the new Feature class.

  • Thanx a lot for your help. I'll try to do what is described tomorrow.
    – Janita
    Jun 6, 2016 at 22:02
  • Your welcome, I just realized a slightly simpler way is to right click the "Villages" layer and scroll to Selection => Create layer from selected features.
    – Michael
    Jun 7, 2016 at 0:04
  • When I right click on tha "villages" layer I don't see Selection
    – Janita
    Jun 9, 2016 at 20:37

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.