dtoolkit.geoaccessor.dataframe.H3.to_polygons#
- H3.to_polygons() GeoDataFrame [source]#
Return
Polygon
to describe the cell boundary.- Returns:
- GeoDataFrame
With H3 cell as the its index.
See also
Examples
>>> import dtoolkit.geoaccessor >>> import pandas as pd >>> s = pd.Series( ... ['a', 'b'], ... index=[612845052823076863, 614269156845420543], ... name='label' ... ) >>> s 612845052823076863 a 614269156845420543 b Name: label, dtype: object >>> s.h3.to_polygons() label geometry 612845052823076863 a POLYGON ((121.98797 55.00408, 121.99122 54.999... 614269156845420543 b POLYGON ((100.00035 0.99630, 100.00080 1.00141... >>> df = pd.DataFrame( ... {'label': ['a', 'b']}, ... index=[612845052823076863, 614269156845420543], ... ) >>> df label 612845052823076863 a 614269156845420543 b >>> df.h3.to_polygons() label geometry 612845052823076863 a POLYGON ((121.98797 55.00408, 121.99122 54.999... 614269156845420543 b POLYGON ((100.00035 0.99630, 100.00080 1.00141...