1

To summarize: I'm having difficulties with creating a heatmap from a large (90021-item) polyline dataset in QGIS 3.10.1.

First, it is worth noting that this question is somewhat similar to Doing heatmap from line data in QGIS? and to Create line heatmap with QGIS. In particular, I have a single polyline (vector) layer containing all 90021 features, each with a few thousand vertices. These lines represent Google Maps-style travel routes, and each one also has an attribute that I'd like to use as a weighting factor in my heatmap.

I initially attempted to follow roughly the procedure described in the third answer to the first question above, which consists of:

  1. Densifying each line (using the native QGIS algorithm for this), so that vertices occur at regular intervals;
  2. Extracting these vertices (again, with the native QGIS algorithm), isolating them from their lines while preserving the weighting attribute; and
  3. Editing the symbology for this vertex layer so that it renders as a heatmap, using the desired attribute as a weight factor.

Unfortunately, the size of my dataset makes this approach infeasible - an earlier dataset, at half the size of my current one, quickly filled my computer's RAM and froze it during this process.

I also tried the approach outlined in the accepted answer to the second question above, using feature blending modes to attain the desired effect. Again, the size of my dataset was problematic. The Addition blending mode, seems to be the best option for heatmap-like output, as it simply adds the RGB components of the pixels to be overlaid. (More layered lines = a lighter color.) However, so many lines overlap that even with the feature color set to 1, 1, 1 (in RGB form), a large portion of the layer becomes white - in effect, there are so many lines overlaid on each other that the RGB values hit their maximum too soon.

Does anyone know how I might be able to proceed? (If it helps, here's the list of QGIS blending modes.)

  • AT what point in the process does it freeze? If you make it through steps 1-2 and freeze on step 3, try using the 'heatmap' algorithm to generate the heatmap as a raster? That way it doesn't have to live-render the heatmap every time you pan zoom the map. – csk Jan 1 at 21:47
  • @csk With my older, half-size dataset, it would make it about 5% of the way through step 2. Since I chose to output to a new memory layer, with so many features and vertices, it completely filled my computer's RAM. – Luke R Jan 2 at 18:34

Your Answer

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

Browse other questions tagged or ask your own question.