SDO_UTIL.H3_COMPACT_CELLS

Format

SDO_UTIL.H3_COMPACT_CELLS(
      h3_keys IN SYS.ODCIRAWLIST
) RETURN SYS.ODCIRAWLIST;

Description

Compacts a collection of H3 cells by recursively replacing child cells with their parent cells when all children cells are present.

Parameters

h3_keys

The collection of H3 cells to compact.

Usage Notes

All input cells must share the same resolution. This function can be queried with the TABLE operator and the result is a compacted collection of H3 cells.

Examples

The following example compacts a collection of H3 cells:

SELECT *
FROM TABLE(SDO_UTIL.H3_COMPACT_CELLS(
  SYS.ODCIRAWLIST(
    SDO_UTIL.H3_INT_TO_STRING(622236750562230271),
    SDO_UTIL.H3_INT_TO_STRING(622236750562263039),
    SDO_UTIL.H3_INT_TO_STRING(622236750562295807),
    SDO_UTIL.H3_INT_TO_STRING(622236750562328575),
    SDO_UTIL.H3_INT_TO_STRING(622236750562361343),
    SDO_UTIL.H3_INT_TO_STRING(622236750562394111),
    SDO_UTIL.H3_INT_TO_STRING(622236750562426879),
    SDO_UTIL.H3_INT_TO_STRING(622236750558396415)
  )
));