All Products
Search
Document Center

PolarDB:ST_Children

Last Updated:Mar 28, 2026

Returns the child grids of an H3-encoded geographic grid object at a specified layer.

Syntax

setof h3grid ST_Children(h3grid code, integer level);

Parameters

ParameterTypeDescription
codeh3gridThe H3-encoded geographic grid object.
levelintegerThe target layer. By default, the layer above the layer at which the H3-encoded geographic grid object resides is used.

Return value

Returns a set of h3grid values representing the child grids at the specified layer.

Examples

The following example returns the child grids of the H3 cell 884a126689fffff at the default layer (one level below).

-- By default, the layer below the layer at which the H3-encoded geographic grid object resides is used.
select st_astext(st_children(st_h3fromtext('884a126689fffff')));
    st_astext
-----------------
 894a1266883ffff
 894a1266887ffff
 894a126688bffff
 894a126688fffff
 894a1266893ffff
 894a1266897ffff
 894a126689bffff