snowflake.snowpark.functions.h3_latlng_to_cell_string¶
- snowflake.snowpark.functions.h3_latlng_to_cell_string(latitude: Union[snowflake.snowpark.column.Column, str], longitude: Union[snowflake.snowpark.column.Column, str], target_resolution: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Returns the H3 cell ID string for the given latitude, longitude, and resolution.
- Parameters:
latitude (ColumnOrName) – The latitude values.
longitude (ColumnOrName) – The longitude values.
target_resolution (ColumnOrName) – The H3 resolution values (0-15).
- Returns:
H3 cell ID string for the given latitude, longitude, and resolution.
- Return type:
Example:
>>> df = session.create_dataframe([[52.516262, 13.377704, 8]], schema=["lat", "lng", "res"]) >>> df.select(h3_latlng_to_cell_string("lat", "lng", "res")).collect() [Row(H3_LATLNG_TO_CELL_STRING("LAT", "LNG", "RES")='881f1d4887fffff')]