snowflake.snowpark.functions.h3_point_to_cell¶
- snowflake.snowpark.functions.h3_point_to_cell(geography_point: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column [source]¶
Returns the H3 cell ID for a given geography point at the specified resolution.
- Parameters:
geography_point (ColumnOrName) – The geography points.
target_resolution (ColumnOrName) – The target H3 resolution (0-15).
- Returns:
H3 cell ID for the given geography point at the specified resolution.
- Return type:
- Example::
>>> from snowflake.snowpark.functions import col >>> df = session.sql("SELECT ST_POINT(13.377704, 52.516262) as geography_point, 8 as resolution") >>> df.select(h3_point_to_cell(col("geography_point"), col("resolution"))).collect() [Row(H3_POINT_TO_CELL("GEOGRAPHY_POINT", "RESOLUTION")=613036919424548863)]