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
| Parameter | Type | Description |
|---|---|---|
code | h3grid | The H3-encoded geographic grid object. |
level | integer | The 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