[Qgis-user] New Density Analyses Plugin
C Hamilton
adenaculture at gmail.com
Thu Jun 16 06:48:21 PDT 2022
I want to share a new vector based density analysis plugin sooner rather
than later. My work priorities are being rearranged so that I will not be
able to do new development or new features, but only fix bugs if they
arise. Here is the new plugin. Please test it out and give me any feedback.
I have about a month where I can optimize it more, but after that I will
not be able to do further development.
https://plugins.qgis.org/plugins/densityanalysis/
You can read the Density Analyses Documentation
<https://github.com/NationalSecurityAgency/qgis-densityanalysis-plugin/#readme>,
but here are the highlights.
This plugin currently has 3 vector based density algorithms:
1. *Create density map grid* - This one creates a grid of polygons and
counts the number of points in those polygons using the QGIS *Create
grid* processing algorithm followed by the *Count points in polygon* and
then styled appropriately. It is very important that the input point data
be spatially indexed. This algorithm provides the most flexibility,
but *Count
points in polygon* is time consuming.
2. *Create geohash density map* - This makes use of the geohash
algorithm to geohash each point and count the number of points for each
geohash and create the geohash polygons. Depending on the density of the
map this can be an order of magnitude faster than the above algorithm. The
disadvantage is that you are limited to the geohash grid resolutions.
3. *Create H3 density map* - This is the fastest of all 3 algorithms. It
creates a hexagon density map grid and is similar in that it uses a H3
geohash index to count all the points in each geohash. Unfortunately, H3 is
not a part of the QGIS standard python libraries and you will need to 'pip
install h3' to be able to access these algorithms, but it will be worth it.
QGIS developers, you may want to consider including H3 as a part of QGIS.
Here are some running times of the 3 algorithms with a data set of around
194,000 points.
- Create density map grid - 63.18 seconds
- Create geohash density map - 5.6 seconds
- Create H3 density map - 3.7 seconds
Once the heatmaps are created (note that they are automatically styled),
then there is a heatmap explorer that allows you to load in the N highest
grid counts and by clicking on them it will pan or zoom to the heatmap
polygon to examine the data that is there.
There are also 3 other utilities.
1. *Apply style to selected layers* - You can copy a style to the
clipboard or select a .qml file and apply it to all selected layers or
groups of layers.
2. *Apply graduated style* - This applies a graduated style to a layer,
but it is done as a processing algorithm so it can be used in the model
builder.
3. *Apply random categorized style* - This applies a random categorized
style to a layer, but it is done as a processing algorithm so it can be
used in the model builder.
I plan on also adding a raster based polygon density algorithm that seems
to be missing from QGIS.
If you have any suggestions or find any problems with the plugin please let
me know.
Thanks,
C. Hamilton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220616/430f1f56/attachment.htm>
More information about the Qgis-user
mailing list