[QGIS-Developer] Could the H3 library be included as a core QGIS library

C Hamilton adenaculture at gmail.com
Thu Sep 1 06:01:11 PDT 2022


Aron,

Thanks for that link. I added a comment to it. I have also implemented H3
in the Density Analysis plugin. A grid of polygons is used to do a
histogram count of data within the area. To do this in QGIS with its core
algorithms you create a grid (hexagon) over the extent of some point data,
followed by counting the points in the polygons. With H3 you create the
geohash of each point and keep a dictionary of the counts then you generate
the polygons with their scores. This is orders of magnitude faster
especially as your data gets dense and you are looking and millions of
points. This shows processing times using the QGIS count points in polygons
of some sample data, geohash algorithm which I have also implemented, and
H3. Geohash is quick but H3 is quicker and I like the hexagon grid rather
than the geohash rectangular grid.

Algorithm                     4km grid      1.22 km grid
----------------------------  ------------  -------------
QGIS count points in polygon  8.16 seconds  63.18 seconds
Geohash                       4.89 seconds  5.6 seconds
H3 geohash                    3.56 seconds  3.79 seconds

Here is the Density Analysis plugin.

https://plugins.qgis.org/plugins/densityanalysis/

Calvin

On Thu, Sep 1, 2022 at 7:04 AM Aron Gergely via QGIS-Developer <
qgis-developer at lists.osgeo.org> wrote:

> Hi Calvin,
>
> In case you missed, it has already been asked here:
>
> https://github.com/qgis/QGIS/issues/43531
>
> For now you can use the H3 Toolkit plugin for generic H3 grid creation.
>
> BR,
> Aron
> On 30-08-2022 09:13, Raymond Nijssen wrote:
>
> Hi Calvin,
>
> FYI, there's also this H3 plugin:
> https://plugins.qgis.org/plugins/h3_toolkit/
>
> Raymond
>
>
> On 25-08-2022 14:08, C Hamilton via QGIS-Developer wrote:
>
> A few months ago I was introduced to the H3 (Hexagonal hierarchical
> geospatial indexing system) library (https://h3geo.org/
> <https://h3geo.org/> <https://h3geo.org/>) and as a part of testing it to
> see its capabilities I included it in my Density Analysis plugin. The
> library is blazing fast in creating a hex grid and in doing a geohash of
> coordinates if you are doing a vector based heatmap like I have done in the
> Density Analysis plugin. I think it would be an asset to have it as a core
> QGIS library. Would there be any interest in including it?
>
> Thanks,
>
> Calvin Hamitlon
>
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220901/2304b17f/attachment.htm>


More information about the QGIS-Developer mailing list