Categories:

Geospatial functions

H3_UNCOMPACT_CELLS

Returns an array of VARIANT values that contain the INTEGER IDs of H3 cells at the specified resolution that cover the same area as the H3 cells in the input.

语法

H3_UNCOMPACT_CELLS( <array_of_cell_ids> , <target_resolution> )

实参

array_of_cell_ids

An array of VARIANT values that contain INTEGER values that represent H3 cell IDs (indexes (https://h3geo.org/docs/core-library/h3Indexing)).

target_resolution

An INTEGER value 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 值都会导致错误。

返回

返回 ARRAY 数据类型的值或 NULL。

  • If the input is an array of VARIANT values that contain INTEGER values, returns an array of VARIANT values that contain the INTEGER values that represent the set of H3 cells at the specified resolution.
  • 如果输入为 NULL,则返回 NULL,不报错。

使用说明

  • 输入中的所有 INTEGER 值必须代表有效的 H3 单元格。
  • The input cells cannot have a higher resolution than the resolution specified in the target_resolution argument.

示例

The following example returns an uncompacted set of H3 cells that represent valid H3 cell IDs and a target resolution of 10.

SELECT H3_UNCOMPACT_CELLS(
  [
    622236750558396415,
    617733150935089151
  ],
  10
) AS uncompacted;
+-----------------------+
| UNCOMPACTED           |
%-----------------------%
| [                     |
|   622236750558396415, |
|   622236750562230271, |
|   622236750562263039, |
|   622236750562295807, |
|   622236750562328575, |
|   622236750562361343, |
|   622236750562394111, |
|   622236750562426879  |
| ]                     |
+-----------------------+