<div dir="ltr">Anyone dealing with heatmaps or density estimation will be interested in this plugin.<div><br></div><div><a href="https://plugins.qgis.org/plugins/densityanalysis/">https://plugins.qgis.org/plugins/densityanalysis/</a><br></div><div><br></div><div>QGIS natively has the Heatmap (Kernel Density Estimation) algorithm which is powerful and produces a heatmap image that can then be styled and displayed. Each pixel in the image represents an area with an accumulated intensity of the density from the input point layer data.</div><div><br></div><div>The Density Analysis plugin adds 3 vector gridded density map algorithms. 1) One of these can be done with a series of steps using QGIS algorithms such as "Create grid" over the point layer extent, followed by "Count points in polygon", "Extract by attribute", and then style it. The Density Analysis plugin does this in one step. If the input point layer is not spatially indexed then the "Count points in polygon" can be painfully slow.</div><div><br></div><div>The next algorithm takes the point layer and generates a geohash string for each coordinate and creates a dictionary of geohash strings with their counts. These geohashes are then turned into polygons with a NUMPOINTS count attribute. The third algorithm makes use of the H3 geohash library (which you must pip install). H3 geohashing produces hexagon boundaries and is ideal for density analysis and is blazing fast. Here are some time comparisons on my computer with these three algorithms. I ran this on a  layer containing 193401 points and there are two different grid cell sizes.</div><div><br></div><div><font face="monospace">Algorithm                     4km grid      1.22 km grid</font></div><div><font face="monospace">----------------------------  ------------  -------------</font></div><div><font face="monospace">QGIS count points in polygon  8.16 seconds  63.18 seconds</font></div><div><font face="monospace">Geohash                       4.89 seconds  5.6 seconds</font></div><div><font face="monospace">H3 geohash                    3.56 seconds  3.79 seconds</font></div><div><br></div><div>When the grid gets more dense the time it takes to count points in polygons really goes up but the geohashing doesn't change much. We tested the H3 algorithm against the similar capability in ArcGIS. Here are those results.</div><div><br></div><div><font face="monospace">Grid Resolution   ArcGIS        QGIS H3 geohash</font></div><div><font face="monospace">---------------   ----------    ----------------</font></div><div><font face="monospace">400m              50 seconds    2.93 seconds</font></div><div><font face="monospace">50m               3:20 minutes  12.51 seconds</font></div><div><br></div><div>The latest Density analysis plugin includes the following updates:</div><div>1. Added a settings dialog that allows the user to choose the default color ramp used in the algorithms. The setting is persistent from one launch of QGIS to the next.</div><div>2. Added  an invert color ramp check box.</div><div>3. Added a styled polygon density algorithm.</div><div>4. Added a styled heatmap (kernel density estimation) algorithm. This is a wrapper on the QGIS Heatmap algorithm, but you specify the grid/pixel cell size in terms of km, m, mi, etc and not in terms of the CRS of the input layer. It then automatically styles the layer.</div><div>5. Added a H3 grid algorithm.</div><div><br></div><div>For a more complete list of capabilities install the plugin and select Help from "Plugins->Density Analysis".</div><div><br></div><div>Best wishes to everyone,</div><div><br></div><div>Calvin</div><div><br></div></div>