Categories:

Geospatial functions

H3_CELL_TO_CHILDREN_STRING

Returns an array of the VARCHAR values containing the hexadecimal IDs of the children of an H3 cell for a given resolution.

See also:

H3_CELL_TO_CHILDREN , H3_CELL_TO_PARENT

语法

H3_CELL_TO_CHILDREN_STRING( <cell_id> , <target_resolution> )

实参

cell_id

A VARCHAR that represents the H3 cell ID (index (https://h3geo.org/docs/core-library/h3Indexing)) in hexadecimal format.

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 的 VARCHAR 值数组。

示例

The following example returns an array of the IDs (in hexadecimal format) of the children of the H3 cell with the ID 881F1D4887FFFFF (in hexadecimal format):

SELECT H3_CELL_TO_CHILDREN_STRING('881F1D4887FFFFF', 9);
+--------------------------------------------------+
| H3_CELL_TO_CHILDREN_STRING('881F1D4887FFFFF', 9) |
%--------------------------------------------------%
| [                                                |
|   "891f1d48863ffff",                             |
|   "891f1d48867ffff",                             |
|   "891f1d4886bffff",                             |
|   "891f1d4886fffff",                             |
|   "891f1d48873ffff",                             |
|   "891f1d48877ffff",                             |
|   "891f1d4887bffff"                              |
| ]                                                |
+--------------------------------------------------+