35.43 SDO_UTIL.H3_MBR

Format

SDO_UTIL.H3_MBR(
  h3_key IN RAW,
  exact  IN BOOLEAN DEFAULT TRUE
) RETURN SDO_GEOMETRY;

Description

Returns the MBR of the given H3 cell.

Parameters

h3_key

Identifies the H3 cell.

exact
  • If TRUE (default), the MBR is exact.
  • If FALSE, the returned MBR is a rectangle based on the center of the H3 cell and the largest cell size at that resolution.

Usage Notes

The approximate MBR is quicker to compute. You need to verify that the time and accuracy tradeoff is appropriate to your application.

Examples

The following example computes the exact MBR value.

SELECT SDO_UTIL.H3_MBR('0877AA5145FFFFFF', TRUE) FROM DUAL;

SDO_GEOMETRY(2003, 4326, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1),
SDO_ORDINATE_ARRAY(48.8614522, 2.3465296, 48.8610871, 2.35865517, 48.8505953, 2.36541433,
48.8404669, 2.36004832, 48.840831, 2.34792133, 48.8513246, 2.34116178, 48.8614522,
2.3465296))

The following example converts the exact MBR to a bounding box.

SELECT SDO_GEOM.SDO_MBR(SDO_UTIL.H3_MBR('0877AA5145FFFFFF', TRUE)) FROM DUAL;

SDO_GEOMETRY(2003, 4326, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3),
SDO_ORDINATE_ARRAY(48.8404669, 2.34116178, 48.8614522, 2.36541433))

The following example computes the approximate H3_MBR of the same cell:

SELECT SDO_UTIL.H3_MBR('0877AA5145FFFFFF', FALSE) FROM DUAL;

SDO_GEOMETRY(2003, 4326, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3),
SDO_ORDINATE_ARRAY(48.8383005, 2.34064005, 48.8636193, 2.36593751))