H3_LATLNG_TO_CELL

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

Returns the INTEGER value of the H3 cell ID for a given latitude, longitude, and resolution.

Syntax

H3_LATLNG_TO_CELL( <latitude> , <longitude> , <target_resolution> )

Parameters

NameRequiredDescription
latituderequiredA FLOAT that represents the latitude. Values outside the standard latitude range are wrapped to the range [-90, 90].
longituderequiredA FLOAT that represents the longitude. Values outside the standard longitude range are wrapped to the range [-180, 180].
target_resolutionrequiredAn INTEGER between 0 and 15 (inclusive) specifying the H3 resolution that you want to use for the returned H3 cell. Specifying any other INTEGER value results in an error.

Returns

Returns an INTEGER value that corresponds to the H3 cell ID for the given location and resolution.

Usage notes

See also

Referenced by