Question

Create heat map from large numbers of stacked polygons

  • 10 April 2019
  • 2 replies
  • 5 views

I need to create a heat map that splits up square polygons into all of their overlapping portions and attributes each with a count of how many overlaps there are.

First I ran a dissolver and assigned IDs to each region:

And then I ran an AreaOnAreaOverlayer with a Group By assigned to the IDs for each region. This meant that the polygons were only compared against other polygons that they might actually intersect rather than everything in the whole world. From this I got a count per box which I can use to create a heat map:

The problem is that in the Middle East region of the map, there are so many polygons (~14,000) that the AreaOnAreaOverlayer is failing long before it has managed to process all of the polygons in that area. This means that this is the only area for which I cannot create a heat map. Going forward, it might be that there are far more polygons than that that all overlap so potentially this problem is going to get even worse.

Does anyone have any tips on how I can create a heat map with high numbers of polygons. Is there a way to break-up the area into smaller regions and then amalgamate those? Any help gratefully received.


2 replies

Badge +3

 

 

I have some with over 150k objects, which split into millions. Runs ok, but takes a lot of time.

Managed to reduce time consumption by doing following.

AreaOnArea Overlay is perfectly suited for parallel processing, you gain lots of time using it.

I do 2 things prior to overlaying large number of objects.

First I use a Tiler and tile it, not to many tiles, as you want to stick to your max. cores.

Use the _column and _row as GroupBy for the AoA overlayer. I run it at aggressive, and leave the computer be.

 

Spatial sorting also yields some time gain. Though depends on the original spatial spread of the data.

 

Badge +16

Hi @bi, I dont know if you can generate a heat map directly from polygons and if that is actually your issue, you should consider creating points to use a script/transformer to create the heat map after processing the polygons.

There is a costum transformer on the Hub (LeafletHeatmap) and my old blog post might also be useful.

Hope this helps,

Itay

Reply