gemgis.vector.create_hexagon_grid#

gemgis.vector.create_hexagon_grid(gdf: geopandas.geodataframe.GeoDataFrame, radius: Union[int, float], crop_gdf: bool = True)#

Function to create a grid of hexagons based on a GeoDataFrame containing Polygons and a radius provided for the single hexagons

Parameters
  • gdf (gpd.GeoDataFrame) – GeoDataFrame containing the polygons for which a hexagon grid is created

  • radius (int, float) – Radius of the hexagon

  • crop_gdf (bool) – Boolean to define if the resulting GeoDataFrame should be cropped to the extend of the provided GeoDataFrame Options include: True or False, default set to True

Returns

hex_gdf – GeoDataFrame containing the hexagon grid

Return type

gpd.GeoDataFrame

New in version 1.0.x.

Changed in version 1.1.3: Optimized creation of hexagon

See also

create_hexagon

Creating one hexagon based on a given center and radius