All Products
Search
Document Center

ApsaraDB RDS: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

ParameterDescription
codeThe H3-encoded geographic grid object.
levelThe layer. By default, the layer above the layer at which the H3-encoded geographic grid object resides is used.

Examples

The following example retrieves the child grids of 884a126689fffff using the default resolution:

-- 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

The input grid 884a126689fffff is at resolution 8. The result contains 7 child grids at resolution 9 — each H3 hexagonal grid cell has 7 children at the next resolution level.