SDO_UTIL.H3_POLYGON_TO_CELLS

Format

SDO_UTIL.H3_POLYGON_TO_CELLS(
      geometry   IN SDO_GEOMETRY,
      resolution IN NUMBER,
      mask       IN VARCHAR2 DEFAULT 'CENTROID'
) RETURN SYS.ODCIRAWLIST;

Description

Produces a collection of H3 cells associated with the input polygon at the specified resolution.

Parameters

geometry

The polygon geometry to cover with H3 cells. The geometry must use a geodetic longitude/latitude coordinate system.

resolution

The H3 resolution for the returned cells.

mask

The spatial relationship used to select H3 cells. Supported values include:

Usage Notes

The default CENTROID mode uses the center of each cell to determine containment.

The function returns a collection of H3 cells and can be queried with the TABLE operator.

Examples

The following examples return resolution 4 H3 cells using different mask values:

SELECT *
FROM TABLE(SDO_UTIL.H3_POLYGON_TO_CELLS(
  SDO_UTIL.H3_BOUNDARY('0822837FFFFFFFFF'),
  4,
  'CONTAINS'
));

SELECT *
FROM TABLE(SDO_UTIL.H3_POLYGON_TO_CELLS(
  SDO_UTIL.H3_BOUNDARY('0822837FFFFFFFFF'),
  4,
  'CENTROID'
));

SELECT *
FROM TABLE(SDO_UTIL.H3_POLYGON_TO_CELLS(
  SDO_UTIL.H3_BOUNDARY('0822837FFFFFFFFF'),
  4,
  'ANYINTERACT'
));