跳转至

Compact a set of H3 indices(压缩一组 H3 索引(Compact a set of H3 indices))

Supported in: Batch, Faster, Streaming

Compact H3 indices into a subset of mixed resolutions if possible. Running the inverse operation uncompact is guaranteed to yield the same set of indices that were compacted if the input indices were all the same resolution. If any of the input indices are invalid this transform will return null. Output indices are sorted in ascending order.

Expression categories: Geospatial

Declared arguments

  • H3 indices: Set of H3 cells.
    Expression\>

Output type: Array\

Examples

Example 1: Base case

Argument values:

  • H3 indices: h3_set
h3_set Output
[ 87754a914ffffff, 87754a916ffffff, 87754a930ffffff, 87754a932ffffff, 87754a933ffffff, 87754a934ffff... [ 86754e64fffffff, 87754a914ffffff, 87754a916ffffff, 87754a930ffffff, 87754a932ffffff, 87754a933ffff...

Example 2: Null case

Argument values:

  • H3 indices: h3_set
h3_set Output
null null

Example 3: Edge case

Argument values:

  • H3 indices: h3_set
h3_set Output
[ 86754e64fffffff, 86754e64fffffff ] [ 86754e64fffffff ]

Example 4: Edge case

Argument values:

  • H3 indices: h3_set
h3_set Output
[ Invalid h3 index ] null


中文翻译


压缩一组 H3 索引(Compact a set of H3 indices)

支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)

在可能的情况下,将 H3 索引(H3 indices)压缩为混合分辨率的子集。如果输入索引均为同一分辨率,则执行逆操作(解压缩)可保证得到与压缩前完全相同的索引集合。若输入索引中存在无效值,此转换将返回 null。输出索引按升序排列。

表达式类别: 地理空间(Geospatial)

声明的参数

  • H3 索引(H3 indices): H3 单元格集合。
    表达式\>

输出类型: Array\

示例

示例 1:基础情况

参数值:

  • H3 索引: h3_set
h3_set 输出
[ 87754a914ffffff, 87754a916ffffff, 87754a930ffffff, 87754a932ffffff, 87754a933ffffff, 87754a934ffff... [ 86754e64fffffff, 87754a914ffffff, 87754a916ffffff, 87754a930ffffff, 87754a932ffffff, 87754a933ffff...

示例 2:空值情况

参数值:

  • H3 索引: h3_set
h3_set 输出
null null

示例 3:边界情况

参数值:

  • H3 索引: h3_set
h3_set 输出
[ 86754e64fffffff, 86754e64fffffff ] [ 86754e64fffffff ]

示例 4:边界情况

参数值:

  • H3 索引: h3_set
h3_set 输出
[ 无效的 H3 索引 ] null