S2Regionalizer
¶
Bases: Regionalizer
S2 Regionalizer.
S2 Regionalizer gives an opportunity to divide the given geometries into square S2 cells.
PARAMETER | DESCRIPTION |
---|---|
resolution |
Resolution of the cells (S2 supports 0-30). See [1] for a full comparison.
TYPE:
|
buffer |
If True then fully cover geometries with S2 cells. Otherwise only use those cells that fully fit into them. Defaults to True.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
If resolution is not between 0 and 30. |
Source code in srai/regionalizers/s2_regionalizer.py
¶
Regionalize a given GeoDataFrame.
PARAMETER | DESCRIPTION |
---|---|
gdf |
GeoDataFrame to be regionalized.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
gpd.GeoDataFrame
|
gpd.GeoDataFrame: GeoDataFrame with regionalized geometries. |