Returns the child grids of an H3-encoded geographic grid object at a specified resolution level.
Syntax
setof h3grid ST_Children(h3grid code, integer level);Parameters
| Parameter | Description |
|---|---|
code | The H3-encoded geographic grid object. |
level | The resolution level at which to return child grids. Default: one level finer than the resolution of code (that is, resolution(code) + 1). |
Returns
A set of h3grid values representing the child grids of code at the specified resolution level.
Example
The following example returns the child grids of an H3 grid cell at the default resolution level (one level finer than the input).
SELECT st_astext(st_children(st_h3fromtext('884a126689fffff')));Output:
894a1266883ffff
894a1266887ffff
894a126688bffff
894a126688fffff
894a1266893ffff
894a1266897ffff
894a126689bffffThe input cell 884a126689fffff is at resolution 8. The 7 output cells are at resolution 9, one level finer.
See also
ST_Parent: Returns the parent grid of an H3-encoded geographic grid object.
该文章对您有帮助吗?