gemgis.vector.create_voronoi_polygons
gemgis.vector.create_voronoi_polygons#
- gemgis.vector.create_voronoi_polygons(gdf: geopandas.geodataframe.GeoDataFrame) geopandas.geodataframe.GeoDataFrame #
Function to create Voronoi Polygons from Point GeoDataFrame using the SciPy Spatial Voronoi class (https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.Voronoi.html#scipy.spatial.Voronoi)
- Parameters
gdf (gpd.geodataframe.GeoDataFrame) – GeoDataFrame containing the Shapely Points
- Returns
gdf_polygons – GeoDataFrame containing the valid Voronoi Polygons
- Return type
gpd.geodataframe.GeoDataFrame
New in version 1.1.
Example
>>> # Loading Libraries and File >>> import gemgis as gg >>> import geopandas as gpd >>> gdf = gpd.read_file('file.shp') >>> gdf_polygons = gg.vector.create_voronoi_polygons(gdf=gdf)