pysal.lib.cg.
voronoi_frames
(points, radius=None)[source]¶Composite helper to return Voronoi regions and generator points as individual dataframes
Parameters: |
|
---|---|
Returns: |
|
Notes
If Geopandas is not available the return types will be Pandas DataFrames each with a geometry column populated with PySAL shapes. If Geopandas is available, return types are GeoDataFrames with a geometry column populated with shapely geometry types.
Examples
>>> points = [(10.2, 5.1), (4.7, 2.2), (5.3, 5.7), (2.7, 5.3)]
>>> regions_df, points_df = voronoi_frames(points)
>>> regions_df.shape
(4, 1)
>>> regions_df.shape == points_df.shape
True