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

Syntax

H3_CELL_TO_CHILDREN( <cell_id> , <target_resolution> )
Copy

Arguments

cell_id

An INTEGER that represents the H3 cell ID (index).

target_resolution

An INTEGER between 0 and 15 (inclusive) specifying the H3 resolution that you want to use for the returned H3 cells.

Specifying any other INTEGER value results in an error.

Returns

Returns an ARRAY of the INTEGER values of the IDs of the children of a H3 cell at the specified target resolution.

Examples

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);
Copy
+--------------------------------------------+
| H3_CELL_TO_CHILDREN(613036919424548863, 9) |
|--------------------------------------------|
| [                                          |
|   617540519050084351,                      |
|   617540519050346495,                      |
|   617540519050608639,                      |
|   617540519050870783,                      |
|   617540519051132927,                      |
|   617540519051395071,                      |
|   617540519051657215                       |
| ]                                          |
+--------------------------------------------+