All Products
Search
Document Center

PolarDB:ST_AsInt

Last Updated:Mar 28, 2026

ST_AsInt converts an H3 geographic grid object (h3grid) to its bigint representation.

Syntax

bigint ST_AsInt(h3grid grid);

Parameters

ParameterTypeDescription
gridh3gridThe H3 geographic grid object to convert.

Return value: A bigint representing the H3 cell index.

Example

SELECT ST_AsInt(ST_H3FromBinary('\x010100ffff9f6826a18408'));

Output:

      st_asint
--------------------
 613792635565375487