7

I have two heat-maps and related point data layers, one of correspondent sender addresses, the other of recipient addresses. I wish to identify clusters -- hotspots -- of sender and receiver addresses.

In QGIS, can I create a heat-map from the two point layers to show densities (the Heat-map Plugin only accepts one vector input layer)? Or can I combine the two heat-map rasters to show the coincidences of data?

(QGIS 2.12+)

5

This can be easily achieved with 'Vector > Data Management Tools > Merge Vector Layers'. Does what it says in the tin and merges you two point layers to a single shape file. You can happily add a heatmap style or create a heatmap layer then depending which version you're using.

|improve this answer|||||
10

Knightshound's answer is correct. Another option, if you don't want to create yet another file and keep ti always updated, is to use Virtual Layers. I'm not sure if Virtual Layers is available in QGIS 2.12 though.

  • Click add Virtual Layer button

  • Enter the following SQL query

select geometry from senders
union all
select geometry from receivers
  • Click OK

enter image description here

Now you will have a brand new layer called virtual_layer, that you can use to create the joined heatmap.

enter image description here

Note that the virtual layer will be updated once any of the to layer are edited. Which is nice.

|improve this answer|||||
  • 2
    Nice work using virtual layers. Pretty much perfect for this. Maybe we should rename them to Query layers in 3.0 – Nathan W Oct 21 '16 at 13:42
  • That is a good idea. Seems a more obvious name for what it does. – Alexandre Neto Oct 21 '16 at 13:49
  • QGIS 2.14.1 on Ubuntu generates an error with this solution. <br/> The Layer is not valid: The layer ?query=select%20geometry%20from%20sender%0Aunion%20all%0Aselect%20geometry%20from%20receiver is not a valid layer and can not be added to the map <br/> Not tried it in other versions yet. Merge Vector Layers does do what I want. – NickN Oct 21 '16 at 16:11
  • Are you sure you used the correct layers' names? – Alexandre Neto Oct 21 '16 at 16:17
  • 1
    Virtual layers work for all QGIS layers, no need to import into other formats. – Nathan W Oct 22 '16 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.