Categories:

Geospatial functions

H3_CELL_TO_CHILDREN

Returns an array of the INTEGER IDs of the children of an H3 cell for a given resolution.

See also:

H3_CELL_TO_CHILDREN_STRING , H3_CELL_TO_PARENT

语法

H3_CELL_TO_CHILDREN( <cell_id> , <target_resolution> )

实参

cell_id

An INTEGER that represents the H3 cell ID (index (https://h3geo.org/docs/core-library/h3Indexing)).

target_resolution

An INTEGER between 0 and 15 (inclusive) specifying the H3 resolution (https://h3geo.org/docs/core-library/restable) that you want to use for the returned H3 cells.

指定其他任何 INTEGER 值都会导致错误。

返回

按照指定的目标分辨率,返回 H3 单元格子级 IDs 的 INTEGER 值的数组。

示例

The following example returns an array of the IDs of the children of the H3 cell with the ID 613036919424548863:

SELECT H3_CELL_TO_CHILDREN(613036919424548863, 9);
+--------------------------------------------+
| H3_CELL_TO_CHILDREN(613036919424548863, 9) |
%--------------------------------------------%
| [                                          |
|   617540519050084351,                      |
|   617540519050346495,                      |
|   617540519050608639,                      |
|   617540519050870783,                      |
|   617540519051132927,                      |
|   617540519051395071,                      |
|   617540519051657215                       |
| ]                                          |
+--------------------------------------------+