H3Regionalizer
¶
Bases: Regionalizer
H3 Regionalizer.
H3 Regionalizer allows the given geometries to be divided into H3 cells - hexagons with pentagons as a very rare exception
PARAMETER | DESCRIPTION |
---|---|
resolution |
Resolution of the cells. See [1] for a full comparison.
TYPE:
|
buffer |
Whether to fully cover the geometries with H3 Cells (visible on the borders). Defaults to True.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
If resolution is not between 0 and 15. |
Source code in srai/regionalizers/h3_regionalizer.py
¶
Regionalize a given GeoDataFrame.
Transforms given geometries into H3 cells of given resolution and optionally applies buffering.
PARAMETER | DESCRIPTION |
---|---|
gdf |
(Multi)Polygons to be regionalized.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
GeoDataFrame
|
gpd.GeoDataFrame: H3 cells. |
RAISES | DESCRIPTION |
---|---|
ValueError
|
If provided GeoDataFrame has no crs defined. |